supported for gcn. */
#define GOMP_SELF_SPECS ""
-#define NO_XNACK "march=fiji:;march=gfx1030:;"
+#define NO_XNACK "march=fiji:;march=gfx1030:;" \
+ /* These match the defaults set in gcn.cc. */ \
+ "!mxnack*|mxnack=default:%{march=gfx900|march=gfx906|march=gfx908:-mattr=-xnack};"
#define NO_SRAM_ECC "!march=*:;march=fiji:;march=gfx900:;march=gfx906:;"
/* In HSACOv4 no attribute setting means the binary supports "any" hardware
{
HSACO_ATTR_OFF,
HSACO_ATTR_ON,
- HSACO_ATTR_ANY
+ HSACO_ATTR_ANY,
+ HSACO_ATTR_DEFAULT
};
#endif
/* Allow HSACO_ATTR_ANY silently because that's the default. */
flag_xnack = HSACO_ATTR_OFF;
}
+
+ /* There's no need for XNACK on devices without USM, and there are register
+ allocation problems caused by the early-clobber when AVGPR spills are not
+ available.
+ FIXME: can the regalloc mean the default can be really "any"? */
+ if (flag_xnack == HSACO_ATTR_DEFAULT)
+ switch (gcn_arch)
+ {
+ case PROCESSOR_FIJI:
+ case PROCESSOR_VEGA10:
+ case PROCESSOR_VEGA20:
+ case PROCESSOR_GFX908:
+ flag_xnack = HSACO_ATTR_OFF;
+ break;
+ case PROCESSOR_GFX90a:
+ flag_xnack = HSACO_ATTR_ANY;
+ break;
+ default:
+ gcc_unreachable ();
+ }
+
+ if (flag_sram_ecc == HSACO_ATTR_DEFAULT)
+ flag_sram_ecc = HSACO_ATTR_ANY;
}
/* }}} */
EnumValue
Enum(hsaco_attr_type) String(any) Value(HSACO_ATTR_ANY)
+EnumValue
+Enum(hsaco_attr_type) String(default) Value(HSACO_ATTR_DEFAULT)
+
mxnack=
-Target RejectNegative Joined ToLower Enum(hsaco_attr_type) Var(flag_xnack) Init(HSACO_ATTR_ANY)
-Compile for devices requiring XNACK enabled. Default \"any\".
+Target RejectNegative Joined ToLower Enum(hsaco_attr_type) Var(flag_xnack) Init(HSACO_ATTR_DEFAULT)
+Compile for devices requiring XNACK enabled. Default \"any\" if USM is supported.
msram-ecc=
Target RejectNegative Joined ToLower Enum(hsaco_attr_type) Var(flag_sram_ecc) Init(HSACO_ATTR_ANY)
Compile binaries suitable for devices with the XNACK feature enabled, disabled,
or either mode. Some devices always require XNACK and some allow the user to
configure XNACK. The compiled code must match the device mode.
-The default is @samp{-mxnack=any}.
+The default is @samp{-mxnack=any} on devices that support Unified Shared
+Memory, and @samp{-mxnack=no} otherwise.
@end table