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

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 7 13:19:59 PDT 2025


================
@@ -332,10 +332,10 @@ class MachineFrameInfo {
   /// stack objects like arguments so we can't treat them as immutable.
   bool HasTailCall = false;
 
-  /// Not null, if shrink-wrapping found a better place for the prologue.
-  MachineBasicBlock *Save = nullptr;
-  /// Not null, if shrink-wrapping found a better place for the epilogue.
-  MachineBasicBlock *Restore = nullptr;
+  /// Not empty, if shrink-wrapping found a better place for the prologue.
+  std::vector<MachineBasicBlock *> SavePoints;
----------------
preames wrote:

Why not SmallVector?  This seems like a classic use case.

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


More information about the llvm-commits mailing list