diff options
author | Owen Anderson <resistor@mac.com> | 2009-03-09 05:12:38 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-03-09 05:12:38 +0000 |
commit | f6cec85a4b40094fc8fd5182d88cd01e92f12444 (patch) | |
tree | 25eb43fc9df63bf3b32482869f31aca47b34d908 /lib/Analysis/MemoryDependenceAnalysis.cpp | |
parent | d7168ddb116c2e9aa1f8325ae887eb63d6003037 (diff) |
Ignore debug intrinsics when computing dependences.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66399 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/MemoryDependenceAnalysis.cpp')
-rw-r--r-- | lib/Analysis/MemoryDependenceAnalysis.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Analysis/MemoryDependenceAnalysis.cpp b/lib/Analysis/MemoryDependenceAnalysis.cpp index 6af365b76a..9ce7ca9c9d 100644 --- a/lib/Analysis/MemoryDependenceAnalysis.cpp +++ b/lib/Analysis/MemoryDependenceAnalysis.cpp @@ -18,6 +18,7 @@ #include "llvm/Analysis/MemoryDependenceAnalysis.h" #include "llvm/Constants.h" #include "llvm/Instructions.h" +#include "llvm/IntrinsicInst.h" #include "llvm/Function.h" #include "llvm/Analysis/AliasAnalysis.h" #include "llvm/ADT/Statistic.h" @@ -121,6 +122,8 @@ getCallSiteDependencyFrom(CallSite CS, bool isReadOnlyCall, // FreeInsts erase the entire structure PointerSize = ~0ULL; } else if (isa<CallInst>(Inst) || isa<InvokeInst>(Inst)) { + // Debug intrinsics don't cause dependences. + if (isa<DbgInfoIntrinsic>(Inst)) break; CallSite InstCS = CallSite::get(Inst); // If these two calls do not interfere, look past it. switch (AA->getModRefInfo(CS, InstCS)) { @@ -175,6 +178,9 @@ getPointerDependencyFrom(Value *MemPtr, uint64_t MemSize, bool isLoad, while (ScanIt != BB->begin()) { Instruction *Inst = --ScanIt; + // Debug intrinsics don't cause dependences. + if (isa<DbgInfoIntrinsic>(Inst)) continue; + // Values depend on loads if the pointers are must aliased. This means that // a load depends on another must aliased load from the same value. if (LoadInst *LI = dyn_cast<LoadInst>(Inst)) { |