Add the remaining arithmetic opcodes into the generic implementation of getUserCost and then call this from getInstructionThroughput. Most of the backends have been modified to return the base implementation for cost kinds other RecipThroughput. The outlier here is AMDGPU which already uses getArithmeticInstrCost for all the cost kinds. This change means that most of the opcodes can be removed from that backends implementation of getUserCost.
Details
Diff Detail
Event Timeline
llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp | ||
---|---|---|
429 | Am I right that this reset and TCK_RecipThroughput override in the following call are needed to avoid tests failures? If so, would you please specify errors - I'll try to get a look. |
llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp | ||
---|---|---|
429 | No test failures actually, so shall I just remove this instead? |
llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp | ||
---|---|---|
429 | The RecipThroughput hack does cause a lot of failures, I was wondering whether hoisting some of the generic code here would be a better thing to do? |
llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp | ||
---|---|---|
429 | I tried hoisting from BasicTTI, but the v3 vector cost tests change like this: |
AMDGPU part LGTM,
let's wait a couple of days to allow others to take a look
llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp | ||
---|---|---|
439 | I see, this override is needed since scheme is changing. I guess I should review this place after you'll complete RFC |
Hi!
I wrote a PR about a crash that starts occuring with this patch:
https://bugs.llvm.org/show_bug.cgi?id=46276
Am I right that this reset and TCK_RecipThroughput override in the following call are needed to avoid tests failures? If so, would you please specify errors - I'll try to get a look.