This is an archive of the discontinued LLVM Phabricator instance.

[IRCE] Add NSW flag to main loop's indvar base
ClosedPublic

Authored by aleksandr.popov on Jul 11 2023, 5:24 AM.

Details

Summary

We have guarantees that induction variable will not overflow in the main
loop after the loop constrained. Therefore we can add no wrap flags on
its base in order not to miss info that loop is countable.

Add NSW flag now, since adding NUW flag requires a bit more complicated
analysis.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptJul 11 2023, 5:24 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
aleksandr.popov requested review of this revision.Jul 11 2023, 5:24 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 11 2023, 5:24 AM
aleksandr.popov edited the summary of this revision. (Show Details)Jul 11 2023, 7:26 AM
aleksandr.popov planned changes to this revision.Jul 11 2023, 4:16 PM
aleksandr.popov retitled this revision from [IRCE] Add no-wrap flags to main loop's indvar base to [IRCE] Add NSW flag to main loop's indvar base.
aleksandr.popov edited the summary of this revision. (Show Details)
skatkov accepted this revision.Jul 17 2023, 5:36 AM

Looks reasonable.

This revision is now accepted and ready to land.Jul 17 2023, 5:36 AM
This revision was automatically updated to reflect the committed changes.