From 955854ec81fc2f0bfcc4733a49f19fa82bfe9d7c Mon Sep 17 00:00:00 2001 From: William Chen Date: Wed, 6 Jul 2022 14:18:08 -0700 Subject: [PATCH] Fix setting of seenFP for each iteration of coloring RA --- src/mapleall/maple_be/include/cg/cgfunc.h | 4 ++-- src/mapleall/maple_be/src/cg/aarch64/aarch64_color_ra.cpp | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/mapleall/maple_be/include/cg/cgfunc.h b/src/mapleall/maple_be/include/cg/cgfunc.h index b678bf79e4..05bbeca25b 100644 --- a/src/mapleall/maple_be/include/cg/cgfunc.h +++ b/src/mapleall/maple_be/include/cg/cgfunc.h @@ -1104,8 +1104,8 @@ class CGFunc { return useFP; } - void UnsetSeenFP() { - seenFP = false; + void SetSeenFP(bool seen) { + seenFP = seen; } bool SeenFP() const { diff --git a/src/mapleall/maple_be/src/cg/aarch64/aarch64_color_ra.cpp b/src/mapleall/maple_be/src/cg/aarch64/aarch64_color_ra.cpp index f3b666c4f1..77a5a439d7 100644 --- a/src/mapleall/maple_be/src/cg/aarch64/aarch64_color_ra.cpp +++ b/src/mapleall/maple_be/src/cg/aarch64/aarch64_color_ra.cpp @@ -4980,9 +4980,7 @@ bool GraphColorRegAllocator::AllocateRegisters() { MarkCalleeSaveRegs(); - if (!seenFP) { - cgFunc->UnsetSeenFP(); - } + cgFunc->SetSeenFP(seenFP); if (GCRA_DUMP) { cgFunc->DumpCGIR(); } -- Gitee