summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2007-08-09 04:42:44 +0000
committerOwen Anderson <resistor@mac.com>2007-08-09 04:42:44 +0000
commit9b1cc8cac02708a2d046774d9890c96be8be9368 (patch)
tree62830b1841370d64266bfec31bce4a84645e2893 /llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
parent42e3e5bec1606c2acc7eb36dc2a1ec6088397dc3 (diff)
downloadbcm5719-llvm-9b1cc8cac02708a2d046774d9890c96be8be9368.tar.gz
bcm5719-llvm-9b1cc8cac02708a2d046774d9890c96be8be9368.zip
Make NonLocal and None const in the right way. :-)
llvm-svn: 40961
Diffstat (limited to 'llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
index 8cdccc6827f..283fcbc97a1 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 = const_cast<Instruction*>(MD.getDependency(BBI));
+ Instruction* dep = 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 = const_cast<Instruction*>(MD.getDependency(BBI, dep));
+ dep = 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,
- const_cast<Instruction*>(MD.getDependency(F)),
+ MD.getDependency(F),
possiblyDead);
// No known stores after the free
last = 0;
OpenPOWER on IntegriCloud