aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis/MemoryDependenceAnalysis.cpp
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2010-07-27 15:18:11 +0000
committerGabor Greif <ggreif@gmail.com>2010-07-27 15:18:11 +0000
commit49d0bca86c5e97613703f32e401cefd5745a8fce (patch)
tree2a428de155e30a8cd533d0ee5ed9b24c353946d4 /lib/Analysis/MemoryDependenceAnalysis.cpp
parent86099345db95fdce6960ab62fbd9cb0cf96875f7 (diff)
downloadexternal_llvm-49d0bca86c5e97613703f32e401cefd5745a8fce.zip
external_llvm-49d0bca86c5e97613703f32e401cefd5745a8fce.tar.gz
external_llvm-49d0bca86c5e97613703f32e401cefd5745a8fce.tar.bz2
back out r109504, breaks the bots
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109508 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/MemoryDependenceAnalysis.cpp')
-rw-r--r--lib/Analysis/MemoryDependenceAnalysis.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Analysis/MemoryDependenceAnalysis.cpp b/lib/Analysis/MemoryDependenceAnalysis.cpp
index 662752f..947a810 100644
--- a/lib/Analysis/MemoryDependenceAnalysis.cpp
+++ b/lib/Analysis/MemoryDependenceAnalysis.cpp
@@ -120,9 +120,10 @@ getCallSiteDependencyFrom(CallSite CS, bool isReadOnlyCall,
Pointer = CI->getArgOperand(0);
// calls to free() erase the entire structure
PointerSize = ~0ULL;
- } else if (CallSite InstCS = Inst) {
+ } else if (isa<CallInst>(Inst) || isa<InvokeInst>(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:
@@ -386,7 +387,7 @@ MemDepResult MemoryDependenceAnalysis::getDependency(Instruction *QueryInst) {
MemSize = cast<ConstantInt>(II->getArgOperand(1))->getZExtValue();
break;
default:
- CallSite QueryCS(QueryInst);
+ CallSite QueryCS = CallSite::get(QueryInst);
bool isReadOnly = AA->onlyReadsMemory(QueryCS);
LocalCache = getCallSiteDependencyFrom(QueryCS, isReadOnly, ScanPos,
QueryParent);