Details
- Reviewers
arsenm dfukalov - Commits
- rGb7b99b0799fa: [AMDGPU] Fix -amdgpu-inline-arg-alloca-cost
Diff Detail
Event Timeline
llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp | ||
---|---|---|
1192 | Should the just adjust for the scale then? |
llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp | ||
---|---|---|
1192 | I thought about this, but whenever we will adjust the scale the next time we will have to visit it again. |
Do you have any test for the fix?
llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp | ||
---|---|---|
1192 | Nit: It seems instead of this modification you can just swap two lines 1582: Threshold *= TTI.getInliningThresholdMultiplier(); 1583: Threshold += TTI.adjustInliningThreshold(&Call); in InlineCost.cpp so we'll stay with just one place of * getInliningThresholdMultiplier(). |
These tests tend to be either unreliable or huge. We cannot measure performance with lit tests.
llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp | ||
---|---|---|
1192 | That would change behavior for all targets. |
llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp | ||
---|---|---|
1192 | I thought the point of the multiplier was to just amplify the expense of calls. I don't understand scaling up the cost here |
llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp | ||
---|---|---|
1192 | It's more like a uniform target cost multiplier which shall be applied to everything. But probably Daniil is correct and I have to swap two lines in the inliner instead, until noone uses it as is. |
Swapped order of operations in the InlineCost itself instead. This is still unused by any other target so it is possible to fix it there, which seems to be a more correct way.
Should the just adjust for the scale then?