This is an archive of the discontinued LLVM Phabricator instance.

[Target][CodeGen] Remove default CostKind arguments on inner/impl TTI overrides
ClosedPublic

Authored by RKSimon on Sep 22 2021, 6:17 AM.

Details

Summary

Based off a discussion on D110100, we should be avoiding default CostKinds whenever possible.

This initial patch removes them from the 'inner' target implementation callbacks - these should only be used by the main TTI calls, so this should guarantee that we don't cause changes in CostKind by missing it in an inner call. This exposed a few missing arguments in getGEPCost and reduction cost calls that I've cleaned up.

Diff Detail

Event Timeline

RKSimon created this revision.Sep 22 2021, 6:17 AM
RKSimon requested review of this revision.Sep 22 2021, 6:17 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 22 2021, 6:17 AM
Herald added a subscriber: aheejin. · View Herald Transcript
fhahn accepted this revision.Sep 22 2021, 6:21 AM

LGTM, thanks! Looks like this has been already highlighted a use case where CostKind has not been passed through correctly.

This revision is now accepted and ready to land.Sep 22 2021, 6:21 AM
This revision was landed with ongoing or failed builds.Sep 22 2021, 7:35 AM
This revision was automatically updated to reflect the committed changes.