[MemorySSA] Fix phi insertion when inserting a def.
authorAlina Sbirlea <asbirlea@google.com>
Tue, 17 Sep 2019 16:33:35 +0000 (16:33 +0000)
committerAlina Sbirlea <asbirlea@google.com>
Tue, 17 Sep 2019 16:33:35 +0000 (16:33 +0000)
commit4e9082ef95db5d760df4cce00a4351fa122176d6
tree3877aeaae23bdc752e2346e0d1c33303c0c69628
parent6b2d1346d8ed4c47fb61a249e0bb246dc9731144
[MemorySSA] Fix phi insertion when inserting a def.

Summary:
When inserting a Def, the current algorithm is walking edges backward
and inserting new Phis where needed. There may be additional Phis needed
in the IDF of the newly inserted Def and Phis.
Adding Phis in the IDF of the Def was added ina  previous patch, but we
may also need other Phis in the IDF of the newly added Phis.

Reviewers: george.burgess.iv

Subscribers: Prazek, sanjoy.google, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D67637

llvm-svn: 372138
llvm/lib/Analysis/MemorySSAUpdater.cpp
llvm/test/Analysis/MemorySSA/pr43320.ll [new file with mode: 0644]