cache result of operator* (found by inspection)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107971 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Gabor Greif 2010-07-09 14:48:08 +00:00
parent 7c71b81a4f
commit 1d3ae029c4

View File

@ -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;