[Openmp-commits] [openmp] f1b8fa5 - [OpenMP][NVPTX] Disable OpenMPOpt when building deviceRTLs

Shilei Tian via Openmp-commits openmp-commits at lists.llvm.org
Sun Jul 25 07:38:32 PDT 2021


Author: Shilei Tian
Date: 2021-07-25T10:38:27-04:00
New Revision: f1b8fa55d03315744a88035aa46fbbf9ec6ae622

URL: https://github.com/llvm/llvm-project/commit/f1b8fa55d03315744a88035aa46fbbf9ec6ae622
DIFF: https://github.com/llvm/llvm-project/commit/f1b8fa55d03315744a88035aa46fbbf9ec6ae622.diff

LOG: [OpenMP][NVPTX] Disable OpenMPOpt when building deviceRTLs

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.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D106710

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt b/openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt
index 2f16dbb3dd781..a07f4f7fa6ae6 100644
--- a/openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt
+++ b/openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt
@@ -153,7 +153,7 @@ set(cuda_src_files
 
 # Set flags for LLVM Bitcode compilation.
 set(bc_flags -S -x c++ -O1 -std=c++14
-             -mllvm -openmp-opt-disable-internalization
+             -mllvm -openmp-opt-disable
              -target nvptx64
              -Xclang -emit-llvm-bc
              -Xclang -aux-triple -Xclang ${aux_triple}


        


More information about the Openmp-commits mailing list