This is an archive of the discontinued LLVM Phabricator instance.

Clarify invariants of software pipelining hooks
ClosedPublic

Authored by thopre on Mar 29 2022, 3:04 AM.

Details

Summary

PowerPC backend relies on each pair of prologue/epilogue of a software
pipelined loop to correspond to a single iteration a the loop through
its use of the BDZ instruction to skip inner prologues/epilogues and
loop kernel. However the interface does not make it clear that it is a
valid way to check that the trip count is big enough to execute inner
prologues/epilogues and kernel loop.

The API also does not specify in which order of prologues the
createTripCountGreaterCondition() hook is being called. Knowing that it
starts with the last/innermost prologues can help recording some
information when createTripCountGreaterCondition() is first executed and
reuse it in setPreheader() or adjustTripCount().

This commit documents both aspects.

Diff Detail

Event Timeline

thopre created this revision.Mar 29 2022, 3:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 29 2022, 3:04 AM
thopre requested review of this revision.Mar 29 2022, 3:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 29 2022, 3:04 AM
jmolloy accepted this revision.Mar 29 2022, 3:39 AM
This revision is now accepted and ready to land.Mar 29 2022, 3:39 AM
This revision was landed with ongoing or failed builds.Mar 29 2022, 3:44 AM
This revision was automatically updated to reflect the committed changes.