[gomp4] check for sufficient parallelism when calling acc routines in fortran

Cesar Philippidis cesar@codesourcery.com
Fri Aug 26 15:16:00 GMT 2016


This patch teaches the fortran FE how to verify that there is sufficient
parallelism when calling acc routines inside acc loop. E.g. the fortran
FE will now error if you call a gang routine from a vector loop, because
there's no way for vector partitioned code to spawn new gangs with the
OpenACC current execution model.

While working on this, I noticed that the fortran FE wasn't permitting
named functions inside acc routine directives. E.g.

  integer :: foo
  !$acc routine(foo) gang

  ... = foo ()

This patch also fixes this issue. But to do that, I had to add a
gfc_resolve_oacc_routines pass in order to identify if a variable is a
function or variable because that information isn't available during
matching.

I've applied this patch to gomp-4_0-branch.

Cesar
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gomp4-named_function_routines.diff
Type: text/x-patch
Size: 28243 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20160826/ef501694/attachment.bin>


More information about the Gcc-patches mailing list