[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
Thu Mar 9 13:23:07 PST 2023


yaxunl added a comment.

In D145591#4182360 <https://reviews.llvm.org/D145591#4182360>, @jhuber6 wrote:

> I'm not a fan of the same warning being copied in 24 places. Why do we set `LangOpts.IsOpenMP` on the GPU compilation side, couldn't we just filter out the `-fopenmp` or whatever it is for the HIP job?

We cannot filter out `-fopenmp` for HIP job because the host code in HIP program needs it to support "omp parallel for" etc. Filtering it will break existing HIP programs.


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