[PATCH] D145591: [clang][HIP][OpenMP] Add warning if mixed HIP / OpenMP offloading

Michael Halkenhäuser via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 8 09:07:50 PST 2023


mhalk created this revision.
Herald added subscribers: guansong, yaxunl.
Herald added a project: All.
mhalk requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: cfe-commits, sstefan1.
Herald added a project: clang.

Adds a warning, issued by the clang semantic analysis, if HIP and OpenMP target offloading is requested concurrently.
That is, if HIP language mode is active but OpenMP target directives are encountered.
Previously, a user might not have been aware that target directives are ignored in such a case.

Generation of this warning is (lit-)tested via "make check-clang-semaopenmp".
The warning can be ignored via "-Wno-hip-omp-target-directives".


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D145591

Files:
  clang/include/clang/Basic/DiagnosticGroups.td
  clang/include/clang/Basic/DiagnosticSemaKinds.td
  clang/lib/Sema/SemaOpenMP.cpp
  clang/test/SemaOpenMP/hip-omp-mix.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145591.503401.patch
Type: text/x-patch
Size: 11921 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230308/ff7b536c/attachment-0001.bin>


More information about the cfe-commits mailing list