This is an archive of the discontinued LLVM Phabricator instance.

[IndVars] Use exit count up to current block when handing ANDs/ORs
Needs ReviewPublic

Authored by mkazantsev on Jan 12 2023, 3:50 AM.

Details

Summary

When analyzing exit conditions joined through AND/OR, use exit count
computed not for current block, but for all blocks from loop start and up
to the current block together. It is not actually required to know that the
current block will exit to skip the last iteration optimistically, it is enough
to know that we will exit on this block or earlier.

Diff Detail

Event Timeline

mkazantsev created this revision.Jan 12 2023, 3:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 12 2023, 3:50 AM
mkazantsev requested review of this revision.Jan 12 2023, 3:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 12 2023, 3:50 AM
mkazantsev retitled this revision from [WIP] Enhanced logic for AND's to [IndVars] Use exit count up to current block when handing ANDs/ORs.Jan 17 2023, 4:50 AM
mkazantsev edited the summary of this revision. (Show Details)
mkazantsev added reviewers: nikic, lebedev.ri, reames, fhahn.
mkazantsev planned changes to this revision.Jan 31 2023, 11:02 PM

This needs rebase afrer underlying code changed a lot.

mkazantsev updated this revision to Diff 493864.Feb 1 2023, 1:05 AM