Page MenuHomePhabricator

[MemorySSA] Don't optimize incomplete phis.
ClosedPublic

Authored by asbirlea on Mar 28 2019, 3:13 PM.

Details

Summary

MemoryPhis cannot be optimized out until they are complete.
Resolves PR41254.

Diff Detail

Repository
rL LLVM

Event Timeline

asbirlea created this revision.Mar 28 2019, 3:13 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 28 2019, 3:13 PM

Thanks for this!

lib/Analysis/MemorySSAUpdater.cpp
315 ↗(On Diff #192725)

Should these be removed from NonOptPhis at some point later (e.g., around line 326)? Or is that done for us elsewhere?

asbirlea marked 2 inline comments as done.Mar 29 2019, 11:52 AM
asbirlea added inline comments.
lib/Analysis/MemorySSAUpdater.cpp
315 ↗(On Diff #192725)

I believe it's removed in fixupDefs().
All phis added in the IDF are then moved to the FixupList and then fixupDefs() is called on them, where they should be "fixed" and removed from NonOptPhis.

LGTM modulo one nit; thanks again!

lib/Analysis/MemorySSAUpdater.cpp
315 ↗(On Diff #192725)

Please add a comment to that effect here, then

This revision is now accepted and ready to land.Mar 29 2019, 12:19 PM
This revision was automatically updated to reflect the committed changes.
asbirlea marked an inline comment as done.