From fca79b78c49cb55317d0ce243690db9c325b8782 Mon Sep 17 00:00:00 2001 From: Ye Luo Date: Fri, 8 Jul 2022 08:52:08 -0500 Subject: [PATCH] [libomptarget] compile DeviceRTL bc files with -O3 bc files of DeviceRTL are compiled with -O3, the same as the static library. Differential Revision: https://reviews.llvm.org/D129344 --- openmp/libomptarget/DeviceRTL/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openmp/libomptarget/DeviceRTL/CMakeLists.txt b/openmp/libomptarget/DeviceRTL/CMakeLists.txt index 00324df..8fd5620 100644 --- a/openmp/libomptarget/DeviceRTL/CMakeLists.txt +++ b/openmp/libomptarget/DeviceRTL/CMakeLists.txt @@ -129,8 +129,8 @@ set(src_files ${source_directory}/Workshare.cpp ) -set(clang_opt_flags -O1 -mllvm -openmp-opt-disable -DSHARED_SCRATCHPAD_SIZE=512) -set(link_opt_flags -O1 -openmp-opt-disable) +set(clang_opt_flags -O3 -mllvm -openmp-opt-disable -DSHARED_SCRATCHPAD_SIZE=512) +set(link_opt_flags -O3 -openmp-opt-disable) # Prepend -I to each list element set (LIBOMPTARGET_LLVM_INCLUDE_DIRS_DEVICERTL "${LIBOMPTARGET_LLVM_INCLUDE_DIRS}") @@ -245,7 +245,7 @@ foreach(mcpu ${amdgpu_mcpus}) endforeach() # Set the flags to build the device runtime from clang. -set(clang_lib_flags -fopenmp -fopenmp-cuda-mode -foffload-lto -fvisibility=hidden -Xopenmp-target=nvptx64-nvidia-cuda --cuda-feature=+ptx61 -mllvm -openmp-opt-disable -nocudalib -nogpulib -nostdinc -DSHARED_SCRATCHPAD_SIZE=512 -O3) +set(clang_lib_flags -fopenmp -fopenmp-cuda-mode -foffload-lto -fvisibility=hidden -Xopenmp-target=nvptx64-nvidia-cuda --cuda-feature=+ptx61 -nocudalib -nogpulib -nostdinc ${clang_opt_flags}) foreach(arch ${nvptx_sm_list}) set(clang_lib_flags ${clang_lib_flags} --offload-arch=sm_${arch}) endforeach() -- 2.7.4