projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
faf6df6
)
When disabling PRE for a value is directly redundant with itself
author
Dan Gohman
<dan433584@gmail.com>
Tue, 12 Feb 2013 19:05:10 +0000
(19:05 +0000)
committer
Dan Gohman
<dan433584@gmail.com>
Tue, 12 Feb 2013 19:05:10 +0000
(19:05 +0000)
(through a loop), don't continue to iterate through the reamining
predecessors.
llvm-svn: 174994
llvm/lib/Transforms/Scalar/GVN.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Transforms/Scalar/GVN.cpp
b/llvm/lib/Transforms/Scalar/GVN.cpp
index
0fe1096
..
ff55f6f
100644
(file)
--- a/
llvm/lib/Transforms/Scalar/GVN.cpp
+++ b/
llvm/lib/Transforms/Scalar/GVN.cpp
@@
-2455,7
+2455,9
@@
bool GVN::performPRE(Function &F) {
PREPred = P;
++NumWithout;
} else if (predV == CurInst) {
+ /* CurInst dominates this predecessor. */
NumWithout = 2;
+ break;
} else {
predMap[P] = predV;
++NumWith;