This is an archive of the discontinued LLVM Phabricator instance.

[MemorySSA] Check that block is reachable when adding phis.
ClosedPublic

Authored by asbirlea on May 1 2019, 4:13 PM.

Details

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.

Diff Detail

Repository
rL LLVM

Event Timeline

asbirlea created this revision.May 1 2019, 4:13 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 1 2019, 4:13 PM
Herald added subscribers: Prazek, jlebar. · View Herald Transcript
asbirlea updated this revision to Diff 197669.May 1 2019, 4:22 PM

Added -S.

asbirlea updated this revision to Diff 197885.May 2 2019, 3:59 PM

Updated to not insert phis in unreachable blocks.

george.burgess.iv accepted this revision.May 2 2019, 4:03 PM

Thanks!

test/Analysis/MemorySSA/pr41640.ll
1 ↗(On Diff #197885)

; REQUIRES: asserts, please

This revision is now accepted and ready to land.May 2 2019, 4:03 PM
asbirlea edited the summary of this revision. (Show Details)May 2 2019, 4:33 PM
asbirlea retitled this revision from [MemorySSA] Check that block is reachable when renaming. to [MemorySSA] Check that block is reachable when adding phis..
This revision was automatically updated to reflect the committed changes.