[PATCH] D150609: [AMDGPU] Do not assume stack size for PAL code object indirect calls

Sebastian Neubauer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 5 08:59:15 PDT 2023

sebastian-ne added inline comments.

Comment at: llvm/test/CodeGen/AMDGPU/resource-usage-pal.ll:5
+; CHECK: scratch_memory_size: 0
+define amdgpu_vs void @test() {
arsenm wrote:
> bsaleil wrote:
> > arsenm wrote:
> > > Doesn't check a dynamic-is-present metadata field?
> > We don't have such flag in PAL abi.
> Then that is a problem? You would need one to know you need to add some extra?
The amount of scratch that needs to be allocated is computed outside of LLVM in the graphics driver. The compute equivalent would be the linker/loader that sees all the functions that are linked together and also gets additional data like the maximum recursion depth.
So, the only information needed in PAL metadata is the scratch usage of a function itself, without any callees.

  rG LLVM Github Monorepo



More information about the llvm-commits mailing list