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.
Kwok