This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 4/5] [amdgcn] Update lower limits requested by non-leaf kernels
- From: Andrew Stubbs <ams at codesourcery dot com>
- To: Kwok Cheung Yeung <kcy at codesourcery dot com>, <gcc-patches at gcc dot gnu dot org>
- Cc: Julian Brown <julian at codesourcery dot com>
- Date: Fri, 15 Nov 2019 15:59:00 +0000
- Subject: Re: [PATCH 4/5] [amdgcn] Update lower limits requested by non-leaf kernels
- Ironport-sdr: C2L9epXMHlrgQz2mjT9wWjgE2BaTJehjvYzzBYyEMdk4rjoQDcxTiLv/V0FcasNEv2vRiGBmfw wyvy1NxWUtFVi6aL7RREFByXKImwQpgYner/oF+JNRGmh0ZdcuR+OpBq5lK+8+v+VBKL629Tz7 PPs5PWgX1iR4/tOQswcn+69J8NwQQ28ApJE18lNk+z4Nvwuh1kP6rGUFpvY3S83uHSgBSngREy E9rIM56BuNgCNfB/zLuvsBL1khEoa/ocZZtKdpr2nlSoANEcQedoaK8J6iZmPKIiFYgQo3Luoq wnc=
- Ironport-sdr: gcTDjzwWSD4Cayv6Mj9urTLK9YCFgsEO4M4JsiHX0pAZrUHRSeoBlv+3mx6VwcjdzloV1TQZuz ogEQPTFprqta0jmr2DviYUubvn7JSNvXeOrXWHVY0HGANIJPGaeGe0LGOmGLbvn7ihw8W/Ab4S 6rmmiyFYEYu80X4bKFs5mAsyTY8KJH6JKHCkb/MfV3/Dln/XCd8j0nVUsrrZmTPEFjprMFosxK dUFUQHvDckYwJ2YE+XyO0puySMZ7gf2PBzoaAbW5M7CFYgUri5uNPafpXr6Ww3cMaYCj+lkO5u Amg=
- References: <0b37b07a-be6c-2ac6-c579-c7a522024419@codesourcery.com> <a238ab15-5ae3-4f62-f81d-11672e62d667@codesourcery.com> <5d91735e-20b7-8794-d151-7dd4a58a6764@codesourcery.com> <ec031f4c-0f0d-e7d2-371a-a580795811f6@codesourcery.com>
On 15/11/2019 15:51, Kwok Cheung Yeung wrote:
On 15/11/2019 11:32 am, Andrew Stubbs wrote:
On 14/11/2019 15:33, Kwok Cheung Yeung wrote:
The kernel attributes are changed to request at least 64 SGPRs and 24
VGPRs (i.e. the non-kernel maximum, otherwise the callees may not
have enough registers to run in) for non-leaf kernels to take
advantage of the reduced number of registers used in non-kernel
functions.
Okay for trunk?
I think you mean "leaf kernels" can use fewer registers. The code
looks right.
No, I definitely mean non-leaf kernels here. Leaf kernels (i.e. kernels
that don't call any other functions) can use as many or few registers as
they want. Non-leaf kernels must abide by our implied ABI, which states
that there are 64 SGPRs and 24 VPGRs available to non-kernel functions.
Since the kernel has no way of knowing exactly how many registers are
actually used by the functions it calls, it must assume the worst and
reserve the whole 64 SGPRs/24 VGPRs, even if the kernel itself makes use
of fewer registers. This is still a reduction over the previous 102
SGPRs/64 VGPRs.
OK, I failed to parse the English and got to wrong sense of fewer registers.
Anyway, the patch is fine.
Andrew