[PATCH] D156040: [AMDGPU] Add dynamic stack bit info to kernel-resource-usage Rpass output for CoV5

Corbin Robeck via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 23 05:41:28 PDT 2023


crobeck added a comment.

In D156040#4525769 <https://reviews.llvm.org/D156040#4525769>, @JonChesterfield wrote:

> What is this bit used for? Codegen and debug info emission don't need it. I'm not sure what sets CurrentProgramInfo.DynamicCallStack at present either.

It is part of the kernel meta data that is passed to the runtime to indicate the compiler can't determine the required stack amount use of the kernel and to tell the runtime it needs to check the value set from hipDeviceSetLimit.

DynamicCallStack ends up getting set here:

https://github.com/llvm/llvm-project/blob/main/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp#L706

Which is essentially just a check for recursion or indirect function calls/runtime polymorphism (i.e. virtual functions).

But the bit information ends up being incorporated into CodeGen here:

https://github.com/llvm/llvm-project/blob/main/llvm/lib/Target/AMDGPU/AMDGPUResourceUsageAnalysis.cpp#L115


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D156040



More information about the llvm-commits mailing list