[llvm] [llvm] Support multiple save/restore points in mir (PR #119357)
Michael Maitland via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 14 06:26:16 PST 2025
================
@@ -1058,8 +1053,28 @@ bool MIRParserImpl::initializeConstantPool(PerFunctionMIParsingState &PFS,
return false;
}
-bool MIRParserImpl::initializeJumpTableInfo(PerFunctionMIParsingState &PFS,
- const yaml::MachineJumpTable &YamlJTI) {
+bool MIRParserImpl::initializeSaveRestorePoints(
+ PerFunctionMIParsingState &PFS, const yaml::SaveRestorePoints &YamlSRP,
+ bool IsSavePoints) {
+ MachineFunction &MF = PFS.MF;
+ MachineFrameInfo &MFI = MF.getFrameInfo();
+
+ if (!YamlSRP.empty()) {
+ const auto &Entry = YamlSRP.front();
+ const auto &MBBSource = Entry.Point;
+ MachineBasicBlock *MBB = nullptr;
+ if (parseMBBReference(PFS, MBB, MBBSource.Value))
+ return true;
+ if (IsSavePoints)
+ MFI.setSavePoint(MBB);
+ else
+ MFI.setRestorePoint(MBB);
+ }
+ return false;
+}
+
+bool MIRParserImpl::initializeJumpTableInfo(
----------------
michaelmaitland wrote:
Looks like formatting unrelated to this patch occurred?
https://github.com/llvm/llvm-project/pull/119357
More information about the llvm-commits
mailing list