diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-12-22 01:00:32 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-12-22 01:00:32 +0000 |
| commit | e960e8132df4ab505b9f8dc5f01ca2e7f5230316 (patch) | |
| tree | 3dd9b44faa56df9241c715b7db6fa473f60f8d0f /lib/Analysis/MemoryDependenceAnalysis.cpp | |
| parent | 129968a267cdb8d237d82b41de8b2eae39f28289 (diff) | |
| download | external_llvm-e960e8132df4ab505b9f8dc5f01ca2e7f5230316.zip external_llvm-e960e8132df4ab505b9f8dc5f01ca2e7f5230316.tar.gz external_llvm-e960e8132df4ab505b9f8dc5f01ca2e7f5230316.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.cpp | 3 |
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 || |
