[gomp4] Make front ends emit warnings when OpenACC routines directives lack parallelism

Cesar Philippidis cesar@codesourcery.com
Tue May 2 01:40:00 GMT 2017


The language regarding OpenACC routines have changed in OpenACC 2.5 such
that the end user must explicitly specify one of gang, worker, vector or
seq partitioning. I guess some other compiler need those directives to
generate specialized versions of those functions accordingly. However,
GCC currently falls back to 'seq' partitioning, and that seems to be a
reasonable compromise in most cases.

This patch teaches the FE's how to emit a warning whenever a routine
directive doesn't include a partitioning clause. The rationale for
making this a warning vs an error is that it enables us to have some
backwards compatibility with OpenACC 2.0a.

Unfortunately, the fortran FE doesn't make use of
verify_oacc_routine_clauses because it parses/matches routines much
earlier than c/c++, so that part of the patch is slightly more involved.
I've also had to update a lot of test cases to make them conform to the
new routine behavior.

This patch has been committed to gomp-4_0-branch.

Cesar
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gomp4-routine-warnings.diff
Type: text/x-patch
Size: 75283 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20170502/f5976f96/attachment.bin>


More information about the Gcc-patches mailing list