This is an archive of the discontinued LLVM Phabricator instance.

[TTI] Improve description of TargetCostKind enums to aid targets in choosing cost values
ClosedPublic

Authored by RKSimon on Aug 20 2022, 4:11 AM.

Details

Summary

I'm not sure how much to add to the description as we've tried to allow targets to interpret the TargetCostKind enums in their own way. But we need to make it clear that certain cost kinds need to match threshold numbers used by various passes (and vice-versa when passes are determining a cost-benefit threshold).

I'm not keen on the "The weighted sum of size and latency" description, but its very difficult to come up with anything else that's suitably generic (e.g. X86 will probably use uop counts here to easily work with LoopMicroOpBufferSize thresholds, even though high latency fdiv/fsqrt instructions still often have low uop counts).

This is likely to become a bikeshed discussion, but we need some clarity here :-)

Diff Detail

Event Timeline

RKSimon created this revision.Aug 20 2022, 4:11 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 20 2022, 4:11 AM
RKSimon requested review of this revision.Aug 20 2022, 4:11 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 20 2022, 4:11 AM
reames resigned from this revision.Aug 31 2022, 2:29 PM
samparker accepted this revision.Sep 1 2022, 2:20 AM

Seems fair enough to me.

This revision is now accepted and ready to land.Sep 1 2022, 2:20 AM