1 | // x86 backend implementation |
---|---|
2 | |
3 | #pragma once |
4 | |
5 | #include "taichi/codegen/codegen.h" |
6 | |
7 | #ifdef TI_WITH_LLVM |
8 | #include "llvm/IR/Module.h" |
9 | #endif |
10 | |
11 | namespace taichi::lang { |
12 | |
13 | class KernelCodeGenWASM : public KernelCodeGen { |
14 | public: |
15 | explicit KernelCodeGenWASM(const CompileConfig &compile_config, |
16 | Kernel *kernel, |
17 | TaichiLLVMContext &tlctx) |
18 | : KernelCodeGen(compile_config, kernel, tlctx) { |
19 | } |
20 | |
21 | FunctionType compile_to_function() override; |
22 | |
23 | #ifdef TI_WITH_LLVM |
24 | LLVMCompiledTask compile_task( |
25 | const CompileConfig &config, |
26 | std::unique_ptr<llvm::Module> &&module = nullptr, |
27 | OffloadedStmt *stmt = nullptr) override; // AOT Module Gen |
28 | |
29 | LLVMCompiledKernel compile_kernel_to_module() override; |
30 | #endif |
31 | }; |
32 | |
33 | } // namespace taichi::lang |
34 |