This is an archive of the discontinued LLVM Phabricator instance.

[SCEV] Look through invertible functions when infering no-self-wrap from mustprogres
AbandonedPublic

Authored by reames on Nov 18 2021, 10:31 AM.

Details

Summary

This is an extension to the logic introduced with D103991. The basic idea is that any invertible function of a repeating sequence is itself a repeating sequence, and that since invertible functions are 1-to-1, we can conclude that a wrapped IV can't cycle.

Note that this only shows benefit for predicated SCEV results. The missing piece to directly influence trip counts is rebuilding the invertible chain using the newly inferred flags. That'll be a separate change. :)

Diff Detail

Event Timeline

reames created this revision.Nov 18 2021, 10:31 AM
reames requested review of this revision.Nov 18 2021, 10:31 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 18 2021, 10:31 AM
reames abandoned this revision.Nov 24 2021, 2:30 PM

Will reopen when I get time to return to this. Closing in the meantime to get off review queues.