From c3f63a62eb4332f651be5fd377d2d289c8c949f5 Mon Sep 17 00:00:00 2001 From: tschwinge Date: Thu, 18 Dec 2014 13:13:17 +0000 Subject: [PATCH] Support for OpenACC acc_on_device in offloading configurations. gcc/ * config/i386/intelmic-offload.h: New file. * config/nvptx/offload.h: Likewise. * config.gcc <*-intelmic-*, *-intelmicemul-*, nvptx-*>: Point to them via tm_file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gomp-4_0-branch@218863 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog.gomp | 7 +++++++ gcc/config.gcc | 2 ++ gcc/config/i386/intelmic-offload.h | 35 +++++++++++++++++++++++++++++++++++ gcc/config/nvptx/offload.h | 35 +++++++++++++++++++++++++++++++++++ 4 files changed, 79 insertions(+) create mode 100644 gcc/config/i386/intelmic-offload.h create mode 100644 gcc/config/nvptx/offload.h diff --git a/gcc/ChangeLog.gomp b/gcc/ChangeLog.gomp index 1e6df5f2052..a744ebfb064 100644 --- a/gcc/ChangeLog.gomp +++ b/gcc/ChangeLog.gomp @@ -1,4 +1,11 @@ 2014-12-18 Thomas Schwinge + + * config/i386/intelmic-offload.h: New file. + * config/nvptx/offload.h: Likewise. + * config.gcc <*-intelmic-*, *-intelmicemul-*, nvptx-*>: Point to + them via tm_file. + +2014-12-18 Thomas Schwinge Jakub Jelinek * builtins.c (expand_builtin_acc_on_device): Use diff --git a/gcc/config.gcc b/gcc/config.gcc index 8541274a243..1e453e9ae2e 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -2178,6 +2178,7 @@ nios2-*-*) nvptx-*) tm_file="${tm_file} newlib-stdint.h" tmake_file="nvptx/t-nvptx" + tm_file="${tm_file} nvptx/offload.h" ;; pdp11-*-*) tm_file="${tm_file} newlib-stdint.h" @@ -2906,6 +2907,7 @@ esac case ${target} in *-intelmic-* | *-intelmicemul-*) tmake_file="${tmake_file} i386/t-intelmic" + tm_file="${tm_file} i386/intelmic-offload.h" ;; esac diff --git a/gcc/config/i386/intelmic-offload.h b/gcc/config/i386/intelmic-offload.h new file mode 100644 index 00000000000..bea18ed41da --- /dev/null +++ b/gcc/config/i386/intelmic-offload.h @@ -0,0 +1,35 @@ +/* Support for Intel MIC offloading. + + Copyright (C) 2014 Free Software Foundation, Inc. + + This file is part of GCC. + + GCC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + GCC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + Under Section 7 of GPL version 3, you are granted additional + permissions described in the GCC Runtime Library Exception, version + 3.1, as published by the Free Software Foundation. + + You should have received a copy of the GNU General Public License and + a copy of the GCC Runtime Library Exception along with this program; + see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + . */ + +#ifndef INTELMIC_OFFLOAD_H +#define INTELMIC_OFFLOAD_H + +/* Support for OpenACC acc_on_device. */ + +#include "gomp-constants.h" + +#define ACCEL_COMPILER_acc_device GOMP_DEVICE_INTEL_MIC + +#endif diff --git a/gcc/config/nvptx/offload.h b/gcc/config/nvptx/offload.h new file mode 100644 index 00000000000..63f9a02d8ba --- /dev/null +++ b/gcc/config/nvptx/offload.h @@ -0,0 +1,35 @@ +/* Support for Nvidia PTX offloading. + + Copyright (C) 2014 Free Software Foundation, Inc. + + This file is part of GCC. + + GCC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + GCC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + Under Section 7 of GPL version 3, you are granted additional + permissions described in the GCC Runtime Library Exception, version + 3.1, as published by the Free Software Foundation. + + You should have received a copy of the GNU General Public License and + a copy of the GCC Runtime Library Exception along with this program; + see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + . */ + +#ifndef GCC_NVPTX_OFFLOAD_H +#define GCC_NVPTX_OFFLOAD_H + +/* Support for OpenACC acc_on_device. */ + +#include "gomp-constants.h" + +#define ACCEL_COMPILER_acc_device GOMP_TARGET_NVIDIA_PTX + +#endif -- 2.11.4.GIT