[amdgcn] Restrict registers available to non-kernel functions
authorKwok Cheung Yeung <kcy@codesourcery.com>
Fri, 15 Nov 2019 15:36:34 +0000 (15:36 +0000)
committerKwok Cheung Yeung <kcy@gcc.gnu.org>
Fri, 15 Nov 2019 15:36:34 +0000 (15:36 +0000)
commit342f94647678b60357e7f6e988874a4339fb5ea8
tree1b79b3bfb2cb54852ce253822d74164e784e1323
parent1c3c3f455021130c429f57b09ef39bc218bd7fff
[amdgcn] Restrict registers available to non-kernel functions

Restrict the number of SGPRs and VGPRs available to non-kernel functions
to improve compute-unit occupancy with multiple threads.

2019-11-15  Kwok Cheung Yeung  <kcy@codesourcery.com>

gcc/
* config/gcn/gcn.c (default_requested_args): New.
(gcn_parse_amdgpu_hsa_kernel_attribute): Initialize requested args
set with default_requested_args.
(gcn_conditional_register_usage): Limit register usage of non-kernel
functions.  Reassign fixed registers if a non-standard set of args is
requested.
* config/gcn/gcn.h (FIXED_REGISTERS): Fix registers according to ABI.

From-SVN: r278301
gcc/ChangeLog
gcc/config/gcn/gcn.c
gcc/config/gcn/gcn.h