This is an archive of the discontinued LLVM Phabricator instance.

[MemorySSA] Port to new pass manager
ClosedPublic

Authored by gberry on Apr 28 2016, 8:32 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

gberry updated this revision to Diff 55422.Apr 28 2016, 8:32 AM
gberry retitled this revision from to [MemorySSA] Port to new pass manager.
gberry updated this object.
gberry added a subscriber: llvm-commits.

Hi Justin,

I see that you've been active in converting passes to the new pass manager, could you possibly take a look at this change?

FWIW, this looks sane to me. That said, I don't know enough about the new pass manager to LGTM this, so I'd wait for someone with more context to give you a thumbs up before committing it.

Thanks for the patch. :)

gberry updated this revision to Diff 58431.May 25 2016, 8:40 AM
gberry edited edge metadata.

Update to address review comments.

Get rid of second layer of caching, split verify<memoryssa> into
separate pass, make MemorySSA computation eager instead of lazy.

include/llvm/Transforms/Utils/MemorySSA.h
592 ↗(On Diff #58431)

FWIW, I think Danny wasn't a massive fan of MSSA owning the caching walker. I don't fully recall why, though.

Yeah, i don't either.
At this point, why don't we just have it own the caching walker and see
what it breaks.

I know we almost certainly want walkers that memoryssa doesn't own (see bug
27740 - the best way i can think of to do this is to have a walker that GVN
uses and understands GVN's specific value equivalence knowledge )

george.burgess.iv edited edge metadata.

Yeah, i don't either.
At this point, why don't we just have it own the caching walker and see what it breaks

WFM.

Given that the concerns that people had seem to have all been fully addressed, this LGTM. Thanks for the patch!

This revision is now accepted and ready to land.Jun 1 2016, 11:59 AM
gberry updated this revision to Diff 59269.Jun 1 2016, 1:31 PM
gberry edited edge metadata.

Update the MemorySSAWalker's MemorySSA pointer in the MemorySSA move
constructor so it doesn't point to the moved-from MemorySSA object.

gberry added a comment.Jun 1 2016, 1:33 PM

Thanks, I'll go ahead and commit this. See my comment below for one last detail.

lib/Transforms/Utils/MemorySSA.cpp
218 ↗(On Diff #59269)

This bit was missing from the previous version, and given the discussion on MemorySSAWalker ownership I thought I should call it out explicitly.

This revision was automatically updated to reflect the committed changes.