projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add two statistics to help track how we are computing the inline cost.
[oota-llvm.git]
/
lib
/
Analysis
/
MemoryDependenceAnalysis.cpp
diff --git
a/lib/Analysis/MemoryDependenceAnalysis.cpp
b/lib/Analysis/MemoryDependenceAnalysis.cpp
index cfaf2da6ce5b29212761267fabf836e927d0441b..3a544f35d502cdb83d9441690e7d033c92cbffa8 100644
(file)
--- 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());
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());
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;
return false;
Captured = true;
return true;