[PATCH] D45049: AMDGPU: Support realigning stack

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 29 08:42:55 PDT 2018


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

While the stack access instructions don't care about
alignment > 4, some transformations on the pointer calculation
do make assumptions based on knowing the low bits of a pointer
are 0. If a stack object ends up being accessed through its
absolute address (relative to the kernel scratch wave offset),
the addressing expression may depend on the stack frame being
properly aligned. This was breaking in a testcase due to the
add->or combine.

      

I think some of the SP/FP handling logic is still backwards,
and overly simplistic to support all of the stack features.
Code which tries to modify the SP with inline asm for example
or variable sized objects will probably require redoing this.


https://reviews.llvm.org/D45049

Files:
  lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
  lib/Target/AMDGPU/SIFrameLowering.cpp
  lib/Target/AMDGPU/SIMachineFunctionInfo.h
  test/CodeGen/AMDGPU/stack-realign.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45049.140263.patch
Type: text/x-patch
Size: 11687 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180329/d5bf3bbd/attachment-0001.bin>


More information about the llvm-commits mailing list