projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cfa9419
)
Make PRE actually handle critical edges (by splitting them). Confirmed that bootstra...
author
Owen Anderson
<resistor@mac.com>
Fri, 18 Jul 2008 18:03:38 +0000
(18:03 +0000)
committer
Owen Anderson
<resistor@mac.com>
Fri, 18 Jul 2008 18:03:38 +0000
(18:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53762
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Scalar/GVN.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Scalar/GVN.cpp
b/lib/Transforms/Scalar/GVN.cpp
index 4e4d8c127e3809eac86d38a5b85ae5b0f8e4ea4f..c66454636551888ba70c7f4b21a83066c3b9a7d1 100644
(file)
--- a/
lib/Transforms/Scalar/GVN.cpp
+++ b/
lib/Transforms/Scalar/GVN.cpp
@@
-1136,8
+1136,11
@@
bool GVN::runOnFunction(Function& F) {
changed |= shouldContinue;
}
- if (EnablePRE)
- changed |= performPRE(F);
+ if (EnablePRE) {
+ bool PREChanged = false;
+ while (PREChanged = performPRE(F))
+ changed |= PREChanged;
+ }
return changed;
}
@@
-1336,7
+1339,7
@@
bool GVN::performPRE(Function& F) {
I = toSplit.begin(), E = toSplit.end(); I != E; ++I)
SplitCriticalEdge(I->first, I->second, this);
- return changed;
+ return changed
|| toSplit.size()
;
}
// iterateOnFunction - Executes one iteration of GVN