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

Shilei Tian via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Jul 23 13:49:27 PDT 2021


tianshilei1992 created this revision.
Herald added subscribers: guansong, yaxunl, mgorny.
tianshilei1992 requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: openmp-commits, sstefan1.
Herald added a project: OpenMP.

We build `deviceRTLs` with `-O1` by default, which also triggers OpenMPOpt. When
the info cache is created, some attributes are removed. As a result, although we
mark a few functions `noinline`, they are still inlined when the bitcode library
is generated. This can cause an issue in middle end optimization.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D106710

Files:
  openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt


Index: openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt
===================================================================
--- openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt
+++ openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt
@@ -159,6 +159,7 @@
              -Xclang -aux-triple -Xclang ${aux_triple}
              -fopenmp -fopenmp-cuda-mode -Xclang -fopenmp-is-device
              -Xclang -target-feature -Xclang +ptx61
+             -mllvm -openmp-opt-disable
              -D__CUDACC__
              -I${devicertl_base_directory}
              -I${devicertl_common_directory}/include


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106710.361337.patch
Type: text/x-patch
Size: 603 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210723/36a9d126/attachment-0001.bin>


More information about the Openmp-commits mailing list