mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-18 11:24:01 +00:00
rename some variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60241 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -97,35 +97,35 @@ getCallSiteDependency(CallSite C, BasicBlock::iterator ScanIt,
|
|||||||
Instruction *Inst = --ScanIt;
|
Instruction *Inst = --ScanIt;
|
||||||
|
|
||||||
// If this inst is a memory op, get the pointer it accessed
|
// If this inst is a memory op, get the pointer it accessed
|
||||||
Value* pointer = 0;
|
Value *Pointer = 0;
|
||||||
uint64_t pointerSize = 0;
|
uint64_t PointerSize = 0;
|
||||||
if (StoreInst* S = dyn_cast<StoreInst>(Inst)) {
|
if (StoreInst *S = dyn_cast<StoreInst>(Inst)) {
|
||||||
pointer = S->getPointerOperand();
|
Pointer = S->getPointerOperand();
|
||||||
pointerSize = TD.getTypeStoreSize(S->getOperand(0)->getType());
|
PointerSize = TD.getTypeStoreSize(S->getOperand(0)->getType());
|
||||||
} else if (AllocationInst* AI = dyn_cast<AllocationInst>(Inst)) {
|
} else if (AllocationInst *AI = dyn_cast<AllocationInst>(Inst)) {
|
||||||
pointer = AI;
|
Pointer = AI;
|
||||||
if (ConstantInt* C = dyn_cast<ConstantInt>(AI->getArraySize()))
|
if (ConstantInt *C = dyn_cast<ConstantInt>(AI->getArraySize()))
|
||||||
pointerSize = C->getZExtValue() *
|
PointerSize = C->getZExtValue() *
|
||||||
TD.getTypeStoreSize(AI->getAllocatedType());
|
TD.getTypeStoreSize(AI->getAllocatedType());
|
||||||
else
|
else
|
||||||
pointerSize = ~0UL;
|
PointerSize = ~0UL;
|
||||||
} else if (VAArgInst* V = dyn_cast<VAArgInst>(Inst)) {
|
} else if (VAArgInst *V = dyn_cast<VAArgInst>(Inst)) {
|
||||||
pointer = V->getOperand(0);
|
Pointer = V->getOperand(0);
|
||||||
pointerSize = TD.getTypeStoreSize(V->getType());
|
PointerSize = TD.getTypeStoreSize(V->getType());
|
||||||
} else if (FreeInst* F = dyn_cast<FreeInst>(Inst)) {
|
} else if (FreeInst *F = dyn_cast<FreeInst>(Inst)) {
|
||||||
pointer = F->getPointerOperand();
|
Pointer = F->getPointerOperand();
|
||||||
|
|
||||||
// FreeInsts erase the entire structure
|
// FreeInsts erase the entire structure
|
||||||
pointerSize = ~0UL;
|
PointerSize = ~0UL;
|
||||||
} else if (CallSite::get(Inst).getInstruction() != 0) {
|
} else if (isa<CallInst>(Inst) || isa<InvokeInst>(Inst)) {
|
||||||
if (AA.getModRefBehavior(CallSite::get(Inst)) !=
|
if (AA.getModRefBehavior(CallSite::get(Inst)) ==
|
||||||
AliasAnalysis::DoesNotAccessMemory)
|
AliasAnalysis::DoesNotAccessMemory)
|
||||||
return MemDepResult::get(Inst);
|
continue;
|
||||||
continue;
|
return MemDepResult::get(Inst);
|
||||||
} else
|
} else
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (AA.getModRefInfo(C, pointer, pointerSize) != AliasAnalysis::NoModRef)
|
if (AA.getModRefInfo(C, Pointer, PointerSize) != AliasAnalysis::NoModRef)
|
||||||
return MemDepResult::get(Inst);
|
return MemDepResult::get(Inst);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user