This is an archive of the discontinued LLVM Phabricator instance.

[TTI] NFC: Change getVectorSplitCost to return InstructionCost
ClosedPublic

Authored by dfukalov on Apr 21 2021, 6:40 AM.

Details

Summary

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

See this patch for the introduction of the type: https://reviews.llvm.org/D91174
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2020-November/146408.html

Diff Detail

Event Timeline

dfukalov created this revision.Apr 21 2021, 6:40 AM
dfukalov requested review of this revision.Apr 21 2021, 6:40 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 21 2021, 6:40 AM
sdesmalen accepted this revision.Apr 21 2021, 6:50 AM

LGTM, thank you.

This revision is now accepted and ready to land.Apr 21 2021, 6:50 AM

@sdesmalen I'm going next to change getTypeLegalizationCost() to return pair with InstructionCost.
Just want to know if you're working on it, to avoid work duplication, are you?

@sdesmalen I'm going next to change getTypeLegalizationCost() to return pair with InstructionCost.
Just want to know if you're working on it, to avoid work duplication, are you?

No, I hadn't started with that one yet, thanks for the help!

When changing getTypeLegalizationCost to return a pair with InstructionCost, we can return Invalid for TypeScalarizeScalableVector, which has been left explicitly unimplemented because this is difficult to do, as it would require generating a loop during SelectionDAG.