summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/RedundantLoadElimination.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/Scalar/RedundantLoadElimination.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/RedundantLoadElimination.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/RedundantLoadElimination.cpp b/llvm/lib/Transforms/Scalar/RedundantLoadElimination.cpp
index 3b719df4f6e..2dace31e300 100644
--- a/llvm/lib/Transforms/Scalar/RedundantLoadElimination.cpp
+++ b/llvm/lib/Transforms/Scalar/RedundantLoadElimination.cpp
@@ -80,7 +80,7 @@ bool RLE::runOnBasicBlock(BasicBlock &BB) {
LoadInst*& last = lastLoad[pointer];
// ... to a pointer that has been loaded from before...
- Instruction* dep = MD.getDependency(BBI);
+ Instruction* dep = const_cast<Instruction*>(MD.getDependency(BBI));
bool deletedLoad = false;
while (dep != MemoryDependenceAnalysis::None &&
@@ -120,7 +120,7 @@ bool RLE::runOnBasicBlock(BasicBlock &BB) {
break;
} else {
- dep = MD.getDependency(BBI, dep);
+ dep = const_cast<Instruction*>(MD.getDependency(BBI, dep));
}
}
OpenPOWER on IntegriCloud