[PATCH] D43769: [TTI] rename getArithmeticInstructionCost() to getUnitThroughput(); NFC
Alexey Bataev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 26 11:32:18 PST 2018
ABataev added inline comments.
Comment at: include/llvm/Analysis/TargetTransformInfo.h:723
+ /// cases or optimizations based on those values.
+ int getUnitThroughput(
unsigned Opcode, Type *Ty, OperandValueKind Opd1Info = OK_AnyValue,
> ABataev wrote:
> > Seems to me very general, the name does not show that this is the throughput for arithmetic instructions only. I think it is going to be enough just to clarify the comment.
> getXXXCost is the most ambiguous. getALUUnitThroughput is better?
> I'd like to make it so we don't have to read the comments to distinguish this from getUserCost and getOperationCost. So if we don't change this name, then change those?
> I suppose we should change all of the throughput APIs in one shot if we're going to do this. But if there's no support, then I'll just update the code comment.
Still not sure. We're estimating the cost of the arithmetic LLVM instructions here in terms of throughput, not the ALU Unit throughput.
More information about the llvm-commits