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
6 changes: 5 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
compiler: [g++, clang++]
compiler: [g++-14, clang++-19]
generator: [Ninja]
export_commands: [OFF]
build_type: [Debug, Release]
Expand All @@ -56,6 +56,10 @@ jobs:
if: ${{ matrix.generator == 'Ninja' }}
run: sudo apt install ninja-build

- name: Install Clang 19
if: ${{ matrix.compiler == 'clang++-19' }}
run: sudo apt install clang-19

- name: Install clang-tidy
if: ${{ matrix.export_commands == 'ON' }}
run: sudo apt install clang-tidy
Expand Down
18 changes: 13 additions & 5 deletions cmake/dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ CPMAddPackage(
VERSION 7.30
EXCLUDE_FROM_ALL True
SYSTEM True
DOWNLOAD_ONLY True
)
DOWNLOAD_ONLY True)

# llvm
find_package(LLVM 18.1.3 CONFIG REQUIRED)
Expand All @@ -52,7 +51,7 @@ CPMAddPackage(
EXCLUDE_FROM_ALL True
SYSTEM True
OPTIONS "ASMJIT_STATIC ON"
OPTIONS "ASMJIT_NO_DEPRECATED ON")
OPTIONS "ASMJIT_NO_FOREIGN ON")

# mir
CPMAddPackage(
Expand All @@ -62,5 +61,14 @@ CPMAddPackage(
EXCLUDE_FROM_ALL True
SYSTEM True
OPTIONS "BUILD_TESTING OFF"
DOWNLOAD_ONLY True
)
DOWNLOAD_ONLY True)

# TPDE
CPMAddPackage(
NAME tpde
GITHUB_REPOSITORY tpde2/tpde
GIT_TAG 6ca9d23175b4689e9a1342a584f6a57d46406bfb
EXCLUDE_FROM_ALL True
SYSTEM True
OPTIONS "TPDE_ENABLE_ENCODEGEN OFF" "TPDE_ENABLE_LLVM OFF"
"TPDE_INCLUDE_TESTS OFF")
1 change: 1 addition & 0 deletions src/jit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ add_subdirectory(llvm)
add_subdirectory(asmjit)
add_subdirectory(mir)
add_subdirectory(factory)
add_subdirectory(tpde)
10 changes: 8 additions & 2 deletions src/jit/factory/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@ add_library(prot_jit_factory STATIC factory.cc)
target_link_libraries(
prot_jit_factory
PUBLIC PROT::exec_engine
PRIVATE PROT::defaults PROT::JIT::xbyak PROT::JIT::asmjit PROT::JIT::base
PROT::JIT::llvmbased PROT::JIT::lightning PROT::JIT::mir)
PRIVATE PROT::defaults
PROT::JIT::xbyak
PROT::JIT::asmjit
PROT::JIT::base
PROT::JIT::llvmbased
PROT::JIT::lightning
PROT::JIT::mir
PROT::JIT::tpde)

target_include_directories(prot_jit_factory PUBLIC include)

Expand Down
4 changes: 3 additions & 1 deletion src/jit/factory/factory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "prot/jit/lightning.hh"
#include "prot/jit/llvmbasedjit.hh"
#include "prot/jit/mir.hh"
#include "prot/jit/tpde.hh"
#include "prot/jit/xbyak.hh"

namespace prot::engine {
Expand All @@ -20,7 +21,8 @@ const std::unordered_map<std::string_view,
[]() { return std::make_unique<CachedInterpreter>(); }},
{"llvm", []() { return makeLLVMBasedJIT(); }},
{"lightning", []() { return makeLightning(); }},
{"mir", []() { return makeMirJit(); }}};
{"mir", []() { return makeMirJit(); }},
{"tpde", []() { return makeTPDE(); }}};

std::vector<std::string_view> JitFactory::backends() {
std::vector<std::string_view> res(kFactories.size());
Expand Down
8 changes: 8 additions & 0 deletions src/jit/tpde/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
add_library(prot_jit_tpde STATIC tpde.cc)
target_link_libraries(
prot_jit_tpde
PUBLIC PROT::isa PROT::exec_engine
PRIVATE PROT::defaults fmt::fmt tpde::tpde PROT::JIT::base)
target_include_directories(prot_jit_tpde PUBLIC include)

add_library(PROT::JIT::tpde ALIAS prot_jit_tpde)
12 changes: 12 additions & 0 deletions src/jit/tpde/include/prot/jit/tpde.hh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#ifndef PROT_JIT_TPDE_HH_INCLUDED
#define PROT_JIT_TPDE_HH_INCLUDED

#include <memory>

#include "prot/exec_engine.hh"

namespace prot::engine {
std::unique_ptr<ExecEngine> makeTPDE();
}

#endif // PROT_JIT_TPDE_HH_INCLUDED
6 changes: 6 additions & 0 deletions src/jit/tpde/tpde.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include "prot/jit/tpde.hh"
#include "prot/jit/base.hh"

namespace prot::engine {
std::unique_ptr<ExecEngine> makeTPDE() { return {}; }
} // namespace prot::engine
Loading