]> rtime.felk.cvut.cz Git - hercules2020/hercules-compiler.git/commitdiff
Fixed problems with compilation
authorFlavio Kreiliger <kreilfla@grid-03.cluster>
Thu, 6 Sep 2018 12:08:44 +0000 (14:08 +0200)
committerMichal Sojka <michal.sojka@cvut.cz>
Thu, 6 Sep 2018 18:09:33 +0000 (20:09 +0200)
  * Added trailing / to HERCULES_PASS_ROOT in Makefile to fix path problem during usage of the hercules compiler
  * Changed llvm-passes/include/Config/Options.h to solve errors during hercules configuration
     - enabled USE_HW_CACHES_INDWRITEBACK_LIBCALL, DONT_SPECIALIZE_EXECUTE and PREFETCH_REPS 1

Makefile
debian/patches/configuration.patch

index 035f964c25162eb1c943f04de8ead630df57b8f1..e2f656f0c8b49310d02bf3a3061964a514fe4115 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -47,7 +47,7 @@ build_native/build.ninja: | build_native
        cd $(@D) && cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$(PREFIX)" \
                -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_ENABLE_BACKTRACES=ON -DLLVM_ENABLE_WERROR=OFF \
                -DBUILD_SHARED_LIBS=OFF -DLLVM_ENABLE_RTTI=ON \
-               -DCMAKE_CXX_FLAGS='-DHERCULES_PASS_ROOT=\"$(PREFIX)/lib/hercules\"' \
+               -DCMAKE_CXX_FLAGS='-DHERCULES_PASS_ROOT=\"$(PREFIX)/lib/hercules/\"' \
                -G "Ninja" $(CURDIR)/llvm
 
 libpremnotify-cpu: export CC=$(DEB_HOST_GNU_TYPE)-gcc
@@ -58,7 +58,7 @@ build/build.ninja: | build llvm/tools/clang llvm/projects/openmp
        cd $(@D) && cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$(PREFIX)" \
                -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_ENABLE_BACKTRACES=ON -DLLVM_ENABLE_WERROR=OFF \
                -DBUILD_SHARED_LIBS=OFF -DLLVM_ENABLE_RTTI=ON $(LLVM_CROSS_FLAGS) \
-               -DCMAKE_CXX_FLAGS='-DHERCULES_PASS_ROOT=\"$(PREFIX)/lib/hercules\"' \
+               -DCMAKE_CXX_FLAGS='-DHERCULES_PASS_ROOT=\"$(PREFIX)/lib/hercules/\"' \
                -G "Ninja" $(CURDIR)/llvm
 
 $(TMP_DESTDIR)/$(PREFIX)/lib/cmake/llvm: | llvm-clang
index cbf9f164c1bb024a96fef95e9b2ed576c7c2b683..89054c0b2772cb137e46eb4bdb711fb28d0599dd 100644 (file)
@@ -1,10 +1,8 @@
 Description: Configuration for TX2 according to M24CompilerRuntime.docx
 
-Index: hercules-compiler/HerculesCompiler/llvm-passes/include/Config/Options.h
-===================================================================
---- hercules-compiler.orig/HerculesCompiler/llvm-passes/include/Config/Options.h
-+++ hercules-compiler/HerculesCompiler/llvm-passes/include/Config/Options.h
-@@ -41,17 +41,17 @@
+--- a/HerculesCompiler/llvm-passes/include/Config/Options.h
++++ b/HerculesCompiler/llvm-passes/include/Config/Options.h
+@@ -41,22 +41,22 @@
  //#define NEVER_INLINE_SYNC
  
  // Use hardware cache prefetches in Specialized function, in place of SPM-based.
@@ -20,16 +18,21 @@ Index: hercules-compiler/HerculesCompiler/llvm-passes/include/Config/Options.h
  //#define USE_HW_CACHES_VOLALOAD
  
  // Use a single writeback function when using caches
--//#define USE_HW_CACHES_SINGLEWRITEBACK
-+#define USE_HW_CACHES_SINGLEWRITEBACK
- //#define USE_HW_CACHES_INDWRITEBACK_LIBCALL
+ //#define USE_HW_CACHES_SINGLEWRITEBACK
+-//#define USE_HW_CACHES_INDWRITEBACK_LIBCALL
++#define USE_HW_CACHES_INDWRITEBACK_LIBCALL
  //#define USE_HW_CACHES_INDWRITEBACK_INLINE
  
-Index: hercules-compiler/clang/lib/Driver/ToolChains.cpp
-===================================================================
---- hercules-compiler.orig/clang/lib/Driver/ToolChains.cpp
-+++ hercules-compiler/clang/lib/Driver/ToolChains.cpp
-@@ -4967,7 +4967,7 @@ Tool *DragonFly::buildLinker() const {
+-//#define DONT_SPECIALIZE_EXECUTE
+-//#define PREFETCH_REPS 1
++#define DONT_SPECIALIZE_EXECUTE
++#define PREFETCH_REPS 1
+ // Allow exporting of PREMized functions through external linkage (useful for
+ // compiling PREMized library functions).
+--- a/clang/lib/Driver/ToolChains.cpp
++++ b/clang/lib/Driver/ToolChains.cpp
+@@ -4967,7 +4967,7 @@
  // macro for it. Also, select the default PTX version to be used. We use 4.2 for
  // compute capabilities older than 6.0 and 5.0 otherwise.
  #ifndef OPENMP_NVPTX_COMPUTE_CAPABILITY
@@ -38,11 +41,9 @@ Index: hercules-compiler/clang/lib/Driver/ToolChains.cpp
  #endif
  
  #if OPENMP_NVPTX_COMPUTE_CAPABILITY < 60
-Index: hercules-compiler/openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt
-===================================================================
---- hercules-compiler.orig/openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt
-+++ hercules-compiler/openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt
-@@ -66,7 +66,7 @@ if(LIBOMPTARGET_DEP_CUDA_FOUND)
+--- a/openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt
++++ b/openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt
+@@ -66,7 +66,7 @@
        set(CUDA_ARCH ${CUDA_ARCH} -gencode arch=compute_${sm},code=sm_${sm})
      endforeach()
    else()
@@ -51,7 +52,7 @@ Index: hercules-compiler/openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt
    endif()
    
    # Activate RTL message dumps if requested by the user.
-@@ -176,7 +176,7 @@ if(LIBOMPTARGET_DEP_CUDA_FOUND)
+@@ -176,7 +176,7 @@
            set(CUDA_ARCH ${CUDA_ARCH} --cuda-gpu-arch=sm_${sm})
          endforeach()
        else()