This is an archive of the discontinued LLVM Phabricator instance.

[NewGVN] Make sure we do not add a user to itself.
ClosedPublic

Authored by fhahn on Aug 23 2018, 8:53 AM.

Details

Summary

If we simplify an instruction to itself, we do not need to add a user to
itself. For congruence classes with a defining expression, we already
use a similar logic.

Fixes PR38259.

Diff Detail

Event Timeline

fhahn created this revision.Aug 23 2018, 8:53 AM
efriedma resigned from this revision.Oct 31 2018, 4:36 PM

I don't really know the relevant code well enough, and I don't think I'll have time to study it in the near future.

You might want to ask on llvmdev to see if there's anyone interested in reviewing NewGVN patches.

I'll take a look early next week. Sorry, I don't work on scalar optimizations anymore on llvm these days, so I need to page this code in again.

fhahn added a comment.Nov 1 2018, 9:17 AM

I don't really know the relevant code well enough, and I don't think I'll have time to study it in the near future.

You might want to ask on llvmdev to see if there's anyone interested in reviewing NewGVN patches.

@efriedma thanks for all the reviews you did already for NewGVN related changes, I really appreciate it! Thanks for the suggestion, I guess I could prepare a few additional patches and send some kind of status update with them to llvmdev.

I'll take a look early next week. Sorry, I don't work on scalar optimizations anymore on llvm these days, so I need to page this code in again.

That would be great!

davide accepted this revision.Nov 7 2018, 6:53 AM

LGTM.

This revision is now accepted and ready to land.Nov 7 2018, 6:53 AM
This revision was automatically updated to reflect the committed changes.
fhahn added a comment.Nov 7 2018, 10:17 AM

Thank you very much Davide :) In case you are interested in reviewing another small NewGVN patch, there would be D51595.