[PATCH] D158266: Patch for Support to loop bind clause : Checking Parent Region

Sunil K via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 18 03:01:33 PDT 2023


koops created this revision.
koops added reviewers: ddpagan, ABataev, jdoerfert, dreachem, tianshilei1992, soumitra, RitanyaB, thakis.
Herald added a project: All.
koops requested review of this revision.
Herald added subscribers: cfe-commits, jplehr, sstefan1.
Herald added a project: clang.

https://github.com/llvm/llvm-project/issues/64728
In https://reviews.llvm.org/D144634 : Support for Code Generation of loop bind clause,
before mapping a directive to the new directive there is a need to check if the parent directive/region is proper for the new mapped directive. e.g.
#pragma omp parallel for
for () {

  #pragma omp loop bind(parallel)
  for() {}

}.

After mapping "omp loop bind(parallel)" to "omp for" the above example becomes:
#pragma omp parallel for
for () {

  #pragma omp for
  for() {}

}.
However, it is illegal to have a "for" region within another "for" region. Thanks to David Pagan for pointing this out.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D158266

Files:
  clang/include/clang/Basic/OpenMPKinds.h
  clang/include/clang/Sema/Sema.h
  clang/lib/Basic/OpenMPKinds.cpp
  clang/lib/Sema/SemaOpenMP.cpp
  clang/test/OpenMP/loop_bind_messages.cpp
  clang/test/PCH/pragma-loop.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158266.551446.patch
Type: text/x-patch
Size: 7831 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230818/2c938c29/attachment-0001.bin>


More information about the cfe-commits mailing list