aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2010-07-27 22:02:00 +0000
committerGabor Greif <ggreif@gmail.com>2010-07-27 22:02:00 +0000
commitef1ca24b916a776131008c52a43e1a28f62fec2c (patch)
tree0ee374c016f7cd505a837a99408265909e59783f /llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
parent4fac280618b557da36206a8082dced5ac1439eb0 (diff)
downloadllvm-ef1ca24b916a776131008c52a43e1a28f62fec2c.zip
llvm-ef1ca24b916a776131008c52a43e1a28f62fec2c.tar.gz
llvm-ef1ca24b916a776131008c52a43e1a28f62fec2c.tar.bz2
recommit simplification (originally r109504, backed out in r109508) now that problem in CallSiteBase is fixed
llvm-svn: 109547
Diffstat (limited to 'llvm/lib/Analysis/MemoryDependenceAnalysis.cpp')
-rw-r--r--llvm/lib/Analysis/MemoryDependenceAnalysis.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp b/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
index 947a810..662752f 100644
--- a/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
+++ b/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
@@ -120,10 +120,9 @@ getCallSiteDependencyFrom(CallSite CS, bool isReadOnlyCall,
Pointer = CI->getArgOperand(0);
// calls to free() erase the entire structure
PointerSize = ~0ULL;
- } else if (isa<CallInst>(Inst) || isa<InvokeInst>(Inst)) {
+ } else if (CallSite InstCS = Inst) {
// Debug intrinsics don't cause dependences.
if (isa<DbgInfoIntrinsic>(Inst)) continue;
- CallSite InstCS = CallSite::get(Inst);
// If these two calls do not interfere, look past it.
switch (AA->getModRefInfo(CS, InstCS)) {
case AliasAnalysis::NoModRef:
@@ -387,7 +386,7 @@ MemDepResult MemoryDependenceAnalysis::getDependency(Instruction *QueryInst) {
MemSize = cast<ConstantInt>(II->getArgOperand(1))->getZExtValue();
break;
default:
- CallSite QueryCS = CallSite::get(QueryInst);
+ CallSite QueryCS(QueryInst);
bool isReadOnly = AA->onlyReadsMemory(QueryCS);
LocalCache = getCallSiteDependencyFrom(QueryCS, isReadOnly, ScanPos,
QueryParent);