This is an archive of the discontinued LLVM Phabricator instance.

[IRCE] Handle loops with step different from 1/-1
ClosedPublic

Authored by mkazantsev on Jul 18 2017, 3:33 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

mkazantsev created this revision.Jul 18 2017, 3:33 AM
anna edited edge metadata.Jul 19 2017, 4:51 PM

The change generally looks good to me. I'll take a closer look tomorrow. Some minor comments inline.

lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
807 ↗(On Diff #107045)

Pls Add a comment here that we calculate StepCI and whether the step is increasing or not (apart from identifying if AR is an IV).

821 ↗(On Diff #107045)

could you pls check this assert in as NFC.

1594 ↗(On Diff #107045)

NFC assert here can be checked in separately (with the above NFC assert).

anna accepted this revision.Jul 25 2017, 1:28 PM

changes LGTM w/ comments above addressed.

This revision is now accepted and ready to land.Jul 25 2017, 1:28 PM

Thanks Anna! I will check in these changes as NFCs once underlying patch https://reviews.llvm.org/D35302 is merged (on review currently).

mkazantsev added inline comments.Jul 31 2017, 11:50 PM
lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
821 ↗(On Diff #107045)
1594 ↗(On Diff #107045)
mkazantsev updated this revision to Diff 109084.Aug 1 2017, 4:52 AM
mkazantsev marked an inline comment as done.

Rebased after underlying patch update, added comments.

This revision was automatically updated to reflect the committed changes.