Page MenuHomePhabricator

[TTI] NFC: Change getScalingFactorCost to return InstructionCost

Authored by sdesmalen on Thu, Apr 15, 7:19 AM.



This patch migrates the TTI cost interfaces to return an InstructionCost.

See this patch for the introduction of the type:
See this thread for context:

Diff Detail

Event Timeline

sdesmalen created this revision.Thu, Apr 15, 7:19 AM
sdesmalen requested review of this revision.Thu, Apr 15, 7:19 AM
Herald added a project: Restricted Project. · View Herald TranscriptThu, Apr 15, 7:19 AM
paulwalker-arm accepted this revision.Mon, Apr 19, 5:01 AM

One comment about preexisting possibly redundant code so the patch looks good to me.


I can see that TargetTransformInfo::getScalingFactorCost already performs the >=0 test and so I'm wondering if at this point you only need to assert the costs are valid?

This revision is now accepted and ready to land.Mon, Apr 19, 5:01 AM
sdesmalen marked an inline comment as done.Thu, Apr 22, 5:49 AM
sdesmalen added inline comments.

You're right, those checks seem redundant. I'll remove them before submitting the patch.

This revision was automatically updated to reflect the committed changes.
sdesmalen marked an inline comment as done.