[llvm] [llvm] Support multiple save/restore points in mir (PR #119357)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 18 03:53:18 PDT 2025


================
@@ -959,8 +960,17 @@ bool ShrinkWrap::runOnMachineFunction(MachineFunction &MF) {
                     << "\nRestore: " << printMBBReference(*Restore) << '\n');
 
   MachineFrameInfo &MFI = MF.getFrameInfo();
-  MFI.setSavePoint(Save);
-  MFI.setRestorePoint(Restore);
+
+  std::vector<CalleeSavedInfo> CSIVec;
+  SetOfRegs CSRSet = getCurrentCSRs(RS.get());
+  for (unsigned Reg : CSRSet)
----------------
arsenm wrote:

```suggestion
  for (Register Reg : CSRSet)
```

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


More information about the llvm-commits mailing list