summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorXin Tong <trent.xin.tong@gmail.com>2018-06-18 23:20:08 +0000
committerXin Tong <trent.xin.tong@gmail.com>2018-06-18 23:20:08 +0000
commit54b4227f32dee17c8e1f21e9ab7dea9f8dba3f40 (patch)
treeee057b0d4e30cb748d8bca0a3cfa2d2bd3b71d96 /llvm/lib/Transforms
parentbfd8cfcb8dffbcf3b4ecdb5cad00d07fda4310f9 (diff)
downloadbcm5719-llvm-54b4227f32dee17c8e1f21e9ab7dea9f8dba3f40.tar.gz
bcm5719-llvm-54b4227f32dee17c8e1f21e9ab7dea9f8dba3f40.zip
Revert "Simplify blockaddress usage before giving up in MergeBlockIntoPredecessor"
This reverts commit f976cf4cca0794267f28b54e468007fd476d37d9. I am reverting this because it causes break in a few bots and its going to take me sometime to look at this. llvm-svn: 334993
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Utils/BasicBlockUtils.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp b/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
index 4b89b0435e0..59837042550 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();
OpenPOWER on IntegriCloud