aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Analysis/MemoryDependenceAnalysis.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Analysis/MemoryDependenceAnalysis.cpp b/lib/Analysis/MemoryDependenceAnalysis.cpp
index eea0615..445e16d 100644
--- a/lib/Analysis/MemoryDependenceAnalysis.cpp
+++ b/lib/Analysis/MemoryDependenceAnalysis.cpp
@@ -451,8 +451,6 @@ void MemoryDependenceAnalysis::removeInstruction(Instruction* rem) {
// Figure out the new dep for things that currently depend on rem
Instruction* newDep = NonLocal;
- reverseDep[depGraphLocal[rem].first].erase(rem);
-
for (DenseMap<BasicBlock*, Value*>::iterator DI =
depGraphNonLocal[rem].begin(), DE = depGraphNonLocal[rem].end();
DI != DE; ++DI)
@@ -462,6 +460,8 @@ void MemoryDependenceAnalysis::removeInstruction(Instruction* rem) {
depMapType::iterator depGraphEntry = depGraphLocal.find(rem);
if (depGraphEntry != depGraphLocal.end()) {
+ reverseDep[depGraphLocal[rem].first].erase(rem);
+
if (depGraphEntry->second.first != NonLocal &&
depGraphEntry->second.second) {
// If we have dep info for rem, set them to it