diff options
author | Logan Chien <loganchien@google.com> | 2011-11-25 08:46:08 +0800 |
---|---|---|
committer | Logan Chien <loganchien@google.com> | 2011-11-25 13:43:44 +0800 |
commit | 1429059dc0129c1cec938c29d6fce89e14293241 (patch) | |
tree | ec4c55e5138c7eb9ad0313d4af895ad0c56d0978 /lib/Analysis/MemoryDependenceAnalysis.cpp | |
parent | 1035c3e84815607b4f8994cab03ae62cc8519a63 (diff) | |
parent | 705f2431a086bbe662bca0035938e774378de3ec (diff) | |
download | external_llvm-1429059dc0129c1cec938c29d6fce89e14293241.zip external_llvm-1429059dc0129c1cec938c29d6fce89e14293241.tar.gz external_llvm-1429059dc0129c1cec938c29d6fce89e14293241.tar.bz2 |
Merge with LLVM upstream r145126 (Nov 25th 2011)
Change-Id: I30d08ae004a4c3c74092ad2537ab30cce4280e1d
Diffstat (limited to 'lib/Analysis/MemoryDependenceAnalysis.cpp')
-rw-r--r-- | lib/Analysis/MemoryDependenceAnalysis.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/Analysis/MemoryDependenceAnalysis.cpp b/lib/Analysis/MemoryDependenceAnalysis.cpp index 323c84f..704e27b 100644 --- a/lib/Analysis/MemoryDependenceAnalysis.cpp +++ b/lib/Analysis/MemoryDependenceAnalysis.cpp @@ -336,7 +336,7 @@ getLoadLoadClobberFullWidthSize(const Value *MemLocBase, int64_t MemLocOffs, namespace { /// Only find pointer captures which happen before the given instruction. Uses /// the dominator tree to determine whether one instruction is before another. - struct CapturesBefore { + struct CapturesBefore : public CaptureTracker { CapturesBefore(const Instruction *I, DominatorTree *DT) : BeforeHere(I), DT(DT), Captured(false) {} @@ -375,13 +375,13 @@ MemoryDependenceAnalysis::getModRefInfo(const Instruction *Inst, // with a smarter AA in place, this test is just wasting compile time. if (!DT) return AliasAnalysis::ModRef; const Value *Object = GetUnderlyingObject(MemLoc.Ptr, TD); - if (!isIdentifiedObject(Object) || isa<GlobalVariable>(Object)) + if (!isIdentifiedObject(Object) || isa<GlobalValue>(Object)) return AliasAnalysis::ModRef; ImmutableCallSite CS(Inst); if (!CS.getInstruction()) return AliasAnalysis::ModRef; CapturesBefore CB(Inst, DT); - llvm::PointerMayBeCaptured(Object, CB); + llvm::PointerMayBeCaptured(Object, &CB); if (isa<Constant>(Object) || CS.getInstruction() == Object || CB.Captured) return AliasAnalysis::ModRef; @@ -393,8 +393,7 @@ MemoryDependenceAnalysis::getModRefInfo(const Instruction *Inst, // pointer were passed to arguments that were neither of these, then it // couldn't be no-capture. if (!(*CI)->getType()->isPointerTy() || - (!CS.paramHasAttr(ArgNo+1, Attribute::NoCapture) && - !CS.paramHasAttr(ArgNo+1, Attribute::ByVal))) + (!CS.doesNotCapture(ArgNo) && !CS.isByValArgument(ArgNo))) continue; // If this is a no-capture pointer argument, see if we can tell that it |