diff options
author | Jakub Jelinek <jakub@redhat.com> | 2019-10-31 11:09:43 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2019-10-31 11:09:43 +0100 |
commit | 9ba66bf5b9c69e0e2bcd1b2ab88160bf9b2aa417 (patch) | |
tree | 338ea6aaa57ed2fb13975081ccabdc86eb70eb90 /gcc/Makefile.in | |
parent | 6409a3c0369313f604b349ffc53efd78d873f790 (diff) | |
download | gcc-9ba66bf5b9c69e0e2bcd1b2ab88160bf9b2aa417.zip gcc-9ba66bf5b9c69e0e2bcd1b2ab88160bf9b2aa417.tar.gz gcc-9ba66bf5b9c69e0e2bcd1b2ab88160bf9b2aa417.tar.bz2 |
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/Makefile.in')
-rw-r--r-- | gcc/Makefile.in | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/gcc/Makefile.in b/gcc/Makefile.in index c82858f..551674b 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -2645,7 +2645,7 @@ generated_files = config.h tm.h $(TM_P_H) $(TM_D_H) $(TM_H) multilib.h \ common/common-target-hooks-def.h pass-instances.def \ c-family/c-target-hooks-def.h d/d-target-hooks-def.h \ params.list params.options case-cfn-macros.h \ - cfn-operators.pd + cfn-operators.pd omp-device-properties.h # # How to compile object files to run on the build machine. @@ -2854,6 +2854,30 @@ $(genprog:%=build/gen%$(build_exeext)): build/gen%$(build_exeext): build/gen%.o +$(LINKER_FOR_BUILD) $(BUILD_LINKERFLAGS) $(BUILD_LDFLAGS) -o $@ \ $(filter-out $(BUILD_LIBDEPS), $^) $(BUILD_LIBS) +omp-general.o: omp-device-properties.h + +omp_device_properties = @omp_device_properties@ +omp-device-properties.h: s-omp-device-properties-h ; @true +s-omp-device-properties-h: @omp_device_property_deps@ + -rm -f tmp-omp-device-properties.h; \ + for kind in kind arch isa; do \ + echo 'const char omp_offload_device_'$${kind}'[] = ' \ + >> tmp-omp-device-properties.h; \ + for prop in none $(omp_device_properties); do \ + [ "$$prop" = "none" ] && continue; \ + tgt=`echo "$$prop" | sed 's/=.*$$//'`; \ + props=`echo "$$prop" | sed 's/.*=//'`; \ + echo "\"$$tgt\\0\"" >> tmp-omp-device-properties.h; \ + sed -n 's/^'$${kind}': //p' $${props} \ + | sed 's/[[:blank:]]/ /g;s/ */ /g;s/^ //;s/ $$//;s/ /\\0/g;s/^/"/;s/$$/\\0\\0"/' \ + >> tmp-omp-device-properties.h; \ + done; \ + echo '"";' >> tmp-omp-device-properties.h; \ + done; \ + $(SHELL) $(srcdir)/../move-if-change tmp-omp-device-properties.h \ + omp-device-properties.h + $(STAMP) s-omp-device-properties-h + # Generated source files for gengtype. Prepend inclusion of # config.h/bconfig.h because AIX requires _LARGE_FILES to be defined before # any system header is included. @@ -3452,6 +3476,10 @@ ifeq ($(enable_plugin),yes) install: install-plugin endif +ifeq ($(enable_as_accelerator),yes) +install: install-omp-device-properties +endif + install-strip: override INSTALL_PROGRAM = $(INSTALL_STRIP_PROGRAM) ifneq ($(STRIP),) install-strip: STRIPPROG = $(STRIP) @@ -3637,6 +3665,11 @@ install-driver: installdirs xgcc$(exeext) fi; \ fi +# Install omp-device-properties file for accelerator compilers. +install-omp-device-properties: omp-device-properties installdirs + $(INSTALL_DATA) omp-device-properties \ + $(DESTDIR)$(libsubdir)/omp-device-properties + # Install the info files. # $(INSTALL_DATA) might be a relative pathname, so we can't cd into srcdir # to do the install. |