[Bug tree-optimization/82251] New: OpenMP omp_is_initial_device early folding
tschwinge at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Sep 19 10:42:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82251
Bug ID: 82251
Summary: OpenMP omp_is_initial_device early folding
Product: gcc
Version: 8.0
Status: UNCONFIRMED
Keywords: openmp
Severity: enhancement
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: tschwinge at gcc dot gnu.org
CC: jakub at gcc dot gnu.org
Target Milestone: ---
As discussed, similar to how acc_on_device is, "omp_is_initial_device should
also be implemented as a builtin"
(<http://mid.mail-archive.com/87k350n6zl.fsf@schwinge.name>);
"omp_is_initial_device [...] eventually can be inlined by the compiler on NVPTX
target or perhaps any ACCEL_COMPILER, but we need to provide a library version
anyway, you can take address of the function etc."
(<http://mid.mail-archive.com/20150924074315.GB1847@tucnak.redhat.com>).
Fortran handling is expected to require more effort than C and C++, see
PR82250.
As may be necessary, care has to be taken to not break the special handling in
libgomp for Intel MIC offloading
(<http://mid.mail-archive.com/20160614155316.GA17678@msticlxl57.ims.intel.com>),
and HSA offloading currently per gcc/hsa-gen.c:hsa_init_simple_builtins expands
omp_is_initial_device to a zero constant.
More information about the Gcc-bugs
mailing list