diff options
| author | Gabor Greif <ggreif@gmail.com> | 2010-07-09 14:48:08 +0000 |
|---|---|---|
| committer | Gabor Greif <ggreif@gmail.com> | 2010-07-09 14:48:08 +0000 |
| commit | 42a16633e6d4dd0b0bb5da4aafcad429de2466c6 (patch) | |
| tree | b5c6bee6589636ff4072535a254de1c15331d04e /lib/Transforms | |
| parent | 5dc4d4ead57a86fd220c552d84b7b6d72f375a9d (diff) | |
| download | external_llvm-42a16633e6d4dd0b0bb5da4aafcad429de2466c6.zip external_llvm-42a16633e6d4dd0b0bb5da4aafcad429de2466c6.tar.gz external_llvm-42a16633e6d4dd0b0bb5da4aafcad429de2466c6.tar.bz2 | |
cache result of operator* (found by inspection)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107971 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
| -rw-r--r-- | lib/Transforms/Scalar/GVN.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/GVN.cpp b/lib/Transforms/Scalar/GVN.cpp index 8b656dc..88b6776 100644 --- a/lib/Transforms/Scalar/GVN.cpp +++ b/lib/Transforms/Scalar/GVN.cpp @@ -2214,8 +2214,10 @@ bool GVN::performPRE(Function &F) { CurInst->getName() + ".pre-phi", CurrentBlock->begin()); for (pred_iterator PI = pred_begin(CurrentBlock), - PE = pred_end(CurrentBlock); PI != PE; ++PI) - Phi->addIncoming(predMap[*PI], *PI); + PE = pred_end(CurrentBlock); PI != PE; ++PI) { + BasicBlock *P = *PI; + Phi->addIncoming(predMap[P], P); + } VN.add(Phi, ValNo); localAvail[CurrentBlock]->table[ValNo] = Phi; |
