[llvm] de172ef - [CFIInstrInserter] Delete unneeded checks
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sat May 23 14:13:44 PDT 2020
Author: Fangrui Song
Date: 2020-05-23T14:13:31-07:00
New Revision: de172ef61eab6776c1dbeb5f669e40272e388473
URL: https://github.com/llvm/llvm-project/commit/de172ef61eab6776c1dbeb5f669e40272e388473
DIFF: https://github.com/llvm/llvm-project/commit/de172ef61eab6776c1dbeb5f669e40272e388473.diff
LOG: [CFIInstrInserter] Delete unneeded checks
Added:
Modified:
llvm/lib/CodeGen/CFIInstrInserter.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/CFIInstrInserter.cpp b/llvm/lib/CodeGen/CFIInstrInserter.cpp
index 548ae255ad11..cb9f8f2e0184 100644
--- a/llvm/lib/CodeGen/CFIInstrInserter.cpp
+++ b/llvm/lib/CodeGen/CFIInstrInserter.cpp
@@ -173,10 +173,7 @@ void CFIInstrInserter::calculateCFAInfo(MachineFunction &MF) {
// on the assumption that the first block in the function is the entry block
// i.e. that it has initial cfa offset and register values as incoming CFA
// information.
- for (MachineBasicBlock &MBB : MF) {
- if (MBBVector[MBB.getNumber()].Processed) continue;
- updateSuccCFAInfo(MBBVector[MBB.getNumber()]);
- }
+ updateSuccCFAInfo(MBBVector[MF.front().getNumber()]);
}
void CFIInstrInserter::calculateOutgoingCFAInfo(MBBCFAInfo &MBBInfo) {
@@ -280,9 +277,6 @@ void CFIInstrInserter::updateSuccCFAInfo(MBBCFAInfo &MBBInfo) {
do {
MachineBasicBlock *Current = Stack.pop_back_val();
MBBCFAInfo &CurrentInfo = MBBVector[Current->getNumber()];
- if (CurrentInfo.Processed)
- continue;
-
calculateOutgoingCFAInfo(CurrentInfo);
for (auto *Succ : CurrentInfo.MBB->successors()) {
MBBCFAInfo &SuccInfo = MBBVector[Succ->getNumber()];
More information about the llvm-commits
mailing list