This is an archive of the discontinued LLVM Phabricator instance.

[IRCE][NFC] Set Index and End together inside parseRangeCheckICmp
ClosedPublic

Authored by aleksandr.popov on Jun 29 2023, 2:41 PM.

Details

Summary

Preparatory refactoring for the upcoming support of new range check form
to parse.

With this change we always set Index and End values together in the same
place.

parseRangeCheckICmp specification updated.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptJun 29 2023, 2:41 PM
aleksandr.popov requested review of this revision.Jun 29 2023, 2:41 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 29 2023, 2:41 PM
skatkov accepted this revision.Jul 2 2023, 9:29 PM

LGTM with nit.

llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
251–252

According to specification of this method if we return false, Index and End must be set to nullptr. I do not see this in the code.

Could please update specification or change to implementation accordingly.

I see only one usage of this method and it does not require to set Index and End to nullptr, so I guess that updating of specification is a right way to go.

This revision is now accepted and ready to land.Jul 2 2023, 9:29 PM
aleksandr.popov edited the summary of this revision. (Show Details)
aleksandr.popov marked an inline comment as done.