[llvm] [llvm] Support multiple save/restore points in mir (PR #119357)
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 19 14:06:10 PST 2025
================
@@ -1077,6 +1075,41 @@ bool MIRParserImpl::initializeConstantPool(PerFunctionMIParsingState &PFS,
return false;
}
+// Return true if basic block was incorrectly specified in MIR
+bool MIRParserImpl::initializeSaveRestorePoints(
+ PerFunctionMIParsingState &PFS, const yaml::SaveRestorePoints &YamlSRPoints,
+ bool IsSavePoints) {
+ MachineBasicBlock *MBB = nullptr;
+ if (std::holds_alternative<std::vector<yaml::SaveRestorePointEntry>>(
+ YamlSRPoints)) {
+ const auto &VectorRepr =
+ std::get<std::vector<yaml::SaveRestorePointEntry>>(YamlSRPoints);
+ if (VectorRepr.empty())
+ return false;
+
+ const auto &Entry = VectorRepr.front();
----------------
preames wrote:
Unless I'm missing something from the code structure, you're only parsing the first bb reference here. Also, you don't seem to have any tests for round tripping MIR with multiple save restore points.
https://github.com/llvm/llvm-project/pull/119357
More information about the llvm-commits
mailing list