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

Johannes Doerfert via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 22 16:58:17 PDT 2023


jdoerfert resigned from this revision.
jdoerfert added inline comments.


================
Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:8635
+  "HIP does not support OpenMP target directives; directive has been ignored">,
+  InGroup<HIPOpenMPOffloading>;
+
----------------
yaxunl wrote:
> mhalk wrote:
> > >>! In D145591#4182945, @jdoerfert wrote:
> > > I would emit an error. A warning only if we can ensure the code does something sensible. Right now, I doubt that is the case, similarly I doubt we actually ignore things.
> > 
> > @yaxunl Just wanted to point out: If we added `DefaultError` here, the SemA would emit an error as preferred by Johannes.
> > But one could still disable it via `-Wno-hip-omp-target-directives` even with `-Werror` (or also demote it via `-Wno-error=hip-omp-target-directives`).
> > 
> > Would that be acceptable for everyone?
> LGTM
That sounds sensible.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145591/new/

https://reviews.llvm.org/D145591



More information about the cfe-commits mailing list