Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ endif()
if(RV_FOUND)
set(THORIN_ENABLE_RV TRUE)
endif()
configure_file(src/thorin/config.h.in ${CMAKE_BINARY_DIR}/include/thorin/config.h @ONLY)
configure_file(include/thorin/config.h.in ${CMAKE_BINARY_DIR}/include/thorin/config.h @ONLY)

add_subdirectory(src)

Expand Down
4 changes: 2 additions & 2 deletions cmake/thorin-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ find_path(Thorin_DIR
)

find_path(Thorin_ROOT_DIR
NAMES cmake/thorin-config.cmake.in src/thorin/world.h
NAMES cmake/thorin-config.cmake.in include/thorin/world.h
PATHS ${Thorin_DIR} $ENV{Thorin_DIR} ${Thorin_ROOT_DIR} "@CMAKE_CURRENT_SOURCE_DIR@" "@Thorin_ROOT_DIR@" "@CMAKE_SOURCE_DIR@")
list(APPEND CMAKE_MODULE_PATH "${Thorin_ROOT_DIR}/cmake/modules")

Expand All @@ -42,7 +42,7 @@ if(Thorin_HAS_LLVM_SUPPORT)
endif()
endif()

find_path(Thorin_INCLUDE_DIR NAMES thorin/world.h PATHS ${Thorin_ROOT_DIR}/src)
find_path(Thorin_INCLUDE_DIR NAMES thorin/world.h PATHS ${Thorin_ROOT_DIR}/include)
find_path(Thorin_CONFIG_DIR NAMES thorin/config.h
PATHS
${Thorin_DIR} ${AnyDSL_thorin_DIR} $ENV{Thorin_DIR}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
66 changes: 4 additions & 62 deletions src/thorin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,112 +1,55 @@
set(THORIN_SOURCES
continuation.cpp
continuation.h
debug.cpp
debug.h
def.cpp
def.h
enums.cpp
enums.h
primop.cpp
primop.h
rec_stream.cpp
type.cpp
type.h
world.cpp
world.h
analyses/cfg.cpp
analyses/cfg.h
analyses/domtree.cpp
analyses/domtree.h
analyses/free_defs.cpp
analyses/free_defs.h
analyses/looptree.cpp
analyses/looptree.h
analyses/schedule.cpp
analyses/schedule.h
analyses/scope.cpp
analyses/scope.h
analyses/verify.cpp
analyses/verify.h
be/codegen.cpp
be/codegen.h
be/emitter.h
be/c/c.cpp
be/c/c.h
be/kernel_config.h
tables/allnodes.h
tables/arithoptable.h
tables/cmptable.h
tables/nodetable.h
tables/primtypetable.h
tables/mathoptable.h
transform/cleanup_world.cpp
transform/closure_conversion.cpp
transform/closure_conversion.h
transform/codegen_prepare.h
transform/codegen_prepare.cpp
transform/dead_load_opt.cpp
transform/dead_load_opt.h
transform/hls_channels.cpp
transform/hls_kernel_launch.cpp
transform/hoist_enters.cpp
transform/hoist_enters.h
transform/flatten_tuples.cpp
transform/flatten_tuples.h
transform/importer.cpp
transform/importer.h
transform/inliner.cpp
transform/inliner.h
transform/lift_builtins.cpp
transform/lift_builtins.h
transform/mangle.cpp
transform/mangle.h
transform/resolve_loads.cpp
transform/resolve_loads.h
transform/partial_evaluation.cpp
transform/partial_evaluation.h
transform/resolve_loads.cpp
transform/rewrite.cpp
transform/rewrite.h
transform/split_slots.cpp
transform/split_slots.h
transform/hls_channels.cpp
transform/hls_channels.h
transform/hls_kernel_launch.h
transform/hls_kernel_launch.cpp
util/array.h
util/cast.h
util/hash.h
util/hash.cpp
util/indexmap.h
util/indexset.h
util/iterator.h
util/stream.cpp
util/stream.h
util/symbol.cpp
util/symbol.h
util/types.h
util/utility.h
util/graphviz_dump.cpp
util/scoped_dump.h
util/scoped_dump.cpp
)

if(LLVM_FOUND)
list(APPEND THORIN_SOURCES
be/llvm/cpu.cpp
be/llvm/cpu.h
be/llvm/llvm.cpp
be/llvm/llvm.h
be/llvm/amdgpu.cpp
be/llvm/amdgpu.h
be/llvm/amdgpu_hsa.cpp
be/llvm/amdgpu_hsa.h
be/llvm/amdgpu_pal.cpp
be/llvm/amdgpu_pal.h
be/llvm/nvvm.cpp
be/llvm/nvvm.h
be/llvm/parallel.cpp
be/llvm/runtime.inc
be/llvm/runtime.cpp
be/llvm/runtime.h
be/llvm/vectorize.cpp
)
endif()
Expand All @@ -120,12 +63,11 @@ endif()
if(THORIN_ENABLE_JSON)
list(APPEND THORIN_SOURCES
be/json/json.cpp
be/json/json.h
)
endif()

add_library(thorin ${THORIN_SOURCES})
target_include_directories(thorin PUBLIC ${Half_INCLUDE_DIRS} ${Thorin_ROOT_DIR}/src ${CMAKE_BINARY_DIR}/include)
target_include_directories(thorin PUBLIC ${Half_INCLUDE_DIRS} ${Thorin_ROOT_DIR}/src ${Thorin_ROOT_DIR}/include ${CMAKE_BINARY_DIR}/include)

if(LLVM_FOUND)
set(Thorin_LLVM_COMPONENTS core support ipo target ${LLVM_TARGETS_TO_BUILD})
Expand Down
2 changes: 1 addition & 1 deletion src/thorin/be/c/c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "thorin/transform/hls_channels.h"
#include "thorin/be/emitter.h"
#include "thorin/util/stream.h"
#include "c.h"
#include "thorin/be/c/c.h"

#include <cctype>
#include <cmath>
Expand Down
2 changes: 1 addition & 1 deletion src/thorin/be/json/json.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "json.h"
#include "thorin/be/json/json.h"

namespace thorin::json {

Expand Down
2 changes: 1 addition & 1 deletion src/thorin/transform/partial_evaluation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include "thorin/world.h"
#include "thorin/transform/mangle.h"
#include "thorin/util/hash.h"
#include "partial_evaluation.h"
#include "thorin/transform/partial_evaluation.h"

namespace thorin {

Expand Down
2 changes: 1 addition & 1 deletion src/thorin/transform/rewrite.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "rewrite.h"
#include "thorin/transform/rewrite.h"

namespace thorin {

Expand Down
2 changes: 1 addition & 1 deletion src/thorin/util/scoped_dump.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "scoped_dump.h"
#include "thorin/util/scoped_dump.h"

namespace thorin {

Expand Down