return false;
} else if (I->second == MemoryDependenceAnalysis::NonLocal) {
continue;
- } else if (StoreInst* S = dyn_cast<StoreInst>(I->second)) {
+ }else if (StoreInst* S = dyn_cast<StoreInst>(I->second)) {
if (S->getPointerOperand() == L->getPointerOperand())
repl[I->first] = S->getOperand(0);
else
// ... to a pointer that has been loaded from before...
MemoryDependenceAnalysis& MD = getAnalysis<MemoryDependenceAnalysis>();
- Instruction* dep = const_cast<Instruction*>(MD.getDependency(L));
+ Instruction* dep = MD.getDependency(L);
if (dep == MemoryDependenceAnalysis::NonLocal &&
L->getParent() != &L->getParent()->getParent()->getEntryBlock())
processNonLocalLoad(L, toErase);
break;
} else {
- dep = const_cast<Instruction*>(MD.getDependency(L, dep));
+ dep = MD.getDependency(L, dep);
}
}