[OpenMP] Implement GOMP doacross compatibility
authorJonathan Peyton <jonathan.l.peyton@intel.com>
Mon, 30 Jul 2018 17:48:33 +0000 (17:48 +0000)
committerJonathan Peyton <jonathan.l.peyton@intel.com>
Mon, 30 Jul 2018 17:48:33 +0000 (17:48 +0000)
commit369d72db116a244be6a021209298435f5565a9a5
tree8fc21af224d0ca381e2829b67c9fcf9428748b33
parent20208cc046c206a1436edb714e94bd52a0bc8572
[OpenMP] Implement GOMP doacross compatibility

This change introduces GOMP doacross compatibility. There are 12 new interface
functions 6 for long type and 6 for unsigned long long type:
GOMP_doacross_post, GOMP_doacross_wait, GOMP_loop_doacross_[schedule]_start
where schedule can be static, dynamic, guided, or runtime.

These functions just translate the parameters if necessary and send them
to the corresponding kmp function.
E.g., GOMP_doacross_post() -> __kmpc_doacross_post()

For the GOMP_doacross_post function, there is template specialization to
account for when long is a four byte vs an eight byte type. If it is a
four byte type, then a temporary array has to be created to convert the
four byte integers into eight byte integers and then sending that into
__kmpc_doacross_post(). Because GOMP_doacross_wait uses varargs, it
always needs a temporary array and does not need template specialization.

Differential Revision: https://reviews.llvm.org/D49857

llvm-svn: 338280
openmp/runtime/src/kmp.h
openmp/runtime/src/kmp_csupport.cpp
openmp/runtime/src/kmp_ftn_os.h
openmp/runtime/src/kmp_gsupport.cpp
openmp/runtime/src/kmp_os.h