[PATCH] D90036: [AMDGPU] Emit stack frame size in metadata

Sebastian Neubauer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 30 07:23:41 PDT 2020


Flakebi added inline comments.


================
Comment at: llvm/test/CodeGen/AMDGPU/amdpal-callable.ll:104
+; GCN-NEXT:      dynamic_stack:
+; GCN-NEXT:        .stack_frame_size_in_bytes: 0x10
+; GCN-NEXT:      no_stack:
----------------
foad wrote:
> Flakebi wrote:
> > foad wrote:
> > > Flakebi wrote:
> > > > arsenm wrote:
> > > > > This doesn't really represent the unknown nature of the stack size, but I guess there isn't a key for this yet?
> > > > I guess it should be the maximum that the function needs at any point, so 0x10 sounds right?
> > > Then what would it report if there was an alloca in a loop?
> > The same as with an if, I think allocas in a loop don’t stack, so there should be a maximum stack usage that can be statically computed.
> Yes they do stack. It's used for implementing standard(ish) C alloca().
Hm ok, I guess we’re doomed then.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90036



More information about the llvm-commits mailing list