[PATCH] D124217: [AMDGPU] Allow finer grain control of an unaligned access speed

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 22 10:21:57 PDT 2022


rampitec added a comment.

In D124217#3467057 <https://reviews.llvm.org/D124217#3467057>, @foad wrote:

> Is it worth switching to InstructionCost here? Or at least switching to a model where larger numbers mean slower, like InstructionCost uses.

Changing it to InstructionCost will make it comparable to the rest of instructions. Further tweaking the cost itself will change codegen for many targets where cost model is used, and not tweaking it will change codegen where this interface is used.

Moreover, turning the meaning from 'fast' or 'speed' into a reverse 'cost' value will require setting actual thresholds on what is slow. Right now slow is just 0 or 'false' before the change. I am not really ready to set such thresholds and to actually define speed units even for our own target. Note that even D124219 <https://reviews.llvm.org/D124219> defines speed levels only for LDS and this is not comparable to other address spaces.

I intentionally wanted to make this transition NFC and a switch to cost will turn an interface change into a real unwanted functional change.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D124217/new/

https://reviews.llvm.org/D124217



More information about the llvm-commits mailing list