[llvm] [llvm] Support multiple save/restore points in mir (PR #119357)
Elizaveta Noskova via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 25 01:43:45 PDT 2025
================
@@ -1077,6 +1075,53 @@ 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) {
+ SMDiagnostic Error;
+ MachineBasicBlock *MBB = nullptr;
+ llvm::SaveRestorePoints::PointsMap SRPoints;
+ MachineFunction &MF = PFS.MF;
+ MachineFrameInfo &MFI = MF.getFrameInfo();
+
+ if (std::holds_alternative<std::vector<yaml::SaveRestorePointEntry>>(
+ YamlSRPoints)) {
+ const auto &VectorRepr =
+ std::get<std::vector<yaml::SaveRestorePointEntry>>(YamlSRPoints);
+ if (VectorRepr.empty())
+ return false;
+
+ for (const auto &Entry : VectorRepr) {
+ const auto &MBBSource = Entry.Point;
----------------
enoskova-sc wrote:
addressed
https://github.com/llvm/llvm-project/pull/119357
More information about the llvm-commits
mailing list