amdgcn: Work around XNACK register allocation problem
commit4c12bcbeb0c0fd6da4c56e7622814201daadd585
authorAndrew Stubbs <ams@codesourcery.com>
Wed, 13 Dec 2023 12:00:52 +0000 (13 12:00 +0000)
committerAndrew Stubbs <ams@codesourcery.com>
Wed, 13 Dec 2023 15:30:42 +0000 (13 15:30 +0000)
tree29c8e995959fc98396035e1aaef957634def21bc
parent392f70cc11089f6da2611177de5f3e8baad6d327
amdgcn: Work around XNACK register allocation problem

The extra register pressure is causing infinite loops in some cases, especially
at -O0.  I have not yet observed any issue on devices that have AVGPRs for
spilling, and XNACK is only really useful on those devices anyway, so change
the defaults.

gcc/ChangeLog:

* config/gcn/gcn-hsa.h (NO_XNACK): Change the defaults.
* config/gcn/gcn-opts.h (enum hsaco_attr_type): Add HSACO_ATTR_DEFAULT.
* config/gcn/gcn.cc (gcn_option_override): Set the default flag_xnack.
* config/gcn/gcn.opt: Add -mxnack=default.
* doc/invoke.texi: Document the -mxnack default.
gcc/config/gcn/gcn-hsa.h
gcc/config/gcn/gcn-opts.h
gcc/config/gcn/gcn.cc
gcc/config/gcn/gcn.opt
gcc/doc/invoke.texi