diff options
| author | Chris Lattner <sabre@nondot.org> | 2011-04-26 21:50:51 +0000 | 
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2011-04-26 21:50:51 +0000 | 
| commit | 6b96621a8a2e55e447e4cc64cb16558e74f42a4e (patch) | |
| tree | 2a316256d17483858dc548141eb6a3e7b0f45ada /llvm/lib/Analysis | |
| parent | 0c69fd276063f80a39b885a60d7275391f9a314a (diff) | |
| download | bcm5719-llvm-6b96621a8a2e55e447e4cc64cb16558e74f42a4e.tar.gz bcm5719-llvm-6b96621a8a2e55e447e4cc64cb16558e74f42a4e.zip | |
remove support for llvm.invariant.end from memdep.  It is a 
work-in-progress that is not progressing, and it has issues.
llvm-svn: 130247
Diffstat (limited to 'llvm/lib/Analysis')
| -rw-r--r-- | llvm/lib/Analysis/MemoryDependenceAnalysis.cpp | 37 | 
1 files changed, 0 insertions, 37 deletions
| diff --git a/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp b/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp index c8c4b4c6fcb..cb3260990ae 100644 --- a/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp +++ b/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp @@ -229,37 +229,14 @@ MemDepResult MemoryDependenceAnalysis::  getPointerDependencyFrom(const AliasAnalysis::Location &MemLoc, bool isLoad,                            BasicBlock::iterator ScanIt, BasicBlock *BB) { -  Value *InvariantTag = 0; -    // Walk backwards through the basic block, looking for dependencies.    while (ScanIt != BB->begin()) {      Instruction *Inst = --ScanIt; -    // If we're in an invariant region, no dependencies can be found before -    // we pass an invariant-begin marker. -    if (InvariantTag == Inst) { -      InvariantTag = 0; -      continue; -    } -          if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(Inst)) {        // Debug intrinsics don't (and can't) cause dependences.        if (isa<DbgInfoIntrinsic>(II)) continue; -      // If we pass an invariant-end marker, then we've just entered an -      // invariant region and can start ignoring dependencies. -      if (II->getIntrinsicID() == Intrinsic::invariant_end) { -        // FIXME: This only considers queries directly on the invariant-tagged -        // pointer, not on query pointers that are indexed off of them.  It'd -        // be nice to handle that at some point. -        AliasAnalysis::AliasResult R = -          AA->alias(AliasAnalysis::Location(II->getArgOperand(2)), MemLoc); -        if (R == AliasAnalysis::MustAlias) -          InvariantTag = II->getArgOperand(0); - -        continue; -      } -        // If we reach a lifetime begin or end marker, then the query ends here        // because the value is undefined.        if (II->getIntrinsicID() == Intrinsic::lifetime_start) { @@ -274,13 +251,6 @@ getPointerDependencyFrom(const AliasAnalysis::Location &MemLoc, bool isLoad,        }      } -    // If we're querying on a load and we're in an invariant region, we're done -    // at this point. Nothing a load depends on can live in an invariant region. -    // -    // FIXME: this will prevent us from returning load/load must-aliases, so GVN -    // won't remove redundant loads. -    if (isLoad && InvariantTag) 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)) { @@ -315,10 +285,6 @@ getPointerDependencyFrom(const AliasAnalysis::Location &MemLoc, bool isLoad,      }      if (StoreInst *SI = dyn_cast<StoreInst>(Inst)) { -      // There can't be stores to the value we care about inside an  -      // invariant region. -      if (InvariantTag) continue; -              // If alias analysis can tell that this store is guaranteed to not modify        // the query pointer, ignore it.  Use getModRefInfo to handle cases where        // the query pointer points to constant memory etc. @@ -363,9 +329,6 @@ getPointerDependencyFrom(const AliasAnalysis::Location &MemLoc, bool isLoad,        // If the call has no effect on the queried pointer, just ignore it.        continue;      case AliasAnalysis::Mod: -      // If we're in an invariant region, we can ignore calls that ONLY -      // modify the pointer. -      if (InvariantTag) continue;        return MemDepResult::getClobber(Inst);      case AliasAnalysis::Ref:        // If the call is known to never store to the pointer, and if this is a | 

