[PATCH] D122091: [amdgpu] Elide module lds allocation in kernels with no callees

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 4 09:37:46 PDT 2022


arsenm added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.cpp:36
+  const char *Attr = "amdgpu-requires-module-lds";
+  if (F.hasFnAttribute(Attr))
+    CalleeRequiresModuleLDS = F.getFnAttribute(Attr).getValueAsBool();
----------------
JonChesterfield wrote:
> arsenm wrote:
> > You can just do getFnAttribute, you don't need a second query
> That returns 'false' for a missing attribute though, and I want the default state to be 'true'
hasFnAttribute without the key value


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D122091



More information about the llvm-commits mailing list