[Openmp-commits] [PATCH] D69489: [libomptarget] Change nvcc compilation to use a unity build

Jon Chesterfield via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Oct 30 19:00:37 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rGe9f9dfab82bb: [libomptarget] Change nvcc compilation to use a unity build (authored by JonChesterfield).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69489

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


Index: openmp/libomptarget/deviceRTLs/nvptx/unity.cu
===================================================================
--- /dev/null
+++ openmp/libomptarget/deviceRTLs/nvptx/unity.cu
@@ -0,0 +1,25 @@
+//===------ unity.cu - Unity build of NVPTX deviceRTL ------------ CUDA -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// Support compilers, specifically NVCC, which have not implemented link time
+// optimisation. This removes the runtime cost of moving inline functions into
+// source files in exchange for preventing efficient incremental builds.
+//
+//===----------------------------------------------------------------------===//
+
+#include "src/cancel.cu"
+#include "src/critical.cu"
+#include "src/data_sharing.cu"
+#include "src/libcall.cu"
+#include "src/loop.cu"
+#include "src/omp_data.cu"
+#include "src/omptarget-nvptx.cu"
+#include "src/parallel.cu"
+#include "src/reduction.cu"
+#include "src/sync.cu"
+#include "src/task.cu"
Index: openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt
===================================================================
--- openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt
+++ openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt
@@ -88,7 +88,7 @@
   set(BUILD_SHARED_LIBS OFF)
   set(CUDA_SEPARABLE_COMPILATION ON)
   list(APPEND CUDA_NVCC_FLAGS -I${devicertl_base_directory})
-  cuda_add_library(omptarget-nvptx STATIC ${cuda_src_files} ${omp_data_objects}
+  cuda_add_library(omptarget-nvptx STATIC unity.cu
       OPTIONS ${CUDA_ARCH} ${CUDA_DEBUG})
 
   # Install device RTL under the lib destination folder.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69489.227211.patch
Type: text/x-patch
Size: 1831 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20191031/c4c6f726/attachment-0001.bin>


More information about the Openmp-commits mailing list