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 | 8cad423d94fd7e30d84742311c454016f36e3ee3 (patch) | |
tree | f4f9158e439003d42a82dec6adb5b974504ee867 /lib/Transforms/Scalar/DeadStoreElimination.cpp | |
parent | d2887e4dcd23783f702d2b7804aeeac71dc2a10b (diff) | |
download | external_llvm-8cad423d94fd7e30d84742311c454016f36e3ee3.zip external_llvm-8cad423d94fd7e30d84742311c454016f36e3ee3.tar.gz external_llvm-8cad423d94fd7e30d84742311c454016f36e3ee3.tar.bz2 |
Change the None and NonLocal markers in memdep to be const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40946 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/DeadStoreElimination.cpp')
-rw-r--r-- | lib/Transforms/Scalar/DeadStoreElimination.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Transforms/Scalar/DeadStoreElimination.cpp b/lib/Transforms/Scalar/DeadStoreElimination.cpp index 283fcbc..8cdccc6 100644 --- a/lib/Transforms/Scalar/DeadStoreElimination.cpp +++ b/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; |