This is an archive of the discontinued LLVM Phabricator instance.

[GVN] Common code for local and non-local load availability [NFCI]
ClosedPublic

Authored by reames on Jan 26 2016, 3:23 PM.

Details

Summary

The attached patch removes all of the block local code for performing X-load forwarding by reusing the code used in the non-local case.

The motivation here is to remove duplication and in the process increase our test coverage of some fairly tricky code. I have some upcoming changes I'll be proposing in this area and wanted to have the code cleaned up a bit first.

I landed 258882 separately in preparation to this change. Feel free to comment here if there's something in that you don't care for.

Diff Detail

Repository
rL LLVM

Event Timeline

reames updated this revision to Diff 46062.Jan 26 2016, 3:23 PM
reames retitled this revision from to [In Progress][GVN] Common code for local and non-local load availability.
reames updated this object.
reames added reviewers: dberlin, hfinkel, sanjoy.
reames added a subscriber: llvm-commits.
dberlin edited edge metadata.Jan 26 2016, 3:35 PM

I'm more than happy to have someone clean this up, and overall, i think this is a good way to go.

lib/Transforms/Scalar/GVN.cpp
1324 ↗(On Diff #46062)

Yeah, i also independently discovered this was broken if you tried to use the function anywhere outside of it's current callers :)

Landed the first cleanup change in this direction:
Sending lib/Transforms/Scalar/GVN.cpp
Transmitting file data .
Committed revision 258882.

Now to split AnalzeLoadAvailability using the new abstractions.

reames updated this revision to Diff 46078.Jan 26 2016, 4:41 PM
reames retitled this revision from [In Progress][GVN] Common code for local and non-local load availability to [GVN] Common code for local and non-local load availability [NFCI].
reames updated this object.
reames edited edge metadata.
reames updated this revision to Diff 46080.Jan 26 2016, 4:45 PM

Add a minor clarifying comment.

FYI, much of the substantial review discussion on this has ended up here: http://reviews.llvm.org/rL258882

dberlin accepted this revision.Jan 29 2016, 9:47 AM
dberlin edited edge metadata.
This revision is now accepted and ready to land.Jan 29 2016, 9:47 AM
This revision was automatically updated to reflect the committed changes.