@@ -1,3 +1,16 @@
+2019-08-08 Julian Brown <julian@codesourcery.com>
+
+ * plugin/configfrag.ac (amdgcn): Set tgt_plugin.
+ * testsuite/lib/libgomp.exp (offload_target_to_openacc_device_type):
+ Add AMD GCN support.
+ (check_effective_target_openacc_amdgcn_accel_selected): Test
+ offload_target instead of offload_target_openacc.
+ * testsuite/libgomp.oacc-c++/c++.exp (amdgcn*): Rename stanza to...
+ (gcn): ...this. Don't set tagopt redundantly here.
+ * testsuite/libgomp.oacc-c/c.exp (amdgcn*, gcn): Likewise.
+ * testsuite/libgomp.oacc-fortran/fortran.exp (amdgcn*, gcn): Likewise.
+ * configure: Regenerated.
+
2019-08-08 Julian Brown <julian@codesourcery.com>
* plugin/plugin-gcn.c (GOMP_OFFLOAD_openacc_exec_params,
@@ -15781,6 +15781,7 @@ rm -f core conftest.err conftest.$ac_objext \
;;
*)
tgt_name=gcn
+ tgt_plugin=gcn
PLUGIN_GCN=$tgt
PLUGIN_GCN_CPPFLAGS=$HSA_RUNTIME_CPPFLAGS
PLUGIN_GCN_LDFLAGS="$HSA_RUNTIME_LDFLAGS"
@@ -256,6 +256,7 @@ if test x"$enable_offload_targets" != x; then
;;
*)
tgt_name=gcn
+ tgt_plugin=gcn
PLUGIN_GCN=$tgt
PLUGIN_GCN_CPPFLAGS=$HSA_RUNTIME_CPPFLAGS
PLUGIN_GCN_LDFLAGS="$HSA_RUNTIME_LDFLAGS"
@@ -316,6 +316,9 @@ proc offload_target_to_openacc_device_type { offload_target } {
nvptx* {
return "nvidia"
}
+ amdgcn* {
+ return "gcn"
+ }
default {
error "Unknown offload target: $offload_target"
}
@@ -463,8 +466,8 @@ proc check_effective_target_openacc_amdgcn_accel_selected { } {
if { ![check_effective_target_openacc_amdgcn_accel_present] } {
return 0;
}
- global offload_target_openacc
- if { [string match "amdgcn*" $offload_target_openacc] } {
+ global offload_target
+ if { [string match "amdgcn*" $offload_target] } {
return 1;
}
return 0;
@@ -111,9 +111,8 @@ if { $lang_test_file_found } {
set acc_mem_shared 0
}
- amdgcn* {
+ gcn {
set acc_mem_shared 0
- set tagopt "-DACC_DEVICE_TYPE_gcn=\"$offload_target_openacc\""
}
default {
error "Unknown OpenACC device type: $openacc_device_type (offload target: $offload_target)"
@@ -72,9 +72,8 @@ foreach offload_target [concat [split $offload_targets ":"] "disable"] {
set acc_mem_shared 0
}
- amdgcn* {
+ gcn {
set acc_mem_shared 0
- set tagopt "-DACC_DEVICE_TYPE_gcn=\"$offload_target_openacc\""
}
default {
error "Unknown OpenACC device type: $openacc_device_type (offload target: $offload_target)"
@@ -90,9 +90,8 @@ if { $lang_test_file_found } {
set acc_mem_shared 0
}
- amdgcn* {
+ gcn {
set acc_mem_shared 0
- set tagopt "-DACC_DEVICE_TYPE_gcn=\"$offload_target_openacc\""
}
default {
error "Unknown OpenACC device type: $openacc_device_type (offload target: $offload_target)"