]> granicus.if.org Git - llvm/commit
[MemorySSA] Check that block is reachable when adding phis.
authorAlina Sbirlea <asbirlea@google.com>
Thu, 2 May 2019 23:41:58 +0000 (23:41 +0000)
committerAlina Sbirlea <asbirlea@google.com>
Thu, 2 May 2019 23:41:58 +0000 (23:41 +0000)
commit15bfdc5aa556cbf4093a674e5b24181def0ff773
tree9f302540575f3289975971a284a4d6f637e0fdc6
parentfa0da850cf08eaffb84cb1480a27efa63c63fd14
[MemorySSA] Check that block is reachable when adding phis.

Summary:
Originally the insertDef method was only used when building MemorySSA, and was limiting the number of Phi nodes that it created.
Now it's used for updates as well, and it can create additional Phis needed for correctness.
Make sure no Phis are created in unreachable blocks (condition met during MSSA build), otherwise the renamePass will find a null DTNode.

Resolves PR41640.

Reviewers: george.burgess.iv

Subscribers: jlebar, Prazek, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359845 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/MemorySSA.cpp
lib/Analysis/MemorySSAUpdater.cpp
test/Analysis/MemorySSA/pr41640.ll [new file with mode: 0644]