[llvm] a1551fd - FastISel: remove EH_LABEL skipping code.
James Y Knight via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 16 15:16:56 PST 2023
Author: James Y Knight
Date: 2023-01-16T18:15:00-05:00
New Revision: a1551fdd4888790c65a108e47a7713d8f6837483
URL: https://github.com/llvm/llvm-project/commit/a1551fdd4888790c65a108e47a7713d8f6837483
DIFF: https://github.com/llvm/llvm-project/commit/a1551fdd4888790c65a108e47a7713d8f6837483.diff
LOG: FastISel: remove EH_LABEL skipping code.
This was intended to skip past the EH_LABEL which is added at the top
of a landingpad block. But, it is unnecessary because `LastLocalValue`
is already set to point past the EH_LABEL in that case.
Thus, currently, this is dead-code. I am removing it because it _also_
attempts to skip over EH_LABELs emitted around a call. Currently, this
situation never arises, but it becomes harmful after a future
in-progress commit.
Added:
Modified:
llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
index bc48d168d7171..36c749ceb5a1d 100644
--- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
@@ -405,11 +405,6 @@ void FastISel::recomputeInsertPt() {
++FuncInfo.InsertPt;
} else
FuncInfo.InsertPt = FuncInfo.MBB->getFirstNonPHI();
-
- // Now skip past any EH_LABELs, which must remain at the beginning.
- while (FuncInfo.InsertPt != FuncInfo.MBB->end() &&
- FuncInfo.InsertPt->getOpcode() == TargetOpcode::EH_LABEL)
- ++FuncInfo.InsertPt;
}
void FastISel::removeDeadCode(MachineBasicBlock::iterator I,
More information about the llvm-commits
mailing list