diff mbox

OpenACC middle end changes

Message ID 87h9wtrtbv.fsf@schwinge.name
State New
Headers show

Commit Message

Thomas Schwinge Dec. 18, 2014, 1:16 p.m. UTC
Hi Jakub!

On Thu, 18 Dec 2014 13:36:16 +0100, Jakub Jelinek <jakub@redhat.com> wrote:
> On Thu, Dec 18, 2014 at 01:31:45PM +0100, Jakub Jelinek wrote:
> > > --- gcc/config.gcc
> > > +++ gcc/config.gcc
> > > @@ -2906,6 +2906,7 @@ esac
> > >  case ${target} in
> > >  *-intelmic-* | *-intelmicemul-*)
> > >  	tmake_file="${tmake_file} i386/t-intelmic"
> > > +	tm_file="${tm_file} i386/intelmic-offload.h"
> > >  	;;
> > >  esac
> > >  
> > > +#define ACCEL_COMPILER_acc_device GOMP_DEVICE_INTEL_MIC
> > > +
> > > +#endif
> 
> Oh, and where is this defined for nvptx-none target?

One of the pending commits (together with the nvptx mkoffload); I now
applied the following to gomp-4_0-branch in r218863:

commit c3f63a62eb4332f651be5fd377d2d289c8c949f5
Author: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Thu Dec 18 13:13:17 2014 +0000

    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(+)



Grüße,
 Thomas
diff mbox

Patch

diff --git gcc/ChangeLog.gomp gcc/ChangeLog.gomp
index 1e6df5f..a744ebf 100644
--- gcc/ChangeLog.gomp
+++ gcc/ChangeLog.gomp
@@ -1,4 +1,11 @@ 
 2014-12-18  Thomas Schwinge  <thomas@codesourcery.com>
+
+	* 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  <thomas@codesourcery.com>
 	    Jakub Jelinek  <jakub@redhat.com>
 
 	* builtins.c (expand_builtin_acc_on_device): Use
diff --git gcc/config.gcc gcc/config.gcc
index 8541274..1e453e9 100644
--- gcc/config.gcc
+++ 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 gcc/config/i386/intelmic-offload.h gcc/config/i386/intelmic-offload.h
new file mode 100644
index 0000000..bea18ed
--- /dev/null
+++ 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
+   <http://www.gnu.org/licenses/>.  */
+
+#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 gcc/config/nvptx/offload.h gcc/config/nvptx/offload.h
new file mode 100644
index 0000000..63f9a02
--- /dev/null
+++ 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
+   <http://www.gnu.org/licenses/>.  */
+
+#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