simplify this code again, try 2 :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47319 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2008-02-19 06:52:38 +00:00
parent 9cffa9a6ed
commit 0a76a621a4

View File

@ -1220,13 +1220,11 @@ bool GVN::processInstruction(Instruction* I,
if (dep == MemoryDependenceAnalysis::None ||
dep == MemoryDependenceAnalysis::NonLocal)
return false;
else if (CallInst* C = dyn_cast<CallInst>(dep)) {
if (!isa<MemCpyInst>(C))
return performReturnSlotOptzn(M, C, toErase);
} else if (!isa<MemCpyInst>(dep))
return false;
return processMemCpy(M, cast<MemCpyInst>(dep), toErase);
if (isa<MemCpyInst>(dep))
return processMemCpy(M, cast<MemCpyInst>(dep), toErase);
if (CallInst* C = dyn_cast<CallInst>(dep))
return performReturnSlotOptzn(M, C, toErase);
return false;
}
unsigned num = VN.lookup_or_add(I);