diff options
author | Dan Gohman <dan433584@gmail.com> | 2013-02-12 19:05:10 +0000 |
---|---|---|
committer | Dan Gohman <dan433584@gmail.com> | 2013-02-12 19:05:10 +0000 |
commit | 2001cd8f9e8695695852b416cf1e454f0a026ea3 (patch) | |
tree | 764d2577eaa4a355444fdf04766dd29d89372da4 /llvm/lib/Transforms | |
parent | faf6df6e6ecb5b3b4d209fdfe944c7592df37e3f (diff) | |
download | bcm5719-llvm-2001cd8f9e8695695852b416cf1e454f0a026ea3.tar.gz bcm5719-llvm-2001cd8f9e8695695852b416cf1e454f0a026ea3.zip |
When disabling PRE for a value is directly redundant with itself
(through a loop), don't continue to iterate through the reamining
predecessors.
llvm-svn: 174994
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/Scalar/GVN.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/GVN.cpp b/llvm/lib/Transforms/Scalar/GVN.cpp index 0fe10960cc7..ff55f6fc2f2 100644 --- 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; |