Is it possible to have a TTI's getOperationCost with TargetCostKind?

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?


Rodrigo Rocha