This is now backported to devel/omp/gcc-11.

Andrew

On 19/07/2021 17:49, Andrew Stubbs wrote:
This patch adds two new GCN-specific options: -mxnack and -msram-ecc={on,off,any}.

The primary purpose is to ensure that we have an explicit default setting for these features and that this is passed to the assembler. This will ensure that if LLVM defaults change, again, GCC won't get caught out and stop working with attribute mismatches.

The new options will provide a means to adjust these features in future, but this patch does not actually add any new support for either XNACK or SRAM-ECC.

The XNACK feature has two settings, "on" (-mxnack) and "off" (-mno-xnack). The default is "off", and trying to turn it on will give a "sorry, unimplemented" message. To implement this will require changes to the load/store instruction early-clobber rules (actually, clobbering across multiple contiguous load/store instructions is a problem too), and a new xnack-enabled multilib for each supported ISA.

The SRAM-ECC feature has three settings, "on", "off" and "any" (in which the generated code must work with the device configures to either mode). The current implementation is actually "any" already, but as that attribute setting is not available in the HSACOv3 binary standard we target right now we just set it to "on" or "off" according to which makes sense for the configured ISA. We'll have to revisit this when we implement HSACOv4 compatibility.

Andrew

Reply via email to