summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/MemorySSA.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/Utils/MemorySSA.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/MemorySSA.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/MemorySSA.cpp b/llvm/lib/Transforms/Utils/MemorySSA.cpp
index 8013b4a4c7b..f7dc7444d4a 100644
--- a/llvm/lib/Transforms/Utils/MemorySSA.cpp
+++ b/llvm/lib/Transforms/Utils/MemorySSA.cpp
@@ -231,7 +231,7 @@ MemorySSAWalker *MemorySSA::buildMemorySSA(AliasAnalysis *AA,
assert(!this->AA && !this->DT &&
"MemorySSA without a walker already has AA or DT?");
- auto *Result = new CachingMemorySSAWalker(this, AA, DT);
+ Walker = new CachingMemorySSAWalker(this, AA, DT);
this->AA = AA;
this->DT = DT;
@@ -343,7 +343,7 @@ MemorySSAWalker *MemorySSA::buildMemorySSA(AliasAnalysis *AA,
for (auto &MA : *Accesses) {
if (auto *MU = dyn_cast<MemoryUse>(&MA)) {
Instruction *Inst = MU->getMemoryInst();
- MU->setDefiningAccess(Result->getClobberingMemoryAccess(Inst));
+ MU->setDefiningAccess(Walker->getClobberingMemoryAccess(Inst));
}
}
}
@@ -354,7 +354,6 @@ MemorySSAWalker *MemorySSA::buildMemorySSA(AliasAnalysis *AA,
if (!Visited.count(&BB))
markUnreachableAsLiveOnEntry(&BB);
- Walker = Result;
return Walker;
}
OpenPOWER on IntegriCloud