This is an archive of the discontinued LLVM Phabricator instance.

[TTI] NFC: Change getCastInstrCost and getExtractWithExtendCost to return InstructionCost
ClosedPublic

Authored by sdesmalen on Apr 9 2021, 7:58 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.Apr 9 2021, 7:58 AM
sdesmalen requested review of this revision.Apr 9 2021, 7:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 9 2021, 7:58 AM
dmgreen added inline comments.Apr 9 2021, 9:01 AM
llvm/include/llvm/CodeGen/BasicTTIImpl.h
897

Should this be a cost?

sdesmalen added inline comments.Apr 9 2021, 9:31 AM
llvm/include/llvm/CodeGen/BasicTTIImpl.h
897

It should not, good spot!

sdesmalen updated this revision to Diff 336496.Apr 9 2021, 9:32 AM

Revert InstructionCost change for Num variable.

dmgreen accepted this revision.Apr 10 2021, 6:49 AM

Thanks. LGTM

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