[Bug libgomp/82428] Builtins for openacc gang/worker/vector id/size

2018-05-02 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82428

Tom de Vries  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |9.0

--- Comment #8 from Tom de Vries  ---
Patch committed, marking resolved-fixed.

[Bug libgomp/82428] Builtins for openacc gang/worker/vector id/size

2018-05-02 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82428

--- Comment #7 from Tom de Vries  ---
Author: vries
Date: Wed May  2 17:53:29 2018
New Revision: 259850

URL: https://gcc.gnu.org/viewcvs?rev=259850&root=gcc&view=rev
Log:
[openacc] Add __builtin_goacc_parlevel_{id,size}

2018-05-02  Tom de Vries  

PR libgomp/82428
* builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
* omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
(BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
* builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
(expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
* doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
__builtin_goacc_parlevel_size.

* f95-lang.c (DEF_GOACC_BUILTIN_ONLY): Define.

* c-c++-common/goacc/builtin-goacc-parlevel-id-size-2.c: New test.
* c-c++-common/goacc/builtin-goacc-parlevel-id-size.c: New test.

* testsuite/libgomp.oacc-c-c++-common/gang-static-2.c: Use
__builtin_goacc_parlevel_{id,size}.
* testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c: Same.
* testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c: Same.
* testsuite/libgomp.oacc-c-c++-common/loop-g-1.c: Same.
* testsuite/libgomp.oacc-c-c++-common/loop-g-2.c: Same.
* testsuite/libgomp.oacc-c-c++-common/loop-gwv-1.c: Same.
* testsuite/libgomp.oacc-c-c++-common/loop-red-g-1.c: Same.
* testsuite/libgomp.oacc-c-c++-common/loop-red-gwv-1.c: Same.
* testsuite/libgomp.oacc-c-c++-common/loop-red-v-1.c: Same.
* testsuite/libgomp.oacc-c-c++-common/loop-red-v-2.c: Same.
* testsuite/libgomp.oacc-c-c++-common/loop-red-w-1.c: Same.
* testsuite/libgomp.oacc-c-c++-common/loop-red-w-2.c: Same.
* testsuite/libgomp.oacc-c-c++-common/loop-red-wv-1.c: Same.
* testsuite/libgomp.oacc-c-c++-common/loop-v-1.c: Same.
* testsuite/libgomp.oacc-c-c++-common/loop-w-1.c: Same.
* testsuite/libgomp.oacc-c-c++-common/loop-wv-1.c: Same.
* testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: Same.
* testsuite/libgomp.oacc-c-c++-common/routine-g-1.c: Same.
* testsuite/libgomp.oacc-c-c++-common/routine-gwv-1.c: Same.
* testsuite/libgomp.oacc-c-c++-common/routine-v-1.c: Same.
* testsuite/libgomp.oacc-c-c++-common/routine-w-1.c: Same.
* testsuite/libgomp.oacc-c-c++-common/routine-wv-1.c: Same.
* testsuite/libgomp.oacc-c-c++-common/routine-wv-2.c: Same.
* testsuite/libgomp.oacc-c-c++-common/tile-1.c: Same.

Added:
trunk/gcc/testsuite/c-c++-common/goacc/builtin-goacc-parlevel-id-size-2.c
trunk/gcc/testsuite/c-c++-common/goacc/builtin-goacc-parlevel-id-size.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/builtins.c
trunk/gcc/builtins.def
trunk/gcc/doc/extend.texi
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/f95-lang.c
trunk/gcc/omp-builtins.def
trunk/gcc/testsuite/ChangeLog
trunk/libgomp/ChangeLog
trunk/libgomp/testsuite/libgomp.oacc-c-c++-common/gang-static-2.c
trunk/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c
trunk/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c
trunk/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-g-1.c
trunk/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-g-2.c
trunk/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-gwv-1.c
trunk/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-red-g-1.c
trunk/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-red-gwv-1.c
trunk/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-red-v-1.c
trunk/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-red-v-2.c
trunk/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-red-w-1.c
trunk/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-red-w-2.c
trunk/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-red-wv-1.c
trunk/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-v-1.c
trunk/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-w-1.c
trunk/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-wv-1.c
trunk/libgomp/testsuite/libgomp.oacc-c-c++-common/parallel-dims.c
trunk/libgomp/testsuite/libgomp.oacc-c-c++-common/routine-g-1.c
trunk/libgomp/testsuite/libgomp.oacc-c-c++-common/routine-gwv-1.c
trunk/libgomp/testsuite/libgomp.oacc-c-c++-common/routine-v-1.c
trunk/libgomp/testsuite/libgomp.oacc-c-c++-common/routine-w-1.c
trunk/libgomp/testsuite/libgomp.oacc-c-c++-common/routine-wv-1.c
trunk/libgomp/testsuite/libgomp.oacc-c-c++-common/routine-wv-2.c
trunk/libgomp/testsuite/libgomp.oacc-c-c++-common/tile-1.c

[Bug libgomp/82428] Builtins for openacc gang/worker/vector id/size

2018-02-16 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82428

--- Comment #6 from Tom de Vries  ---
Approved for stage1 here:
https://gcc.gnu.org/ml/gcc-patches/2018-01/msg01576.html

Version to commit: https://gcc.gnu.org/ml/gcc-patches/2018-01/msg01630.html

[Bug libgomp/82428] Builtins for openacc gang/worker/vector id/size

2018-01-16 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82428

--- Comment #5 from Tom de Vries  ---
Created attachment 43147
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43147&action=edit
Updated patch, using new interface

New interface (as agreed upon here:
https://gcc.gnu.org/ml/gcc-patches/2018-01/msg01331.html ):
- int __builtin_goacc_parlevel_id (int);
- int __builtin_goacc_parlevel_size (int);
with arguments 0, 1, and 2 meaning gang, worker and vector. 

To be retested.

[Bug libgomp/82428] Builtins for openacc gang/worker/vector id/size

2018-01-06 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82428

Tom de Vries  changed:

   What|Removed |Added

   Keywords||patch

--- Comment #4 from Tom de Vries  ---
https://gcc.gnu.org/ml/gcc-patches/2018-01/msg00363.html

[Bug libgomp/82428] Builtins for openacc gang/worker/vector id/size

2018-01-01 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82428

--- Comment #3 from Tom de Vries  ---
(In reply to Tom de Vries from comment #2)
> Created attachment 43000 [details]
> Updated tentative patch
> 
> Updated tentative patch, tested with nvptx accelerator.

Bootstrap and reg-test on x86_64 also went ok.

[Bug libgomp/82428] Builtins for openacc gang/worker/vector id/size

2018-01-01 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82428

Tom de Vries  changed:

   What|Removed |Added

  Attachment #42991|0   |1
is obsolete||

--- Comment #2 from Tom de Vries  ---
Created attachment 43000
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43000&action=edit
Updated tentative patch

Updated tentative patch, tested with nvptx accelerator.

todo: Test fortran variant.

[Bug libgomp/82428] Builtins for openacc gang/worker/vector id/size

2017-12-30 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82428

--- Comment #1 from Tom de Vries  ---
Created attachment 42991
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42991&action=edit
Tentative patch, tested on host