[llvm] [AMDGPU] Introduce orderign parameter to atomic intrinsics and introduce new llvm.amdgcn.image.atomic.load intrinsic. (PR #73613)

Nicolai Hähnle via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 2 09:47:04 PST 2024


nhaehnle wrote:

>  I started refactoring this to add MachineMemOperand field, but half way through it seemed to me that the code was more complex due to that change. It would require to construct MMO in multiple places in getTgtMemIntrinsic which seemed unnecessary to me. I think we now have all the necessary fields to construct MMO. What do you think?

We don't have all the fields though. For example, MMOs have both a "success ordering" and a "fail ordering" (for cmpxchg).

As for the complexity of the change, I'd worry that it's quite difficult to change all users of `getTgtMemIntrinsics` at once. Most targets have an implementation of this method. So my assumption was that anyway the legacy way of not creating the MMO inside of `getTgtMemIntrinsic` would still be supported. Having `getTgtMemIntrinsic` do the job would be optional, only for the cases where we care about it.

If creating the MMO is too cumbersome, then perhaps that side of it could be improved?

https://github.com/llvm/llvm-project/pull/73613


More information about the llvm-commits mailing list