[llvm] [RISCV][WIP] Let RA do the CSR saves. (PR #90819)

Michael Maitland via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 7 09:10:07 PST 2024


================
@@ -262,15 +262,21 @@ namespace {
     void HoistOutOfLoop(MachineDomTreeNode *HeaderN, MachineLoop *CurLoop,
                         MachineBasicBlock *CurPreheader);
 
-    void InitRegPressure(MachineBasicBlock *BB);
+    void InitRegPressure(MachineBasicBlock *BB, const MachineLoop *Loop);
----------------
michaelmaitland wrote:

> > Can you also help me understand why this patch (without this machine-licm change) leads to longer live ranges?
> 
> because on entry to the function we copy each CSR into a virtual register which will be live for the entire function.

Was it not the case that when we spilled the CSR in PrologEpilogInserter that the register was also live for the entire function?

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


More information about the llvm-commits mailing list