[llvm] [llvm] Support multiple save/restore points in mir (PR #119357)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu May 1 08:15:38 PDT 2025
================
@@ -631,6 +631,61 @@ LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::yaml::CalledGlobal)
namespace llvm {
namespace yaml {
+// Struct representing one save/restore point in the
+// 'savePoint' / 'restorePoint' list. One point consist of machine basic block
+// name and list of saved/restored in this basic block registers. Generally
+// 'registers' is not obligatory field, if this field is not specified, it is
+// assumed to be equal to the list of all CalleeSavedRegisters, calculated
+// during PEI
+struct SaveRestorePointEntry {
+ StringValue Point;
+ std::vector<StringValue> Registers;
+
+ bool operator==(const SaveRestorePointEntry &Other) const {
+ return Point == Other.Point && Registers == Other.Registers;
+ }
+};
+
+using SaveRestorePoints =
+ std::variant<std::vector<SaveRestorePointEntry>, StringValue>;
----------------
arsenm wrote:
We should make no effort to maintain MIR backwards compatibility. As a diff reduction strategy, this can be part 1. But we should absolutely rip out the old form
https://github.com/llvm/llvm-project/pull/119357
More information about the llvm-commits
mailing list