This is an archive of the discontinued LLVM Phabricator instance.

[NFC][LoopVectorize] Simplify preferPredicateOverEpilogue interface
ClosedPublic

Authored by david-arm on Mar 15 2023, 4:38 AM.

Details

Summary

Given just how many arguments we pass to
preferPredicateOverEpilogue and considering this list may
grow over time I've decided to pass in a pointer to a new
TailFoldingInfo structure instead, similar to what we do
with IntrinsicCostAttributes, etc. In addition, many of the
arguments we pass in are actually available in the
LoopVectorizationLegality class so I've managed to
reduce the set of pointers that we need to pass in the
TailFoldingInfo struct.

Diff Detail

Event Timeline

david-arm created this revision.Mar 15 2023, 4:38 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 15 2023, 4:38 AM
david-arm requested review of this revision.Mar 15 2023, 4:38 AM
david-arm updated this revision to Diff 508135.Mar 24 2023, 9:29 AM
david-arm edited the summary of this revision. (Show Details)
  • Introduced a new TailFoldingInfo structure at the suggestion of @paulwalker-arm on D146128 as I think this makes sense.
paulwalker-arm accepted this revision.Apr 3 2023, 10:21 AM
This revision is now accepted and ready to land.Apr 3 2023, 10:21 AM
fhahn added a subscriber: fhahn.Apr 5 2023, 2:15 AM
fhahn added inline comments.
llvm/include/llvm/Analysis/TargetTransformInfo.h
595

Is there any reason TFI cannot be passed as reference/const reference? This would make the interface more robust by ruling out null pointers as arguments.