Per PR target/122288, gcn.opt contained some invalid syntax that was
quietly accepted by the options processor. This patch fixes that,
marks some useless options as "Undocumented", and brings the
documentation into sync with the options file.
I tested the .opt file changes on both a standalone gcn build (gcc and
g++ testsuites) and in an x86_64-linux-gnu build with gcn as offload
target (libgomp).
gcc/ChangeLog
PR other/122243
PR target/122288
* config/gcn/gcn.opt (m32, m64, mgomp): Mark "Undocumented"
since these options don't actually do anything useful.
(flag_bypass_init_error, stack_size_opt, gang_size_opt): Correct
opt file syntax.
(mstack-size=): Mark "Undocumented" since it's obsolete.
* doc/invoke.texi (Option Summary) <AMD GCN Options>:
Remove obsolete options, add missing entries for
-mgang-private-size=, -msram-ecc=, and -mxnack=.
(AMD GCN Options): Likewise.
---
gcc/config/gcn/gcn.opt | 20 +++++++++++++++-----
gcc/doc/invoke.texi | 21 +++++++++++----------
2 files changed, 26 insertions(+), 15 deletions(-)
diff --git a/gcc/config/gcn/gcn.opt b/gcc/config/gcn/gcn.opt
index 99d6aeb2b30..472adb9c053 100644
--- a/gcc/config/gcn/gcn.opt
+++ b/gcc/config/gcn/gcn.opt
@@ -29,29 +29,39 @@ mtune=
Target RejectNegative Negative(mtune=) Joined ToLower Enum(gpu_type)
Var(gcn_tune) Init(PROCESSOR_GFX900)
Specify the name of the target GPU.
+; mkoffload passes -m32, -m64, and -mgomp to the offload compiler, but
+; nothing in the offload compiler actually uses any of these flags.
+; Maybe they're there for compatibility with other offload backends,
+; or maybe we can just delete these. In any case, there's no point in
+; documenting them for users.
m32
-Target RejectNegative InverseMask(ABI64)
+Target RejectNegative InverseMask(ABI64) Undocumented
Generate code for a 32-bit ABI.
m64
-Target RejectNegative Mask(ABI64)
+Target RejectNegative Mask(ABI64) Undocumented
Generate code for a 64-bit ABI.
mgomp
-Target RejectNegative
+Target RejectNegative Undocumented
Enable OpenMP GPU offloading.
+; This option seems not to ever have done anything useful, or to have
+; been documented.
+Variable
bool flag_bypass_init_error = false
mbypass-init-error
-Target RejectNegative Var(flag_bypass_init_error)
+Target RejectNegative Var(flag_bypass_init_error) Undocumented
+Variable
int stack_size_opt = -1
mstack-size=
-Target RejectNegative Joined UInteger Var(stack_size_opt) Init(-1)
+Target RejectNegative Joined UInteger Var(stack_size_opt) Init(-1) Undocumented
Obsolete; use GCN_STACK_SIZE at runtime.
+Variable
int gang_private_size_opt = -1
mgang-private-size=
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 9392a2abfc7..0d223c4d78f 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -915,7 +915,10 @@ Objective-C and Objective-C++ Dialects}.
-msplit-vecmove-early -m1reg-@var{reg}}
@emph{AMD GCN Options} (@ref{AMD GCN Options})
-@gccoptlist{-march=@var{gpu} -mtune=@var{gpu} -mstack-size=@var{bytes}
+@gccoptlist{-march=@var{gpu} -mtune=@var{gpu}
+-mgang-private-size=@var{bytes}
+-msram-ecc=@r{[}on@r{|}off@r{|}any@r{]}
+-mxnack=@r{[}on@r{|}off@r{|}any@r{]}
-Wopenacc-dims}
@emph{ARC Options} (@ref{ARC Options})
@@ -23410,6 +23413,11 @@ Compile generic code for GFX11 devices, executable on
gfx1100, gfx1101,
gfx1102, gfx1103, gfx1150, gfx1151, gfx1152, and gfx1153.
@end table
+@opindex mgang-private-size
+@item -mgang-private-size=@var{bytes}
+Set the amount of local data-share (LDS) memory to reserve for
+gang-private variables. The default is 512.
+
@opindex msram-ecc
@item -msram-ecc=on
@itemx -msram-ecc=off
@@ -23419,14 +23427,6 @@ disabled, or either mode. This feature can be enabled
per-process on some
devices. The compiled code must match the device mode. The default is
@samp{any}, for devices that support it.
-@opindex mstack-size
-@item -mstack-size=@var{bytes}
-Specify how many @var{bytes} of stack space will be requested for each GPU
-thread (wave-front). Beware that there may be many threads and limited memory
-available. The size of the stack allocation may also have an impact on
-run-time performance. The default is 32KB when using OpenACC or OpenMP, and
-1MB otherwise.
-
@opindex mxnack
@item -mxnack=on
@itemx -mxnack=off
@@ -23440,7 +23440,8 @@ Memory, and @samp{-mxnack=no} otherwise.
@opindex Wopenacc-dims
@opindex Wno-openacc-dims
@item -Wopenacc-dims
-Warn about invalid OpenACC dimensions.
+@itemx -Wno-openacc-dims
+Control warnings about invalid OpenACC dimensions.
@end table
--
2.39.5