[llvm] [Codegen] Spill/Restore FP/BP under option (PR #114791)

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 4 09:24:11 PST 2024


================
@@ -77,6 +77,11 @@ using MBBVector = SmallVector<MachineBasicBlock *, 4>;
 STATISTIC(NumLeafFuncWithSpills, "Number of leaf functions with CSRs");
 STATISTIC(NumFuncSeen, "Number of functions seen in PEI");
 
+// Experimental Feature enables spilling and reload FP/BP
+static cl::opt<bool>
+    EnableSpillFPBP("enable-spill-fpbp",
+                    cl::desc("Spill clobbered fp register to stack."),
+                    cl::init(false), cl::Hidden);
----------------
rnk wrote:

I'm in favor of adding a flag to facilitate debugging, but until we have a clear bug report with a clear understanding of why this is causing regressions, I'm not in favor of this default (false) which will regress all of the use cases that were fixed by this change. We need a clear rationale why the old behavior was better than the new behavior in order to change behavior. Flags, though, are reasonable if the new behavior is still unstable.

https://github.com/llvm/llvm-project/pull/114791


More information about the llvm-commits mailing list