[PATCH] D94648: [amdgpu] Implement lower function LDS pass

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 9 09:38:32 PST 2021


arsenm added a comment.

Should add some tests where the same LDS appears in multiple functions/kernels



================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp:187
+
+  static void markUsedByKernel(IRBuilder<> &Builder, Function *Func,
+                               GlobalVariable *SGV) {
----------------
JonChesterfield wrote:
> I quite like the donothing alternative to inline asm. It does indeed keep the use alive long enough.
> 
> A future change to the pipeline might break that, but it'll do so fairly obviously (all the openmp stuff stops working, for one). I think we go with annotated donothing for now, and implement an intrinsic -> pseudo sequence when/if it becomes necessary. Written a fairly long comment to that effect in the source.
But if there are no pre-existing uses of the LDS in the kernel, this won't end up getting allocated in the kernel


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94648



More information about the llvm-commits mailing list