[PATCH] D129566: AMDGPU: Turn off force init 16 input SGPRS for pal
Tim Renouf via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 12 10:47:46 PDT 2022
tpr added a comment.
> I'm not suggesting moving it into the same model, but the backend should figure out the user SGPR count given the formal argument list in the IR
David is right -- we use a completely different model for PAL. The middle-end compiler LGC (part of LLPC) determines what user data sgprs there are, and what hardware-set sgprs (e.g. threadgroup_id0/1/2 in a CS) it wants to enable. It sets all the relevant bits and fields in the rsrc2 passed in IR metadata, and it adds the right number and type of inreg args to the function in the IR. For PAL, the backend would not modify those fields and bits in rsrc2 at all.
In the PAL model, the backend only sets fields that only it can know about, such as vgpr usage.
So this fix looks correct to me for PAL.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129566/new/
https://reviews.llvm.org/D129566
More information about the llvm-commits
mailing list