[Openmp-commits] [PATCH] D106710: [OpenMP][NVPTX] Disable OpenMPOpt when building deviceRTLs

Shilei Tian via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Sun Jul 25 17:46:03 PDT 2021


tianshilei1992 added a comment.

In D106710#2903223 <https://reviews.llvm.org/D106710#2903223>, @JonChesterfield wrote:

> Does the same issue not affect application code? Or in other words, what was the issue in the middle end that disabling the pass fixes?

That issue will not affect application. The issue is, in OpenMPOpt, when we build the information cache, such attributes will be stripped. For example, although we add `noinline` attribute to the function `__kmpc_parallel_level`, it is stripped. As a result, the function call in `__kmpc_parallel_51` is inlined. That is a problem when we optimize application code especially using attributor because we are using the information that the function call should be there. However, it is not a problem when we build the `deviceRTLs` as all OpenMP optimization must start with kernels, but when building the `deviceRTLs` there is no kernel so no optimization from OpenMPOpt is fired.
We disable OpenMPOpt when building `deviceRTLs`. It would not cause any problem as eventually it will be triggered along with application code.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106710



More information about the Openmp-commits mailing list