Eliminate a redundant check. This speeds up optimization of 253.perlbmk from 13.5 seconds to 10.9 seconds.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37683 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Owen Anderson 2007-06-21 01:59:05 +00:00
parent 9cb56014ce
commit 58e087b6e3

View File

@ -887,13 +887,9 @@ bool GVNPRE::buildsets_anticin(BasicBlock* BB,
// However, for opaques, such as constants within PHI nodes, it is
// possible that they have not yet received a number. Make sure they do
// so now.
uint32_t valNum = 0;
if (isa<BinaryOperator>(*I) || isa<CmpInst>(*I))
valNum = VN.lookup(*I);
else
valNum = VN.lookup_or_add(*I);
if (find_leader(anticIn, valNum) == 0)
val_insert(anticIn, *I);
if (!isa<BinaryOperator>(*I) && !isa<CmpInst>(*I))
VN.lookup_or_add(*I);
val_insert(anticIn, *I);
}
clean(anticIn);