[PATCH] D147408: [AMDGPU] Enable AMDGPU Atomic Optimizer Pass by default.

Pravin Jagtap via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 12 02:53:01 PDT 2023


pravinjagtap marked an inline comment as done.
pravinjagtap added a comment.

In D147408#4239304 <https://reviews.llvm.org/D147408#4239304>, @cdevadas wrote:

> Shouldn't this new lowering get enabled for device functions too?

Hello @cdevadas, The current visitor of `AtomicRMWInst` considers only `AMDGPUAS::GLOBAL_ADDRESS` and `AMDGPUAS::LOCAL_ADDRESS` as potential candidates for atomic optimizations and *NOT* the `AMDGPUAS::FLAT_ADDRESS`. In cases of device functions, I am observing that input argument (if device function is doing atomic add then we need to pass the address to device function) are addrSpaceCasted to AMDGPUAS::FLAT_ADDRESS in the caller (i.e global function) before passing it to device function. Thats the reason why this lowering is not getting enabled for device functions. Will talk to @b-sumner and @arsenm about handling of this.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D147408



More information about the llvm-commits mailing list