summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-12-22 01:00:32 +0000
committerChris Lattner <sabre@nondot.org>2009-12-22 01:00:32 +0000
commit2ee6787c1b9eec52ad96f9394361b2db4bcfcffa (patch)
tree071fb373a72a7fd84a1dc870d4970616b267c264 /llvm/lib
parent463e10cbd53aceb554b0d62fdad3554cc9816246 (diff)
downloadbcm5719-llvm-2ee6787c1b9eec52ad96f9394361b2db4bcfcffa.tar.gz
bcm5719-llvm-2ee6787c1b9eec52ad96f9394361b2db4bcfcffa.zip
avoid calling extractMallocCall when it's obvious we don't have
a call. This speeds up memdep ~1.5% llvm-svn: 91869
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Analysis/MemoryDependenceAnalysis.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp b/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
index 743420b5b80..d7b0b64ea97 100644
--- a/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
+++ b/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
@@ -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 ||
OpenPOWER on IntegriCloud