[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:20:03 PDT 2025
================
@@ -825,10 +825,21 @@ class MachineFrameInfo {
void setCalleeSavedInfoValid(bool v) { CSIValid = v; }
- MachineBasicBlock *getSavePoint() const { return Save; }
- void setSavePoint(MachineBasicBlock *NewSave) { Save = NewSave; }
- MachineBasicBlock *getRestorePoint() const { return Restore; }
- void setRestorePoint(MachineBasicBlock *NewRestore) { Restore = NewRestore; }
+ const std::vector<MachineBasicBlock *> &getSavePoints() const {
+ return SavePoints;
+ }
+ void setSavePoints(std::vector<MachineBasicBlock *> NewSavePoints) {
+ SavePoints = std::move(NewSavePoints);
+ }
+ const std::vector<MachineBasicBlock *> getRestorePoints() const {
+ return RestorePoints;
+ }
+ void setRestorePoints(std::vector<MachineBasicBlock *> NewRestorePoints) {
+ RestorePoints = std::move(NewRestorePoints);
+ }
+
+ void clearSavePoints() { SavePoints.clear(); }
----------------
preames wrote:
You don't need these, you can use setSavePoints({});
https://github.com/llvm/llvm-project/pull/119357
More information about the llvm-commits
mailing list