Page MenuHomePhabricator

[TTI] NFC: Change getCmpSelInstrCost to return InstructionCost
ClosedPublic

Authored by sdesmalen on Fri, Apr 9, 8:10 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

sdesmalen created this revision.Fri, Apr 9, 8:10 AM
sdesmalen requested review of this revision.Fri, Apr 9, 8:10 AM
Herald added a project: Restricted Project. · View Herald TranscriptFri, Apr 9, 8:10 AM
dmgreen added inline comments.
llvm/include/llvm/CodeGen/BasicTTIImpl.h
2066

This doesn't need the getValue() now, I think?

llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
1273

This too.

llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
165 ↗(On Diff #336466)

Merge gone off?

llvm/lib/Target/X86/X86TargetTransformInfo.cpp
3723

This one was already converted to an InstructionCost too.

sdesmalen updated this revision to Diff 336776.Mon, Apr 12, 1:44 AM
sdesmalen marked 4 inline comments as done.

Addressed review comments.

llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
165 ↗(On Diff #336466)

Yes, good catch. I've done a fair bit of rebasing of these patches, this one seems to have slipped through the cracks :)

llvm/lib/Target/X86/X86TargetTransformInfo.cpp
3723

Thanks for pointing out, I'll try to be a bit more diligent with my other patches to spot these cases early!

dmgreen accepted this revision.Mon, Apr 12, 3:45 AM

Thanks. LGTM

This revision is now accepted and ready to land.Mon, Apr 12, 3:45 AM