[PATCH] D37839: AMDGPU: Stop modifying SP in call sequences

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 13 18:00:16 PDT 2017


arsenm created this revision.
Herald added subscribers: t-tye, tpr, dstuttard, yaxunl, nhaehnle, wdng, kzhuravl.

Because the stack growth direction and addressing is done
in the same direction, modifying SP at the beginning of the
call sequence was incorrect. If we had a stack passed argument,
we would end up skipping that number of bytes before pushing
arguments, leaving unused/inconsistent space.

      

The callee creates fixed stack objects in its frame, so
the space necessary for these is already logically allocated
in the callee, so we just let the callee increment SP if
it really requires it.


https://reviews.llvm.org/D37839

Files:
  lib/Target/AMDGPU/SIISelLowering.cpp
  test/CodeGen/AMDGPU/byval-frame-setup.ll
  test/CodeGen/AMDGPU/call-argument-types.ll
  test/CodeGen/AMDGPU/callee-special-input-vgprs.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37839.115147.patch
Type: text/x-patch
Size: 6048 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170914/12bb277a/attachment.bin>


More information about the llvm-commits mailing list