diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2012-02-26 05:30:08 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2012-02-26 05:30:08 +0000 |
commit | 5465c9422f3d755f42c49fa1f635962412470e96 (patch) | |
tree | bad5a5652c6eb0bb2cb382082e515734c3f8a1d7 /lib/Analysis/MemoryDependenceAnalysis.cpp | |
parent | 34674743f518e7241fa7bb79a805b571f24e98a0 (diff) |
Don't call dominates on unreachable instructions. Should fix the dragonegg
build. Testcase is still reducing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151474 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/MemoryDependenceAnalysis.cpp')
-rw-r--r-- | lib/Analysis/MemoryDependenceAnalysis.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Analysis/MemoryDependenceAnalysis.cpp b/lib/Analysis/MemoryDependenceAnalysis.cpp index cfaf2da6ce..3a544f35d5 100644 --- a/lib/Analysis/MemoryDependenceAnalysis.cpp +++ b/lib/Analysis/MemoryDependenceAnalysis.cpp @@ -350,14 +350,18 @@ namespace { bool shouldExplore(Use *U) { Instruction *I = cast<Instruction>(U->getUser()); - if (BeforeHere != I && DT->dominates(BeforeHere, I)) + BasicBlock *BB = I->getParent(); + if (BeforeHere != I && + (!DT->isReachableFromEntry(BB) || DT->dominates(BeforeHere, I))) return false; return true; } bool captured(Use *U) { Instruction *I = cast<Instruction>(U->getUser()); - if (BeforeHere != I && DT->dominates(BeforeHere, I)) + BasicBlock *BB = I->getParent(); + if (BeforeHere != I && + (!DT->isReachableFromEntry(BB) || DT->dominates(BeforeHere, I))) return false; Captured = true; return true; |