[llvm] be00190 - [TII][X86] Do not schedule frame-setup/frame-destory instructions (#96611)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 26 02:09:02 PDT 2024
Author: Haohai Wen
Date: 2024-06-26T17:08:59+08:00
New Revision: be00190ce35807c8586ee4e2e61507fc0221e825
URL: https://github.com/llvm/llvm-project/commit/be00190ce35807c8586ee4e2e61507fc0221e825
DIFF: https://github.com/llvm/llvm-project/commit/be00190ce35807c8586ee4e2e61507fc0221e825.diff
LOG: [TII][X86] Do not schedule frame-setup/frame-destory instructions (#96611)
frame-setup/frame-destroy instruction can not be scheduled around by
PostRAScheduler. Their order is critical for SEH.
Added:
Modified:
llvm/lib/Target/X86/X86InstrInfo.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86InstrInfo.cpp b/llvm/lib/Target/X86/X86InstrInfo.cpp
index 1a43d5c17080e..069a1ec9a5988 100644
--- a/llvm/lib/Target/X86/X86InstrInfo.cpp
+++ b/llvm/lib/Target/X86/X86InstrInfo.cpp
@@ -8832,6 +8832,11 @@ bool X86InstrInfo::isSchedulingBoundary(const MachineInstr &MI,
Opcode == X86::PLDTILECFGV)
return true;
+ // Frame setup and destory can't be scheduled around.
+ if (MI.getFlag(MachineInstr::FrameSetup) ||
+ MI.getFlag(MachineInstr::FrameDestroy))
+ return true;
+
return TargetInstrInfo::isSchedulingBoundary(MI, MBB, MF);
}
More information about the llvm-commits
mailing list