OSDN Git Service

AMDGPU: Stop modifying SP in call sequences
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Thu, 14 Sep 2017 17:37:40 +0000 (17:37 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Thu, 14 Sep 2017 17:37:40 +0000 (17:37 +0000)
commitc6fa88b24e4aa7721a2ba019f6a3730f84008bb7
treed5974b9c7f78b82e59d4359659d6ebeb39ac828a
parent4809f170d062261aa33064a499f05016ca271efa
AMDGPU: Stop modifying SP in call sequences

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313279 91177308-0d34-0410-b5e6-96231b3b80d8
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