[llvm] r314273 - MemorySSAUpdater: Only add phis to insertedphis if we actually inserted them, not if we just found existing ones
Daniel Berlin via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 26 22:35:19 PDT 2017
Author: dannyb
Date: Tue Sep 26 22:35:19 2017
New Revision: 314273
URL: http://llvm.org/viewvc/llvm-project?rev=314273&view=rev
Log:
MemorySSAUpdater: Only add phis to insertedphis if we actually inserted them, not if we just found existing ones
Modified:
llvm/trunk/lib/Analysis/MemorySSAUpdater.cpp
Modified: llvm/trunk/lib/Analysis/MemorySSAUpdater.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/MemorySSAUpdater.cpp?rev=314273&r1=314272&r2=314273&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/MemorySSAUpdater.cpp (original)
+++ llvm/trunk/lib/Analysis/MemorySSAUpdater.cpp Tue Sep 26 22:35:19 2017
@@ -85,12 +85,11 @@ MemoryAccess *MemorySSAUpdater::getPrevi
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;
More information about the llvm-commits
mailing list