Loading clang/CMakeLists.txt +9 −0 Original line number Diff line number Diff line Loading @@ -873,6 +873,15 @@ if(CLANG_BUILT_STANDALONE) llvm_distribution_add_targets() endif() option(CLANG_ENABLE_KITSUNE "Enable Kitsune features in Clang." ON) if(CLANG_ENABLE_KITSUNE) add_subdirectory(kitsune) endif() configure_file( ${CLANG_SOURCE_DIR}/include/clang/Config/config.h.cmake ${CLANG_BINARY_DIR}/include/clang/Config/config.h) configure_file( ${CLANG_SOURCE_DIR}/include/clang/Config/kitsune.h.cmake ${CLANG_BINARY_DIR}/include/clang/Config/kitsune.h) clang/include/clang/Basic/DiagnosticDriverKinds.td +22 −25 Original line number Diff line number Diff line Loading @@ -488,29 +488,26 @@ def warn_drv_libstdcxx_not_found : Warning< def err_drv_cannot_mix_options : Error<"cannot specify '%1' along with '%0'">; def warn_missing_tapir_opencilk_config_opts : Warning< "Unable to find configuration options file ('opencilk-opts.cfg') for " "'-ftapir=opencilk' option.">, InGroup<UnknownRuntime>; def warn_missing_tapir_qthreads_config_opts : Warning< "Unable to find configuration options file ('qtheads-opts.cfg') for " "'-ftapir=qthreads' option.">, InGroup<UnknownRuntime>; def warn_missing_tapir_realm_config_opts : Warning< "Unable to find configuration options file ('realm-opts.cfg') for " "'-ftapir=realm' option.">, InGroup<UnknownRuntime>; def warn_missing_tapir_cuda_config_opts : Warning< "Unable to find configuration options file ('cuda-opts.cfg') for " "'-ftapir=cuda' option.">, InGroup<UnknownRuntime>; def warn_missing_tapir_opencl_config_opts : Warning< "Unable to find configuration options file ('opencl-opts.cfg') for " "'-ftapir=opencl' option.">, InGroup<UnknownRuntime>; def warn_missing_kitsune_kokkos_opts : Warning< "'Unable to find configuration options file ('kokkos-opts.cfg') for " "'-fkokkos' option.">, InGroup<UnknownRuntime>; // -----+ def warn_drv_missing_cfg_file : Warning< "cannot find clang configuration file, %0, in support of option: %1.">; def err_drv_cannot_read_kitsune_cfg_file : Error< "cannot read clang configuration file, %0, in support of option: %1.">; // catching configuration issues at build is a pain w/out a ton of #ifdef // litter. we instead opt to warning users in cases where the options are // used but were not enabled at build time. def warn_drv_kokkos_disabled : Warning< "kokkos support was not enabled when clang was built.">; def warn_drv_openmp_rt_target_disabled : Warning< "the openmp runtime ABI transform target was not enabled when clang was built.">; def warn_drv_qthreads_rt_target_disabled: Warning< "the qthreads runtime ABI transform target was not enabled when clang was built.">; def warn_drv_realm_rt_target_disabled: Warning< "the realm runtime ABI transform target was not enabled when clang was built.">; def warn_drv_cudatk_target_disabled: Warning< "the cuda toolkit runtime ABI transform target was not enabled when clang was built.">; def warn_drv_hip_target_disabled: Warning< "the hip runtime ABI transform target was not enabled when clang was built.">; def warn_drv_opencl_target_disabled: Warning< "the opencl toolkit runtime ABI transform target was not enabled when clang was built.">; } clang/include/clang/Basic/TokenKinds.def +6 −0 Original line number Diff line number Diff line Loading @@ -444,9 +444,15 @@ KEYWORD(_Cilk_spawn , KEYALL) KEYWORD(_Cilk_sync , KEYALL) KEYWORD(_Cilk_for , KEYALL) // Kitsune Extensions #ifdef KITSUNE_MANGLE_PARALLEL_KEYWORDS KEYWORD(_kitsune_spawn , KEYKITSUNE) KEYWORD(_kitsune_sync , KEYKITSUNE) KEYWORD(_kitsune_forall , KEYKITSUNE) #else KEYWORD(spawn , KEYKITSUNE) KEYWORD(sync , KEYKITSUNE) KEYWORD(forall , KEYKITSUNE) #endif // MSVC12.0 / VS2013 Type Traits TYPE_TRAIT_1(__is_destructible, IsDestructible, KEYMS) Loading clang/include/clang/Config/config.h.cmake +5 −25 Original line number Diff line number Diff line Loading @@ -47,10 +47,9 @@ /* Directories clang will search for headers */ #define C_INCLUDE_DIRS "${C_INCLUDE_DIRS}" /* Directories clang will search for configuration files */ /* Directories clang will search for configuration files w/ kitsune+tapir extensions */ #cmakedefine CLANG_CONFIG_FILE_SYSTEM_DIR "${CLANG_CONFIG_FILE_SYSTEM_DIR}" #cmakedefine CLANG_CONFIG_FILE_USER_DIR "${CLANG_CONFIG_FILE_USER_DIR}" #cmakedefine KITSUNE_CONFIG_FILE_USER_DIR "${KITSUNE_CONFIG_FILE_DIR}" /* Default <path> to all compiler invocations for --sysroot=<path>. */ #define DEFAULT_SYSROOT "${DEFAULT_SYSROOT}" Loading Loading @@ -87,28 +86,9 @@ /* Spawn a new process clang.exe for the CC1 tool invocation, when necessary */ #cmakedefine01 CLANG_SPAWN_CC1 /* ===== kitsune-centric settings */ #cmakedefine01 KITSUNE_ENABLE_KOKKOS #define KITSUNE_KOKKOS_INCLUDE_DIR "${Kokkos_INCLUDE_DIR}" #define KITSUNE_KOKKOS_LIBRARY_DIR "${Kokkos_LIBRARY_DIR}" #define KITSUNE_KOKKOS_LINK_LIBS "${Kokkos_LINK_LIBS}" #cmakedefine01 KITSUNE_ENABLE_QTHREADS #define KITSUNE_QTHREADS_INCLUDE_DIR "${Qthreads_INCLUDE_DIR}" #define KITSUNE_QTHREADS_LIBRARY_DIR "${Qthreads_LIBRARY_DIR}" #define KITSUNE_QTHREADS_LINK_LIBS "${Qthreads_LINK_LIBS}" #cmakedefine01 KITSUNE_ENABLE_REALM #define KITSUNE_REALM_LIBRARY_DIR "${Realm_LIBRARY_DIR}" #define KITSUNE_REALM_WRAPPER_LIBRARY_DIR "${Realm_WRAPPER_LIBRARY_DIR}" #define KITSUNE_REALM_LINK_LIBS "${Realm_LINK_LIBS}" #cmakedefine01 KITSUNE_ENABLE_OPENMP #define KITSUNE_OPENMP_LIBRARY_DIR "${OPENMP_LIBRARY_DIR}" #define KITSUNE_OPENMP_LINK_LIBS "${OPENMP_LINK_LIBS}" #cmakedefine01 KITSUNE_ENABLE_CUDA #define KITSUNE_CUDA_LIBRARY_DIR "${CUDA_LIBRARY_DIR}" #define KITSUNE_CUDA_LINK_LIBS "${CUDA_LINK_LIBS}" #cmakedefine01 CLANG_ENABLE_KITSUNE #if defined(CLANG_ENABLE_KITSUNE) #include "kitsune.h" #endif #endif clang/include/clang/Config/kitsune.h.cmake 0 → 100644 +52 −0 Original line number Diff line number Diff line /* * Copyright (c) 2020 Triad National Security, LLC * All rights reserved. * * This file is part of the kitsune/llvm project. It is released under * the LLVM license. */ #ifdef KITSUNE_CONFIG_H #error clang/Config/kitsune.h should only be included once. #else #define KITSUNE_CONFIG_H /* This should really never happen but just in case some * old code sneaks in... */ #ifndef CLANG_ENABLE_KITSUNE #error kitsune config included when CLANG_ENABLE_KITSUNE undefined. #endif #cmakedefine01 KITSUNE_MANGLE_PARALEL_KEYWORDS #cmakedefine01 KITSUNE_ENABLE_KOKKOS_SUPPORT #cmakedefine01 KITSUNE_ENABLE_OPENMP_TARGET #camkedefine01 KITSUNE_ENABLE_QTHREADS_TARGET #cmakedefine01 KITSUNE_ENABLE_REALM_TARGET #cmakedefine01 KITSUNE_ENABLE_CUDATK_TARGET #cmakedefine01 KITSUNE_ENABLE_HIP_TARGET #cmakedefine01 KITSUNE_ENABLE_OPENCL_TARGET /* kitsune-centric cfg file search location */ #cmakedefine KITSUNE_CONFIG_FILE_DIR "${KITSUNE_CONFIG_FILE_DIR}" /* kitsune+tapir ABI/runtime codegen targets */ /* Note: The OpenCilk target is (now) always enabled */ #cmakedefine01 KITSUNE_ENABLE_OPENMP_TARGET #cmakedefine01 KITSUNE_ENABLE_QTHREADS_TARGET #cmakedefine01 KITSUNE_ENABLE_CUDATK_TARGET #cmakedefine01 KITSUNE_ENABLE_REALM_TARGET /* kitsune+tapir default configuration filenames */ #cmakedefine KITSUNE_KOKKOS_CFG_FILENAME "${KITSUNE_KOKKOS_CFG_FILENAME}" #cmakedefine TAPIR_SERIAL_TARGET_CFG_FILENAME "${TAPIR_SERIAL_TARGET_CFG_FILENAME}" #cmakedefine TAPIR_OPENCILK_TARGET_CFG_FILENAME "${TAPIR_OPENCILK_TARGET_CFG_FILENAME}" #cmakedefine TAPIR_CUDA_TARGET_CFG_FILENAME "${TAPIR_CUDA_TARGET_CFG_FILENAME}" #cmakedefine TAPIR_REALM_TARGET_CFG_FILENAME "${TAPIR_REALM_TARGET_CFG_FILENAME}" #cmakedefine TAPIR_OPENMP_TARGET_CFG_FILENAME "${TAPIR_OPENMP_TARGET_CFG_FILENAME}" #cmakedefine TAPIR_QTHREADS_TARGET_CFG_FILENAME "${TAPIR_QTHREADS_TARGET_CFG_FILENAME}" #cmakedefine TAPIR_OPENCL_TARGET_CFG_FILENAME "${TAPIR_OPENCL_TARGET_CFG_FILENAME}" #cmakedefine TAPIR_HIP_TARGET_CFG_FILENAME "${TAPIR_HIP_TARGET_CFG_FILENAME}" #endif Loading
clang/CMakeLists.txt +9 −0 Original line number Diff line number Diff line Loading @@ -873,6 +873,15 @@ if(CLANG_BUILT_STANDALONE) llvm_distribution_add_targets() endif() option(CLANG_ENABLE_KITSUNE "Enable Kitsune features in Clang." ON) if(CLANG_ENABLE_KITSUNE) add_subdirectory(kitsune) endif() configure_file( ${CLANG_SOURCE_DIR}/include/clang/Config/config.h.cmake ${CLANG_BINARY_DIR}/include/clang/Config/config.h) configure_file( ${CLANG_SOURCE_DIR}/include/clang/Config/kitsune.h.cmake ${CLANG_BINARY_DIR}/include/clang/Config/kitsune.h)
clang/include/clang/Basic/DiagnosticDriverKinds.td +22 −25 Original line number Diff line number Diff line Loading @@ -488,29 +488,26 @@ def warn_drv_libstdcxx_not_found : Warning< def err_drv_cannot_mix_options : Error<"cannot specify '%1' along with '%0'">; def warn_missing_tapir_opencilk_config_opts : Warning< "Unable to find configuration options file ('opencilk-opts.cfg') for " "'-ftapir=opencilk' option.">, InGroup<UnknownRuntime>; def warn_missing_tapir_qthreads_config_opts : Warning< "Unable to find configuration options file ('qtheads-opts.cfg') for " "'-ftapir=qthreads' option.">, InGroup<UnknownRuntime>; def warn_missing_tapir_realm_config_opts : Warning< "Unable to find configuration options file ('realm-opts.cfg') for " "'-ftapir=realm' option.">, InGroup<UnknownRuntime>; def warn_missing_tapir_cuda_config_opts : Warning< "Unable to find configuration options file ('cuda-opts.cfg') for " "'-ftapir=cuda' option.">, InGroup<UnknownRuntime>; def warn_missing_tapir_opencl_config_opts : Warning< "Unable to find configuration options file ('opencl-opts.cfg') for " "'-ftapir=opencl' option.">, InGroup<UnknownRuntime>; def warn_missing_kitsune_kokkos_opts : Warning< "'Unable to find configuration options file ('kokkos-opts.cfg') for " "'-fkokkos' option.">, InGroup<UnknownRuntime>; // -----+ def warn_drv_missing_cfg_file : Warning< "cannot find clang configuration file, %0, in support of option: %1.">; def err_drv_cannot_read_kitsune_cfg_file : Error< "cannot read clang configuration file, %0, in support of option: %1.">; // catching configuration issues at build is a pain w/out a ton of #ifdef // litter. we instead opt to warning users in cases where the options are // used but were not enabled at build time. def warn_drv_kokkos_disabled : Warning< "kokkos support was not enabled when clang was built.">; def warn_drv_openmp_rt_target_disabled : Warning< "the openmp runtime ABI transform target was not enabled when clang was built.">; def warn_drv_qthreads_rt_target_disabled: Warning< "the qthreads runtime ABI transform target was not enabled when clang was built.">; def warn_drv_realm_rt_target_disabled: Warning< "the realm runtime ABI transform target was not enabled when clang was built.">; def warn_drv_cudatk_target_disabled: Warning< "the cuda toolkit runtime ABI transform target was not enabled when clang was built.">; def warn_drv_hip_target_disabled: Warning< "the hip runtime ABI transform target was not enabled when clang was built.">; def warn_drv_opencl_target_disabled: Warning< "the opencl toolkit runtime ABI transform target was not enabled when clang was built.">; }
clang/include/clang/Basic/TokenKinds.def +6 −0 Original line number Diff line number Diff line Loading @@ -444,9 +444,15 @@ KEYWORD(_Cilk_spawn , KEYALL) KEYWORD(_Cilk_sync , KEYALL) KEYWORD(_Cilk_for , KEYALL) // Kitsune Extensions #ifdef KITSUNE_MANGLE_PARALLEL_KEYWORDS KEYWORD(_kitsune_spawn , KEYKITSUNE) KEYWORD(_kitsune_sync , KEYKITSUNE) KEYWORD(_kitsune_forall , KEYKITSUNE) #else KEYWORD(spawn , KEYKITSUNE) KEYWORD(sync , KEYKITSUNE) KEYWORD(forall , KEYKITSUNE) #endif // MSVC12.0 / VS2013 Type Traits TYPE_TRAIT_1(__is_destructible, IsDestructible, KEYMS) Loading
clang/include/clang/Config/config.h.cmake +5 −25 Original line number Diff line number Diff line Loading @@ -47,10 +47,9 @@ /* Directories clang will search for headers */ #define C_INCLUDE_DIRS "${C_INCLUDE_DIRS}" /* Directories clang will search for configuration files */ /* Directories clang will search for configuration files w/ kitsune+tapir extensions */ #cmakedefine CLANG_CONFIG_FILE_SYSTEM_DIR "${CLANG_CONFIG_FILE_SYSTEM_DIR}" #cmakedefine CLANG_CONFIG_FILE_USER_DIR "${CLANG_CONFIG_FILE_USER_DIR}" #cmakedefine KITSUNE_CONFIG_FILE_USER_DIR "${KITSUNE_CONFIG_FILE_DIR}" /* Default <path> to all compiler invocations for --sysroot=<path>. */ #define DEFAULT_SYSROOT "${DEFAULT_SYSROOT}" Loading Loading @@ -87,28 +86,9 @@ /* Spawn a new process clang.exe for the CC1 tool invocation, when necessary */ #cmakedefine01 CLANG_SPAWN_CC1 /* ===== kitsune-centric settings */ #cmakedefine01 KITSUNE_ENABLE_KOKKOS #define KITSUNE_KOKKOS_INCLUDE_DIR "${Kokkos_INCLUDE_DIR}" #define KITSUNE_KOKKOS_LIBRARY_DIR "${Kokkos_LIBRARY_DIR}" #define KITSUNE_KOKKOS_LINK_LIBS "${Kokkos_LINK_LIBS}" #cmakedefine01 KITSUNE_ENABLE_QTHREADS #define KITSUNE_QTHREADS_INCLUDE_DIR "${Qthreads_INCLUDE_DIR}" #define KITSUNE_QTHREADS_LIBRARY_DIR "${Qthreads_LIBRARY_DIR}" #define KITSUNE_QTHREADS_LINK_LIBS "${Qthreads_LINK_LIBS}" #cmakedefine01 KITSUNE_ENABLE_REALM #define KITSUNE_REALM_LIBRARY_DIR "${Realm_LIBRARY_DIR}" #define KITSUNE_REALM_WRAPPER_LIBRARY_DIR "${Realm_WRAPPER_LIBRARY_DIR}" #define KITSUNE_REALM_LINK_LIBS "${Realm_LINK_LIBS}" #cmakedefine01 KITSUNE_ENABLE_OPENMP #define KITSUNE_OPENMP_LIBRARY_DIR "${OPENMP_LIBRARY_DIR}" #define KITSUNE_OPENMP_LINK_LIBS "${OPENMP_LINK_LIBS}" #cmakedefine01 KITSUNE_ENABLE_CUDA #define KITSUNE_CUDA_LIBRARY_DIR "${CUDA_LIBRARY_DIR}" #define KITSUNE_CUDA_LINK_LIBS "${CUDA_LINK_LIBS}" #cmakedefine01 CLANG_ENABLE_KITSUNE #if defined(CLANG_ENABLE_KITSUNE) #include "kitsune.h" #endif #endif
clang/include/clang/Config/kitsune.h.cmake 0 → 100644 +52 −0 Original line number Diff line number Diff line /* * Copyright (c) 2020 Triad National Security, LLC * All rights reserved. * * This file is part of the kitsune/llvm project. It is released under * the LLVM license. */ #ifdef KITSUNE_CONFIG_H #error clang/Config/kitsune.h should only be included once. #else #define KITSUNE_CONFIG_H /* This should really never happen but just in case some * old code sneaks in... */ #ifndef CLANG_ENABLE_KITSUNE #error kitsune config included when CLANG_ENABLE_KITSUNE undefined. #endif #cmakedefine01 KITSUNE_MANGLE_PARALEL_KEYWORDS #cmakedefine01 KITSUNE_ENABLE_KOKKOS_SUPPORT #cmakedefine01 KITSUNE_ENABLE_OPENMP_TARGET #camkedefine01 KITSUNE_ENABLE_QTHREADS_TARGET #cmakedefine01 KITSUNE_ENABLE_REALM_TARGET #cmakedefine01 KITSUNE_ENABLE_CUDATK_TARGET #cmakedefine01 KITSUNE_ENABLE_HIP_TARGET #cmakedefine01 KITSUNE_ENABLE_OPENCL_TARGET /* kitsune-centric cfg file search location */ #cmakedefine KITSUNE_CONFIG_FILE_DIR "${KITSUNE_CONFIG_FILE_DIR}" /* kitsune+tapir ABI/runtime codegen targets */ /* Note: The OpenCilk target is (now) always enabled */ #cmakedefine01 KITSUNE_ENABLE_OPENMP_TARGET #cmakedefine01 KITSUNE_ENABLE_QTHREADS_TARGET #cmakedefine01 KITSUNE_ENABLE_CUDATK_TARGET #cmakedefine01 KITSUNE_ENABLE_REALM_TARGET /* kitsune+tapir default configuration filenames */ #cmakedefine KITSUNE_KOKKOS_CFG_FILENAME "${KITSUNE_KOKKOS_CFG_FILENAME}" #cmakedefine TAPIR_SERIAL_TARGET_CFG_FILENAME "${TAPIR_SERIAL_TARGET_CFG_FILENAME}" #cmakedefine TAPIR_OPENCILK_TARGET_CFG_FILENAME "${TAPIR_OPENCILK_TARGET_CFG_FILENAME}" #cmakedefine TAPIR_CUDA_TARGET_CFG_FILENAME "${TAPIR_CUDA_TARGET_CFG_FILENAME}" #cmakedefine TAPIR_REALM_TARGET_CFG_FILENAME "${TAPIR_REALM_TARGET_CFG_FILENAME}" #cmakedefine TAPIR_OPENMP_TARGET_CFG_FILENAME "${TAPIR_OPENMP_TARGET_CFG_FILENAME}" #cmakedefine TAPIR_QTHREADS_TARGET_CFG_FILENAME "${TAPIR_QTHREADS_TARGET_CFG_FILENAME}" #cmakedefine TAPIR_OPENCL_TARGET_CFG_FILENAME "${TAPIR_OPENCL_TARGET_CFG_FILENAME}" #cmakedefine TAPIR_HIP_TARGET_CFG_FILENAME "${TAPIR_HIP_TARGET_CFG_FILENAME}" #endif