[PATCH] D104331: [AMDGPU] Use performOptimizedStructLayout for LDS sort

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 22 09:31:45 PDT 2021


rampitec added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp:260
         AMDGPU::getAlign(DL, LocalVars[0]); // was sorted on alignment
 
     GlobalVariable *SGV = new GlobalVariable(
----------------
hsmhsm wrote:
> Now since we are calling performOptimizedStructLayout(), I am not sure, if the struct member with max align is guarenteed to be at offset 0.
> Now since we are calling performOptimizedStructLayout(), I am not sure, if the struct member with max align is guarenteed to be at offset 0.

Good catch! No, it is not true anymore. I have removed the comment and renamed the variable. We still need to set FGV alignment to its first field though.


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

https://reviews.llvm.org/D104331



More information about the llvm-commits mailing list