[llvm-dev] Is it possible to have a TTI's getOperationCost with TargetCostKind?

Rodrigo Caetano Rocha via llvm-dev llvm-dev at lists.llvm.org
Fri Aug 24 03:13:17 PDT 2018


Hi everyone,

I've been using the TTI function getInstructionCost for code-size by using
the TargetCostKind::TCK_CodeSize option.
However, sometimes I want to estimate the code-size cost of an instruction
before actually inserting it into a parent basic block.
For that, I would like to use the alternative functions, such
as getOperationCost, getCallCost, etc., but these functions do not accept
a TargetCostKind parameter.

Is there a way to use the existing TTI infrastructure to query these other
functions using the TargetCostKind?

Thanks,

Rodrigo Rocha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180824/6008ea5f/attachment.html>


More information about the llvm-dev mailing list