public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [OG9, committed] Backport gfx906 patches
@ 2019-09-06 17:22 Andrew Stubbs
  0 siblings, 0 replies; only message in thread
From: Andrew Stubbs @ 2019-09-06 17:22 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 106 bytes --]

I've just backported these from mainline. They add the Vega 20 gfx906 
architecture and multilib.

Andrew

[-- Attachment #2: 190607-gfx906-doc.patch --]
[-- Type: text/x-patch, Size: 515 bytes --]

Document -march=gfx906 option.

2019-06-07  Andrew Stubbs  <ams@codesourcery.com>

	gcc/
	* doc/invoke.texi (AMD GCN Options): Add gfx906.

diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 3103f86ce98..fa7d9ea8100 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -16211,6 +16211,9 @@ Compile for GCN3 Fiji devices (gfx803).
 @item gfx900
 Compile for GCN5 Vega 10 devices (gfx900).
 
+@item gfx906
+Compile for GCN5 Vega 20 devices (gfx906).
+
 @end table
 
 @item -mstack-size=@var{bytes}

[-- Attachment #3: 190606-gfx906.patch --]
[-- Type: text/x-patch, Size: 1693 bytes --]

Add -march=gfx906 for AMD GCN.

2019-06-06  Andrew Stubbs  <ams@codesourcery.com>

	gcc/
	* config.gcc (amdgcn-*-*): Allow --with-arch=gfx906.
	* config/gcn/gcn.opt (gpu_type): Add gfx906.
	* config/gcn/t-gcn-hsa (MULTILIB_OPTIONS): Add gfx906 multilib.
	(MULTILIB_DIRNAMES): Rename gcn5 to gfx900.
	Add gfx906.

diff --git a/gcc/config.gcc b/gcc/config.gcc
index 67c3c2c7a42..6b00c387247 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -4127,7 +4127,7 @@ case "${target}" in
 		for which in arch tune; do
 			eval "val=\$with_$which"
 			case ${val} in
-			"" | carrizo | fiji | gfx900 )
+			"" | carrizo | fiji | gfx900 | gfx906 )
 				# OK
 				;;
 			*)
diff --git a/gcc/config/gcn/gcn.opt b/gcc/config/gcn/gcn.opt
index 2fd3996edba..bdc878f35ad 100644
--- a/gcc/config/gcn/gcn.opt
+++ b/gcc/config/gcn/gcn.opt
@@ -34,6 +34,9 @@ Enum(gpu_type) String(fiji) Value(PROCESSOR_FIJI)
 EnumValue
 Enum(gpu_type) String(gfx900) Value(PROCESSOR_VEGA)
 
+EnumValue
+Enum(gpu_type) String(gfx906) Value(PROCESSOR_VEGA)
+
 march=
 Target RejectNegative Joined ToLower Enum(gpu_type) Var(gcn_arch) Init(PROCESSOR_CARRIZO)
 Specify the name of the target GPU.
diff --git a/gcc/config/gcn/t-gcn-hsa b/gcc/config/gcn/t-gcn-hsa
index 085ba429c9d..1600a586ac4 100644
--- a/gcc/config/gcn/t-gcn-hsa
+++ b/gcc/config/gcn/t-gcn-hsa
@@ -42,8 +42,8 @@ ALL_HOST_OBJS += gcn-run.o
 gcn-run$(exeext): gcn-run.o
 	+$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ $< -ldl
 
-MULTILIB_OPTIONS = march=gfx900
-MULTILIB_DIRNAMES = gcn5
+MULTILIB_OPTIONS = march=gfx900 march=gfx906
+MULTILIB_DIRNAMES = gfx900 gfx906
 
 PASSES_EXTRA += $(srcdir)/config/gcn/gcn-passes.def
 gcn-tree.o: $(srcdir)/config/gcn/gcn-tree.c

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-09-06 17:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-06 17:22 [OG9, committed] Backport gfx906 patches Andrew Stubbs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).