aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp')
-rw-r--r--llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp15
1 files changed, 0 insertions, 15 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp b/llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp
index 478e45b..3e3be53 100644
--- a/llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp
+++ b/llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp
@@ -1777,21 +1777,6 @@ void CHR::cloneScopeBlocks(CHRScope *Scope,
BasicBlock *NewBB = CloneBasicBlock(BB, VMap, ".nonchr", &F);
NewBlocks.push_back(NewBB);
VMap[BB] = NewBB;
-
- // Unreachable predecessors will not be cloned and will not have an edge
- // to the cloned block. As such, also remove them from any phi nodes.
- // To avoid iterator invalidation, first collect the dead predecessors
- // from the first phi node, and then perform the actual removal.
- SmallVector<BasicBlock *> DeadPreds;
- for (PHINode &PN : NewBB->phis()) {
- for (BasicBlock *Pred : PN.blocks())
- if (!DT.isReachableFromEntry(Pred))
- DeadPreds.push_back(Pred);
- break;
- }
- for (PHINode &PN : make_early_inc_range(NewBB->phis()))
- for (BasicBlock *Pred : DeadPreds)
- PN.removeIncomingValue(Pred);
}
// Place the cloned blocks right after the original blocks (right before the