[llvm] [LLVM][OpenMP] Allow OpenMPOpt to handle non-OpenMP target regions (PR #67075)

Shilei Tian via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 21 20:52:56 PDT 2023


shiltian wrote:

> > Given this pass is called OpenMPOpt, IMO we want to ignore CUDA kernels.
> 
> We won't run OpenMPOpt if there's no `openmp` in the module, so this only occurs during LTO linking of merged OpenMP and CUDA modules. Wouldn't this cause issues for regular functions? Are we assume a function shared between an OpenMP and CUDA kernel cannot be optimized?

We don't assume that, but kernel is different because it is the entry point, so we can ignore them. We can have functions from CUDA and used in OpenMP. That is totally fine, even without the patch.

https://github.com/llvm/llvm-project/pull/67075


More information about the llvm-commits mailing list