[llvm] [AMDGPU][ASAN] Handle special GVs lowering in amdgpu-sw-lower-lds (PR #161827)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 3 01:18:46 PST 2025
skc7 wrote:
> Given #114550 is unlikely to be refactored short-term, I suggest moving the named barrier variable lowering into a separate small pass that runs before the LDS module lowering, instead of having two passes do the same thing through shared helpers.
>
> I think it's a better design to have one pass that only handles those magic GVs, and lowers them into the !absolute_symbol form. Then both LowerModuleLDS and SwLowerModuleLDS should be able to handle the lowered version naturally without any special casing needed for these named barrier GVs (e.g. by skipping over GVs with !absolute_address).
>
> I hope we can revisit the address space in which those GV live eventually. Keeping all the logic in one module would make this less intrusive and easier to refactor later. If we start special casing it in every place that touches LDS it'll make it much harder to correct the design.
Implemented this approach in below PRs. Please review.
[AMDGPU] Add amdgpu-lower-special-lds pass to lower named-barrier LDS #165692
[AMDGPU] Enable amdgpu-lower-special-lds pass in pipeline #165746
https://github.com/llvm/llvm-project/pull/161827
More information about the llvm-commits
mailing list