[PATCH] D155240: [amdgpu][lds] Use amdgpu-lds-size instead of llvm.donothing

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 13 15:59:18 PDT 2023


arsenm added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp:955
+
+  if (CurrentLocalMemUsage == 0) {
+    // Sort to try to estimate the worst case alignment padding
----------------
arsenm wrote:
> Is there now a path to introducing LDS outside of a kernel?
> 
> I'm slightly nervous about assuming amdgpu-lds-size is a source of truth in case something else introduces new LDS globals. Such as this pass, which is not updating the value 
If it already pre-packed the globals into a single big one, won't the search find the case of 1 and work fine without this?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D155240



More information about the llvm-commits mailing list