summaryrefslogtreecommitdiff
path: root/gcc/configure.ac
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2019-10-31 11:09:43 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2019-10-31 11:09:43 +0100
commit9ba66bf5b9c69e0e2bcd1b2ab88160bf9b2aa417 (patch)
tree338ea6aaa57ed2fb13975081ccabdc86eb70eb90 /gcc/configure.ac
parent6409a3c0369313f604b349ffc53efd78d873f790 (diff)
configure.ac: Compute and substitute omp_device_properties and omp_device_property_deps.
* configure.ac: Compute and substitute omp_device_properties and omp_device_property_deps. * Makefile.in (generated_files): Add omp-device-properties.h. (omp-general.o): Depend on omp-device-properties.h. (omp_device_properties): New make variable. (omp-device-properties.h, s-omp-device-properties-h, install-omp-device-properties): New goals. (install): Depend on install-omp-device-properties for accelerators. * target.def (TARGET_OMP_DEVICE_KIND_ARCH_ISA): New target hook. * target.h (enum omp_device_kind_arch_isa): New enum. * doc/tm.texi.in: Add placeholder for TARGET_OMP_DEVICE_KIND_ARCH_ISA documentation. * omp-general.c: Include omp-device-properties.h. (omp_max_simt_vf): Expect OFFLOAD_TARGET_NAMES to be separated by colon instead of comma. (omp_offload_device_kind_arch_isa, omp_maybe_offloaded): New functions. (omp_context_selector_matches): Implement device set arch/isa selectors, improve device set kind selector handling. * config/i386/i386-options.h (ix86_omp_device_kind_arch_isa): Declare. * config/i386/i386.c (TARGET_SIMD_CLONE_ADJUST, TARGET_SIMD_CLONE_USABLE): Formatting fix. (TARGET_OMP_DEVICE_KIND_ARCH_ISA): Redefine to ix86_omp_device_kind_arch_isa. * config/i386/i386-options.c (struct ix86_target_opts): Move type definition from ix86_target_string to file scope. (isa2_opts, isa_opts): Moved arrays from ix86_target_string function to file scope. (ix86_omp_device_kind_arch_isa): New function. (ix86_target_string): Moved struct ix86_target_opts, isa2_opts and isa_opts definitions to file scope. * config/i386/t-intelmic (omp-device-properties): New goal. * config/nvptx/t-nvptx (omp-device-properties): Likewise. * config/nvptx/nvptx.c (nvptx_omp_device_kind_arch_isa): New function. (TARGET_OMP_DEVICE_KIND_ARCH_ISA): Redefine to nvptx_omp_device_kind_arch_isa. * configure: Regenerate. * doc/tm.texi: Regenerate. testsuite/ * c-c++-common/gomp/declare-variant-9.c: New test. * c-c++-common/gomp/declare-variant-10.c: New test. From-SVN: r277662
Diffstat (limited to 'gcc/configure.ac')
-rw-r--r--gcc/configure.ac11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 62f4b2651cc..695e994ec9f 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -1026,12 +1026,20 @@ AC_SUBST(real_target_noncanonical)
AC_SUBST(accel_dir_suffix)
for tgt in `echo $enable_offload_targets | sed 's/,/ /g'`; do
+ tgt_dir=`echo $tgt | sed -n 's/.*=//p'`
tgt=`echo $tgt | sed 's/=.*//'`
if echo "$tgt" | grep "^hsa" > /dev/null ; then
enable_hsa=1
else
enable_offloading=1
+ if test -n "$tgt_dir"; then
+ omp_device_property="${tgt_dir}/lib/gcc/\$(real_target_noncanonical)/\$(version)/accel/${tgt}/omp-device-properties"
+ else
+ omp_device_property="\$(libsubdir)/accel/${tgt}/omp-device-properties"
+ fi
+ omp_device_properties="${omp_device_properties} ${tgt}=${omp_device_property}"
+ omp_device_property_deps="${omp_device_property_deps} ${omp_device_property}"
fi
if test x"$offload_targets" = x; then
@@ -1040,6 +1048,9 @@ for tgt in `echo $enable_offload_targets | sed 's/,/ /g'`; do
offload_targets="$offload_targets,$tgt"
fi
done
+AC_SUBST(omp_device_properties)
+AC_SUBST(omp_device_property_deps)
+
AC_DEFINE_UNQUOTED(OFFLOAD_TARGETS, "$offload_targets",
[Define to offload targets, separated by commas.])
if test x"$enable_offloading" != x; then