aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis/MemoryDependenceAnalysis.cpp
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
commit9b96ecaffa38a21eaca81c51153475152f44d8a7 (patch)
tree3dd9b44faa56df9241c715b7db6fa473f60f8d0f /lib/Analysis/MemoryDependenceAnalysis.cpp
parenta25bc446639300f341305f4e6df684cf78632ec8 (diff)
downloadexternal_llvm-9b96ecaffa38a21eaca81c51153475152f44d8a7.zip
external_llvm-9b96ecaffa38a21eaca81c51153475152f44d8a7.tar.gz
external_llvm-9b96ecaffa38a21eaca81c51153475152f44d8a7.tar.bz2
avoid calling extractMallocCall when it's obvious we don't have
a call. This speeds up memdep ~1.5% git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91869 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/MemoryDependenceAnalysis.cpp')
-rw-r--r--lib/Analysis/MemoryDependenceAnalysis.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Analysis/MemoryDependenceAnalysis.cpp b/lib/Analysis/MemoryDependenceAnalysis.cpp
index 743420b..d7b0b64 100644
--- a/lib/Analysis/MemoryDependenceAnalysis.cpp
+++ b/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 ||