1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00

simplify some code.

llvm-svn: 82936
This commit is contained in:
Chris Lattner 2009-09-27 21:46:50 +00:00
parent 75a5d76294
commit 2a85cfd972

View File

@ -1822,7 +1822,7 @@ bool GVN::processInstruction(Instruction *I,
// Allocations are always uniquely numbered, so we can save time and memory
// by fast failing them.
} else if (isa<AllocationInst>(I) || isMalloc(I) || isa<TerminatorInst>(I)) {
} else if (isa<AllocationInst>(I) || isa<TerminatorInst>(I)) {
localAvail[I->getParent()]->table.insert(std::make_pair(Num, I));
return false;
}
@ -1987,7 +1987,7 @@ bool GVN::performPRE(Function& F) {
BE = CurrentBlock->end(); BI != BE; ) {
Instruction *CurInst = BI++;
if (isa<AllocationInst>(CurInst) || isMalloc(CurInst) ||
if (isa<AllocationInst>(CurInst) ||
isa<TerminatorInst>(CurInst) || isa<PHINode>(CurInst) ||
(CurInst->getType() == Type::getVoidTy(F.getContext())) ||
CurInst->mayReadFromMemory() || CurInst->mayHaveSideEffects() ||