This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Disable stack realignment for kernels
ClosedPublic

Authored by arsenm on Jun 3 2019, 7:09 AM.

Details

Summary

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.

Diff Detail

Event Timeline

arsenm created this revision.Jun 3 2019, 7:09 AM
rampitec accepted this revision.Jun 3 2019, 9:31 AM

LGTM

This revision is now accepted and ready to land.Jun 3 2019, 9:31 AM
arsenm closed this revision.Jun 3 2019, 2:30 PM

r362447