Skip to content

Commit

Permalink
[llvm] [aot] Split LlvmRuntimeExecutor from LlvmProgramImpl (#5207)
Browse files Browse the repository at this point in the history
* [llvm] [aot] Split LlvmRuntimeExecutor from LlvmProgramImpl part-1

* Bug fix

* Migrated more members

* Fixed minor issue

* Finished runtime members migration

* Fixed minor issue

* clean ups

* Split LlvmProgramImpl and LlvmRuntimeExecutor into separate files

* Fixed merge issues

* Rearranged private/public interfaces
  • Loading branch information
jim19930609 authored Jun 23, 2022
1 parent 6357cf0 commit 5cd3339
Show file tree
Hide file tree
Showing 8 changed files with 928 additions and 710 deletions.
4 changes: 2 additions & 2 deletions taichi/llvm/llvm_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ namespace lang {

using namespace llvm;

TaichiLLVMContext::TaichiLLVMContext(LlvmProgramImpl *llvm_prog, Arch arch)
TaichiLLVMContext::TaichiLLVMContext(CompileConfig *config, Arch arch)
: arch_(arch) {
TI_TRACE("Creating Taichi llvm context for arch: {}", arch_name(arch));
main_thread_id_ = std::this_thread::get_id();
Expand Down Expand Up @@ -94,7 +94,7 @@ TaichiLLVMContext::TaichiLLVMContext(LlvmProgramImpl *llvm_prog, Arch arch)
TI_NOT_IMPLEMENTED
#endif
}
jit = JITSession::create(this, llvm_prog->config, arch);
jit = JITSession::create(this, config, arch);
TI_TRACE("Taichi llvm context created.");
}

Expand Down
2 changes: 1 addition & 1 deletion taichi/llvm/llvm_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class TaichiLLVMContext {
// main_thread is defined to be the thread that runs the initializer
JITModule *runtime_jit_module{nullptr};

TaichiLLVMContext(LlvmProgramImpl *llvm_prog, Arch arch);
TaichiLLVMContext(CompileConfig *config, Arch arch);

virtual ~TaichiLLVMContext();

Expand Down
Loading

0 comments on commit 5cd3339

Please sign in to comment.