[PATCH] D102177: [AMDGPU][RFC] Improve sgpr function arguments

Tony Tye via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 11 08:38:27 PDT 2021


t-tye added a comment.

In D102177#2750461 <https://reviews.llvm.org/D102177#2750461>, @madhur13490 wrote:

> In D102177#2750256 <https://reviews.llvm.org/D102177#2750256>, @sebastian-ne wrote:
>
>> In D102177#2750094 <https://reviews.llvm.org/D102177#2750094>, @madhur13490 wrote:
>>
>>> In D102177#2748278 <https://reviews.llvm.org/D102177#2748278>, @arsenm wrote:
>>>
>>>> We have another proposal we were working on to rearrange these a bit differently. We need to account for a few more inputs in the layout
>>>
>>> As long as this remains in GFX land, we should be fine with it because our new proposal is for compute only (as of now).
>>
>> I would like to keep the same calling convention in compute and graphics. At least regarding the stack pointer and others, because I don’t see a compelling reason to diverge even more. Actually, I’d like it if they were more common than they are now, because we implement some things twice at the moment.
>> The compute proposal should work just fine; if we move the stack and frame pointer, we end up with the same benefits as in this patch. I commented on the internal proposal for this (I hope I found the right one?).
>
> Well, then you're saying unification of both ABIs and it is not discussed thoroughly internally. The layout needs to be documented and get reviewed internally before we can proceed with this patch.

I think the reason that compute was considering putting FP and BP at the high registers is because they can often be optimized away. So putting them there allows them to be contiguous with other callee user registers rather then leaving an unused hole that is harder for the register allocator to use. Is that reasonable? How does that work for gfx?

I am all for trying to unify the call convention for compute and gfx if possible:-)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102177/new/

https://reviews.llvm.org/D102177



More information about the llvm-commits mailing list