[Openmp-commits] [PATCH] D82822: [OpenMP][FIX] Consistently use OpenMPIRBuilder if requested

Johannes Doerfert via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Jun 29 16:54:47 PDT 2020


jdoerfert created this revision.
jdoerfert added reviewers: anchu-rajendran, kiranktp, fghanim.
Herald added subscribers: sstefan1, guansong, bollu, yaxunl.
Herald added a project: clang.

When we use the OpenMPIRBuilder for the parallel region we need to also
use it to get the thread ID (among other things) in the body. This is
because CGOpenMPRuntime::getThreadID() and
CGOpenMPRuntime::emitUpdateLocation implicitly assumes that if they are
called from within a parallel region there is a certain structure to the
code and certain members of the OMPRegionInfo are initialized. It might
make sense to initialize them even if we use the OpenMPIRBuilder but we
would preferably get rid of such state instead.

Bug reported by Anchu Rajendran Sudhakumari.

Depends on D82470 <https://reviews.llvm.org/D82470>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D82822

Files:
  clang/lib/CodeGen/CGOpenMPRuntime.cpp
  clang/test/OpenMP/irbuilder_nested_parallel_for.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82822.274289.patch
Type: text/x-patch
Size: 22355 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20200629/616cb7b0/attachment-0001.bin>


More information about the Openmp-commits mailing list