avoid calling extractMallocCall when it's obvious we don't have

a call.  This speeds up memdep ~1.5%

llvm-svn: 91869
This commit is contained in:
Chris Lattner 2009-12-22 01:00:32 +00:00
parent 463e10cbd5
commit 2ee6787c1b
1 changed files with 2 additions and 1 deletions

View File

@ -275,7 +275,8 @@ getPointerDependencyFrom(Value *MemPtr, uint64_t MemSize, bool isLoad,
// a subsequent bitcast of the malloc call result. There can be stores to
// the malloced memory between the malloc call and its bitcast uses, and we
// need to continue scanning until the malloc call.
if (isa<AllocaInst>(Inst) || extractMallocCall(Inst)) {
if (isa<AllocaInst>(Inst) ||
(isa<CallInst>(Inst) && extractMallocCall(Inst))) {
Value *AccessPtr = MemPtr->getUnderlyingObject();
if (AccessPtr == Inst ||