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

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 22 07:46:16 PDT 2023


yaxunl 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>;
+
----------------
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


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