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

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 21 04:42:06 PDT 2025


================
@@ -244,6 +244,23 @@ void MachineFrameInfo::print(const MachineFunction &MF, raw_ostream &OS) const{
     }
     OS << "\n";
   }
+
+  OS << "save/restore points:\n";
+
+  if (!SavePoints.empty()) {
+    OS << "save points:\n";
+
+    for (auto &item : SavePoints.get())
+      OS << printMBBReference(*item.first) << "\n";
+  } else
+    OS << "save points are empty\n";
+
+  if (!RestorePoints.empty()) {
+    OS << "restore points:\n";
+    for (auto &item : RestorePoints.get())
+      OS << printMBBReference(*item.first) << "\n";
----------------
arsenm wrote:

```suggestion
      OS << printMBBReference(*item.first) << '\n';
```

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


More information about the llvm-commits mailing list