[PATCH] D122091: [amdgpu] Elide module lds allocation in kernels with no callees
Jon Chesterfield via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 24 03:59:42 PDT 2022
JonChesterfield added inline comments.
Herald added a subscriber: hsmhsm.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp:380
+ const CallGraphNode *N = CG[&Func];
+ const bool CalleesRequireModuleLDS = N->size() > 0;
+
----------------
JonChesterfield wrote:
> arsenm wrote:
> > I don't think this actually works for indirect calls (or even calls through aliases)
> Indirect calls are represented as an edge from 'outside', I'll check that external edge is accounted under size.
>
> Indirect calls in general need careful handling, but this initial patch is only checking for any calls at all.
Yep, counted as expected. Indirect and normal calls both increment size by one. N calls to the same function increment by N.
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