This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Don't fix emergency stack slot at offset 0
ClosedPublic

Authored by arsenm on Jun 4 2019, 9:41 AM.

Details

Summary

This forced the caller to be aware of this, which is an ugly ABI
feature.

Partially reverts r295877. The original reasons for doing this are
mostly fixed. Alloca is now in a non-0 address space, so it should be
OK to have 0 as a valid pointer. Since we treat the absolute address
as the pointer value, this part only really needed to apply to
kernels.

Since r357093, we avoid the need to increment/decrement the offset
register in more cases, and since r354816 the scavenger can fail
without spilling, so it's less critical that we try to avoid an offset
that fits in the MUBUF offset.

Restrict to callable functions for now to split this into 2 steps to
limit thte number of test updates and in case anything breaks.

Diff Detail

Event Timeline

arsenm created this revision.Jun 4 2019, 9:41 AM
rampitec accepted this revision.Jun 4 2019, 2:56 PM

LGTM

This revision is now accepted and ready to land.Jun 4 2019, 2:56 PM
arsenm closed this revision.Jun 5 2019, 3:34 PM

r362665