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

Elizaveta Noskova via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 11 08:15:57 PDT 2025


================
@@ -209,10 +209,15 @@ void SILowerSGPRSpills::calculateSaveRestoreBlocks(MachineFunction &MF) {
   // So set the save points for those.
 
   // Use the points found by shrink-wrapping, if any.
-  if (MFI.getSavePoint()) {
-    SaveBlocks.push_back(MFI.getSavePoint());
-    assert(MFI.getRestorePoint() && "Both restore and save must be set");
-    MachineBasicBlock *RestoreBlock = MFI.getRestorePoint();
+  if (!MFI.getSavePoints().empty()) {
+    assert(MFI.getSavePoints().size() < 2 &&
+           "MFI can't contain multiple save points!");
----------------
enoskova-sc wrote:

addressed

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


More information about the llvm-commits mailing list