[llvm] [CodeGen] Use first EHLabel as a stop gate for live range shrinking (PR #114195)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 31 05:01:17 PDT 2024
================
@@ -125,14 +135,19 @@ bool LiveRangeShrink::runOnMachineFunction(MachineFunction &MF) {
if (MBB.empty())
continue;
bool SawStore = false;
+ bool IsEHPad = MBB.isEHPad();
+ MachineInstr *EHBarrier = nullptr;
BuildInstOrderMap(MBB.begin(), IOM);
UseMap.clear();
for (MachineBasicBlock::iterator Next = MBB.begin(); Next != MBB.end();) {
MachineInstr &MI = *Next;
++Next;
+
if (MI.isPHI() || MI.isDebugOrPseudoInstr())
continue;
+ if (IsEHPad && !EHBarrier && MI.isEHLabel())
----------------
MuellerMP wrote:
Well it could have been using it if we did not want to check for labels but in my fix i use the first ehlabel to determine the start of the landingpad.
https://github.com/llvm/llvm-project/pull/114195
More information about the llvm-commits
mailing list