[llvm] [AMDGPU][ASAN] Handle special GVs lowering in amdgpu-sw-lower-lds (PR #161827)
Pierre van Houtryve via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 16 03:46:19 PDT 2025
Pierre-vh wrote:
I believe it'd have been a better choice to model those global as externally defined, and existing in a new, separate address space dedicated to barriers. It'd fit better into the memory model and is easier to reason about.
I don't like the rationale of "We could lower them to LDS, we likely won't, but we could so let's say this is LDS". It really feels more like this started with a solution ("the LDS lowering pass can take care of it") and looked for a justification afterwards.
I also struggle the nightmare it'd be to actually add that fallback to LDS.
* Are we saying we'd also translate all of the *scalar* barrier operations into *vector memory* operation ? Do we know how much it'd affect performance?
* How will the memory model even reason about this if suddenly all barrier ops can also be LDS ops?
* How will the `s.barrier.wait` operation be implemented ? Would we now have a loop instead of the wave going to sleep?
If there was some internal discussion on the topic, it **must** be summarized into AMDGPUUsage as a documentation and design rationale for these globals to guide future work on this topic.
https://github.com/llvm/llvm-project/pull/161827
More information about the llvm-commits
mailing list