forked from OSchip/llvm-project
parent
9a152e2570
commit
e91765fdbb
|
@ -373,21 +373,22 @@ MemDepResult MemoryDependenceAnalysis::getDependency(Instruction *QueryInst) {
|
||||||
IntrinsicID = II->getIntrinsicID();
|
IntrinsicID = II->getIntrinsicID();
|
||||||
|
|
||||||
switch (IntrinsicID) {
|
switch (IntrinsicID) {
|
||||||
case Intrinsic::lifetime_start:
|
case Intrinsic::lifetime_start:
|
||||||
case Intrinsic::lifetime_end:
|
case Intrinsic::lifetime_end:
|
||||||
case Intrinsic::invariant_start:
|
case Intrinsic::invariant_start:
|
||||||
MemPtr = QueryInst->getOperand(2);
|
MemPtr = QueryInst->getOperand(2);
|
||||||
MemSize = cast<ConstantInt>(QueryInst->getOperand(1))->getZExtValue();
|
MemSize = cast<ConstantInt>(QueryInst->getOperand(1))->getZExtValue();
|
||||||
break;
|
break;
|
||||||
case Intrinsic::invariant_end:
|
case Intrinsic::invariant_end:
|
||||||
MemPtr = QueryInst->getOperand(3);
|
MemPtr = QueryInst->getOperand(3);
|
||||||
MemSize = cast<ConstantInt>(QueryInst->getOperand(2))->getZExtValue();
|
MemSize = cast<ConstantInt>(QueryInst->getOperand(2))->getZExtValue();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
CallSite QueryCS = CallSite::get(QueryInst);
|
CallSite QueryCS = CallSite::get(QueryInst);
|
||||||
bool isReadOnly = AA->onlyReadsMemory(QueryCS);
|
bool isReadOnly = AA->onlyReadsMemory(QueryCS);
|
||||||
LocalCache = getCallSiteDependencyFrom(QueryCS, isReadOnly, ScanPos,
|
LocalCache = getCallSiteDependencyFrom(QueryCS, isReadOnly, ScanPos,
|
||||||
QueryParent);
|
QueryParent);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Non-memory instruction.
|
// Non-memory instruction.
|
||||||
|
|
Loading…
Reference in New Issue