diff options
Diffstat (limited to 'llvm/lib/Transforms/Utils/BasicBlockUtils.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/BasicBlockUtils.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp b/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp index 4b89b04..5983704 100644 --- a/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp +++ b/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp @@ -119,14 +119,7 @@ bool llvm::MergeBlockIntoPredecessor(BasicBlock *BB, DominatorTree *DT, LoopInfo *LI, MemoryDependenceResults *MemDep) { // Don't merge away blocks who have their address taken. - if (BB->hasAddressTaken()) { - // If the block has its address taken, it may be a tree of dead constants - // hanging off of it. These shouldn't keep the block alive. - BlockAddress *BA = BlockAddress::get(BB); - BA->removeDeadConstantUsers(); - if (!BA->use_empty()) - return false; - } + if (BB->hasAddressTaken()) return false; // Can't merge if there are multiple predecessors, or no predecessors. BasicBlock *PredBB = BB->getUniquePredecessor(); |