[PATCH] D62810: AMDGPU: Disable stack realignment for kernels

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 3 07:12:41 PDT 2019


arsenm created this revision.
arsenm added reviewers: rampitec, scott.linder.
Herald added subscribers: t-tye, tpr, dstuttard, yaxunl, nhaehnle, wdng, jvesely, kzhuravl.

This is something of a workaround, and the state of stack realignment
controls is kind of a mess. Ideally, we would be able to specify the
stack is infinitely aligned on entry to a kernel.

      

TargetFrameLowering provides multiple controls which apply at
different points. The StackRealignable field is used during
SelectionDAG, and for some reason distinct from this
hook. StackAlignment is a single field not dependent on the
function. It would probably be better to make that dependent on the
calling convention, and the maximum value for kernels.

      

Currently this doesn't really change anything, since the frame
lowering mostly does its own thing. This helps avoid regressions in a
future change which will rely more heavily on hasFP.


https://reviews.llvm.org/D62810

Files:
  lib/Target/AMDGPU/SIRegisterInfo.cpp
  lib/Target/AMDGPU/SIRegisterInfo.h
  test/CodeGen/AMDGPU/stack-realign-kernel.ll
  test/CodeGen/AMDGPU/stack-realign.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62810.202712.patch
Type: text/x-patch
Size: 16383 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190603/bdb4339f/attachment.bin>


More information about the llvm-commits mailing list