Make NonLocal and None const in the right way. :-)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40961 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Owen Anderson
2007-08-09 04:42:44 +00:00
parent c9d123dca9
commit 9528f11481
5 changed files with 30 additions and 32 deletions

View File

@@ -803,7 +803,7 @@ bool GVN::processNonLocalLoad(LoadInst* L,
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
@@ -856,7 +856,7 @@ bool GVN::processLoad(LoadInst* L,
// ... 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);
@@ -895,7 +895,7 @@ bool GVN::processLoad(LoadInst* L,
break;
} else {
dep = const_cast<Instruction*>(MD.getDependency(L, dep));
dep = MD.getDependency(L, dep);
}
}