[PATCH] D115488: [amdgpu] Increase alignment of all LDS variables

Jon Chesterfield via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 9 18:08:52 PST 2021


JonChesterfield added a comment.

This will increase the LDS used by some cases (specifically, padding around variables that aren't moved into the module.lds block). I assume that's expected to be a net win. Internal CI running at 611966.



================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp:216
+
   bool processUsedLDS(Module &M, Function *F = nullptr) {
     LLVMContext &Ctx = M.getContext();
----------------
Somewhat misleading diff. processUsedLDS has had the if (SuperAlignLDSGlobals) {} block copied out into a helper function but is otherwise unchanged.


================
Comment at: llvm/test/CodeGen/AMDGPU/lower-kernel-lds-super-align.ll:1
-; RUN: opt -S -mtriple=amdgcn-- -amdgpu-lower-module-lds < %s | FileCheck --check-prefixes=CHECK,SUPER-ALIGN_ON %s
-; RUN: opt -S -mtriple=amdgcn-- -passes=amdgpu-lower-module-lds < %s | FileCheck --check-prefixes=CHECK,SUPER-ALIGN_ON %s
+; RUN: opt -S -mtriple=amdgcn-- -amdgpu-lower-module-lds --amdgpu-super-align-lds-globals=true < %s | FileCheck --check-prefixes=CHECK,SUPER-ALIGN_ON %s
+; RUN: opt -S -mtriple=amdgcn-- -passes=amdgpu-lower-module-lds --amdgpu-super-align-lds-globals=true < %s | FileCheck --check-prefixes=CHECK,SUPER-ALIGN_ON %s
----------------
preference for explicit here, means the test keeps working if we change the default on the pass


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D115488



More information about the llvm-commits mailing list