diff options
author | Owen Anderson <resistor@mac.com> | 2007-08-08 21:39:39 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2007-08-08 21:39:39 +0000 |
commit | b84d3b1c92251e7bc3f1587f813c7d5fface9156 (patch) | |
tree | eb4457a7292649ea497728929a49873d372b4d1b /llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp | |
parent | fd46badca5db8e7e8deb39746b2a1965b901e5db (diff) | |
download | bcm5719-llvm-b84d3b1c92251e7bc3f1587f813c7d5fface9156.tar.gz bcm5719-llvm-b84d3b1c92251e7bc3f1587f813c7d5fface9156.zip |
Change the None and NonLocal markers in memdep to be const.
llvm-svn: 40946
Diffstat (limited to 'llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp index 283fcbc97a1..8cdccc6827f 100644 --- a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp +++ b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp @@ -121,14 +121,14 @@ bool DSE::runOnBasicBlock(BasicBlock &BB) { // ... to a pointer that has been stored to before... if (last) { - Instruction* dep = MD.getDependency(BBI); + Instruction* dep = const_cast<Instruction*>(MD.getDependency(BBI)); // ... and no other memory dependencies are between them.... while (dep != MemoryDependenceAnalysis::None && dep != MemoryDependenceAnalysis::NonLocal && isa<StoreInst>(dep)) { if (dep != last) { - dep = MD.getDependency(BBI, dep); + dep = const_cast<Instruction*>(MD.getDependency(BBI, dep)); continue; } @@ -154,7 +154,7 @@ bool DSE::runOnBasicBlock(BasicBlock &BB) { if (FreeInst* F = dyn_cast<FreeInst>(BBI)) { if (!deletedStore) MadeChange |= handleFreeWithNonTrivialDependency(F, - MD.getDependency(F), + const_cast<Instruction*>(MD.getDependency(F)), possiblyDead); // No known stores after the free last = 0; |