[llvm-commits] [llvm] r151474 - /llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp
Rafael Espindola
rafael.espindola at gmail.com
Sat Feb 25 21:30:09 PST 2012
Author: rafael
Date: Sat Feb 25 23:30:08 2012
New Revision: 151474
URL: http://llvm.org/viewvc/llvm-project?rev=151474&view=rev
Log:
Don't call dominates on unreachable instructions. Should fix the dragonegg
build. Testcase is still reducing.
Modified:
llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp
Modified: llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp?rev=151474&r1=151473&r2=151474&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp (original)
+++ llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp Sat Feb 25 23:30:08 2012
@@ -350,14 +350,18 @@
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;
More information about the llvm-commits
mailing list