summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/MemorySSAUpdater.cpp
diff options
context:
space:
mode:
authorDaniel Berlin <dberlin@dberlin.org>2017-09-27 05:35:19 +0000
committerDaniel Berlin <dberlin@dberlin.org>2017-09-27 05:35:19 +0000
commit97f34e887fe295834754f9b0a29e3b28b67c8da9 (patch)
treec4145523c478e5e6b6884ea542f0a3abfe4483f1 /llvm/lib/Analysis/MemorySSAUpdater.cpp
parent31ccd4727bfe7314e622cf8f24e4203964c168ef (diff)
downloadbcm5719-llvm-97f34e887fe295834754f9b0a29e3b28b67c8da9.tar.gz
bcm5719-llvm-97f34e887fe295834754f9b0a29e3b28b67c8da9.zip
MemorySSAUpdater: Only add phis to insertedphis if we actually inserted them, not if we just found existing ones
llvm-svn: 314273
Diffstat (limited to 'llvm/lib/Analysis/MemorySSAUpdater.cpp')
-rw-r--r--llvm/lib/Analysis/MemorySSAUpdater.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/MemorySSAUpdater.cpp b/llvm/lib/Analysis/MemorySSAUpdater.cpp
index 1ff84471c09..f28f8bd6bce 100644
--- a/llvm/lib/Analysis/MemorySSAUpdater.cpp
+++ b/llvm/lib/Analysis/MemorySSAUpdater.cpp
@@ -85,12 +85,11 @@ MemoryAccess *MemorySSAUpdater::getPreviousDefRecursive(BasicBlock *BB) {
unsigned i = 0;
for (auto *Pred : predecessors(BB))
Phi->addIncoming(PhiOps[i++], Pred);
+ InsertedPHIs.push_back(Phi);
}
-
Result = Phi;
}
- if (MemoryPhi *MP = dyn_cast<MemoryPhi>(Result))
- InsertedPHIs.push_back(MP);
+
// Set ourselves up for the next variable by resetting visited state.
VisitedBlocks.erase(BB);
return Result;
OpenPOWER on IntegriCloud