]> rtime.felk.cvut.cz Git - hercules2020/hercules-compiler.git/commitdiff
Check first for generated Option.h in build directory and then at the original location
authorKreiliger, Flavio <kreilfla@fel.cvut.cz>
Thu, 22 Nov 2018 11:04:38 +0000 (11:04 +0000)
committerMichal Sojka <michal.sojka@cvut.cz>
Thu, 22 Nov 2018 16:00:49 +0000 (17:00 +0100)
debian/patches/configure-herculescompiler-via-cmake.patch

index fff6fc5c1f56ded12e550934b813a5ee2974fcc6..f64327c606b89192d3d83c7b74859b2ce7528c7f 100644 (file)
@@ -5,7 +5,7 @@
  MESSAGE( STATUS "PROJECTS_MAIN_INCLUDE_DIR = " ${PROJECTS_MAIN_INCLUDE_DIR} )
  
 -include_directories(${PROJECTS_MAIN_INCLUDE_DIR})
-+include_directories(${PROJECTS_MAIN_INCLUDE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/include)
++include_directories(${CMAKE_CURRENT_BINARY_DIR}/include ${PROJECTS_MAIN_INCLUDE_DIR})
 +
 +include(CMakeDependentOption)
 +
 +configure_file(include/Config/Options.h.in include/Config/Options.h)
  
  add_subdirectory(src)
---- a/HerculesCompiler/llvm-passes/include/Config/Options.h
-+++ /dev/null
-@@ -1,147 +0,0 @@
--
--// ----------------------------
--// ---- CORE CONFIGURATION ----
--// ----------------------------
--
--// Amount of bytes available in the SPM or cache
--// SPM (TX1, TX2) = 48000
--// CACHE TX1 CPU  = 524288
--// CACHE TX1 GPU  = 262144
--// CACHE TX2 GPU  = 524288
--// CACHE TX2 CPU  = 524288
--#define CPU_CACHE_SIZE_DEFAULT  524288
--#define GPU_CACHE_SIZE_DEFAULT  524288
--#define GPU_SCRATCHPAD_SIZE_DEFAULT 48000
--
--// Use hardware cache prefetches in Specialized function, in place of SPM-based.
--//#define USE_HW_CACHES
--
--// Use hierarchical PREM intervals for loops.
--#define HIERARCHICAL_INTERVALS
--
--// -----------------------------
--// ---- CACHE CONFIGURATION ----
--// -----------------------------
--
--// If we use hardware caches, we can either use load or prefetch instructions
--// to bring the data local.
--#define PREFETCH_REPS 1
--#define USE_HW_CACHES_PREFETCH
--//#define USE_HW_CACHES_INLINEPTX_PREFETCH
--//#define USE_HW_CACHES_LIBCALL
--//#define USE_HW_CACHES_VOLALOAD
--
--// Use a single writeback function when using caches
--//#define USE_HW_CACHES_SINGLEWRITEBACK
--#define USE_HW_CACHES_INDWRITEBACK_LIBCALL
--//#define USE_HW_CACHES_INDWRITEBACK_INLINE
--
--// ---------------------------------------
--// ---- CODE GENERATION CONFIGURATION ----
--// ---------------------------------------
--
--// Allow exporting of PREMized functions through external linkage (useful for
--// compiling PREMized library functions).
--//#define ULES_EXTERNAL_LINKAGE
--
--// Inlining of specialized functions
--#define ALWAYS_INLINE_UNSPECIALIZED
--#define ALWAYS_INLINE_LOAD
--#define ALWAYS_INLINE_EXECUTE
--#define ALWAYS_INLINE_STORE
--
--// Inlining of call trees in Channel Arg Insertion
--#define AGGRESSIVELY_INLINE_CALL_TREE
--
--// -------------------------------------------------
--// ---- ADVANCED OPTIONS ---- DEFAULTS ARE SANE ----
--// -------------------------------------------------
--
--// Synchronization
--#define USE_PREM_INIT_FINI
--
--// Use the new DMA-like loading of data for Load and/or Store phases
--#define NEVER_USE_SOFTDMA
--
--// Scheduling
--//#define SCHEDULE_COMPATIBLE
--#define SCHEDULE_LES
--//#define SCHEDULE_COMBINED
--
--// COMBINED schedule only: Number of threads to use for Specialized
--#define NUM_THREADS_LES_IN_COMBINED 512
--
--// The size in bytes of a cache line (128 bytes on TX1)
--#define CACHE_LINE_SIZE 128
--
--// Inlining of synchronization functions
--//#define NEVER_INLINE_SYNC
--
--// -------------------------------------------------------------------------- //
--// ---- DO NOT CHANGE BELOW THIS LINE ---- AUTOGENERATION BASED ON ABOVE ---- //
--// -------------------------------------------------------------------------- //
--
--// Check that schedule is sane.
--#if defined(SCHEDULE_COMPATIBLE) &&                                            \
--    (defined(SCHEDULE_LES) || defined(SCHEDULE_COMBINED))
--#error Multiple schedules defined!
--#endif
--#if defined(SCHEDULE_LES) &&                                                   \
--    (defined(SCHEDULE_COMPATIBLE) || defined(SCHEDULE_COMBINED))
--#error Multiple schedules defined!
--#endif
--#if defined(SCHEDULE_COMBINED) &&                                              \
--    (defined(SCHEDULE_LES) || defined(SCHEDULE_COMPATIBLE))
--#error Multiple schedules defined!
--#endif
--#if !defined(SCHEDULE_COMPATIBLE) && !defined(SCHEDULE_LES) &&                 \
--    !defined(SCHEDULE_COMBINED)
--#error No schedule defined!
--#endif
--
--// Check that the HW CACHE config is sane.
--#ifdef USE_HW_CACHES
--#define DONT_SPECIALIZE_EXECUTE
--//#  if defined(USE_HW_CACHES_PREFETCH) && defined(USE_HW_CACHES_VOLALOAD)
--//#    error Using both volatile loads and prefetches for HW CACHE mode.
--//#  endif
--#if !defined(USE_HW_CACHES_PREFETCH) && !defined(USE_HW_CACHES_VOLALOAD) &&    \
--    !defined(USE_HW_CACHES_INLINEPTX_PREFETCH) &&                              \
--    !defined(USE_HW_CACHES_LIBCALL)
--#error No policy for HW caches defined!
--#endif
--#if defined(USE_HW_CACHES_INLINEPTX_PREFETCH) &&                               \
--    (defined(USE_HW_CACHES_PREFETCH) || defined(USE_HW_CACHES_VOLALOAD))
--#error Multiple cache policies defined!
--#endif
--#if defined(USE_HW_CACHES_PREFETCH) &&                                         \
--    (defined(USE_HW_CACHES_INLINEPTX_PREFETCH) ||                              \
--     defined(USE_HW_CACHES_VOLALOAD))
--#error Multiple cache policies defined!
--#endif
--#if defined(USE_HW_CACHES_VOLALOAD) &&                                         \
--    (defined(USE_HW_CACHES_PREFETCH) ||                                        \
--     defined(USE_HW_CACHES_INLINEPTX_PREFETCH))
--#error Multiple cache policies defined!
--#endif
--
--#if defined(USE_HW_CACHES_SINGLEWRITEBACK) &&                                  \
--    defined(USE_HW_CACHES_INDWRITEBACK_LIBCALL) &&                             \
--    defined(USE_HW_CACHES_INDWRITEBACK_INLINE)
--#error Multiple cache writeback policies!
--#elif defined(USE_HW_CACHES_INDWRITEBACK_LIBCALL) &&                           \
--    defined(USE_HW_CACHES_INDWRITEBACK_INLINE)
--#error Multiple cache writeback policies!
--#elif defined(USE_HW_CACHES_SINGLEWRITEBACK) &&                                \
--    defined(USE_HW_CACHES_INDWRITEBACK_INLINE)
--#error Multiple cache writeback policies!
--#elif defined(USE_HW_CACHES_SINGLEWRITEBACK) &&                                \
--    defined(USE_HW_CACHES_INDWRITEBACK_LIBCALL)
--#error Multiple cache writeback policies!
--#endif
--#endif
--
--// Warning
--#ifdef EMPTY_COMPUTE_PHASE
--#warning Empty compute phase!
--#endif
 --- /dev/null
 +++ b/HerculesCompiler/llvm-passes/include/Config/Options.h.in
 @@ -0,0 +1,147 @@