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 | f9a9cf96a18969019c39f34259a9746fa56fa872 (patch) | |
| tree | e9c109ce11018ac5debb73bcc5edea3e604f104b /llvm/lib/Analysis | |
| parent | 0eab5ecb71bf05fffa1a5e0a0b6f1b3cc4173709 (diff) | |
| download | bcm5719-llvm-f9a9cf96a18969019c39f34259a9746fa56fa872.tar.gz bcm5719-llvm-f9a9cf96a18969019c39f34259a9746fa56fa872.zip  | |
Ignore debug intrinsics when computing dependences.
llvm-svn: 66399
Diffstat (limited to 'llvm/lib/Analysis')
| -rw-r--r-- | llvm/lib/Analysis/MemoryDependenceAnalysis.cpp | 6 | 
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp b/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp index 6af365b76a9..9ce7ca9c9d2 100644 --- a/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp +++ b/llvm/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)) {  | 

