ETISS 0.11.2
ExtendableTranslatingInstructionSetSimulator(version0.11.2)
Loading...
Searching...
No Matches
LLVMJIT.h
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-3-Clause
2//
3// This file is part of ETISS. It is licensed under the BSD 3-Clause License; you may not use this file except in
4// compliance with the License. You should have received a copy of the license along with this project. If not, see the
5// LICENSE file.
6
7#include <memory>
8#include <string>
9#include <set>
10#include <unordered_set>
11
12#include "etiss/JIT.h"
13
14class OrcJit;
15
16namespace etiss
17{
18
19class LLVMJIT : public etiss::JIT
20{
21 public:
22 LLVMJIT();
23 virtual ~LLVMJIT();
24 virtual void *translate(std::string code, std::set<std::string> headerpaths, std::set<std::string> librarypaths,
25 std::set<std::string> libraries, std::string &error, bool debug = false);
26 virtual void *getFunction(void *handle, std::string name, std::string &error);
27 virtual void free(void *handle);
28
29 private:
30 std::unique_ptr<OrcJit> orcJit_;
31 std::unordered_set<std::string> loadedLibs_;
32};
33
34} // namespace etiss
JIT compiler interface definition.
compiler interface for just in time compilation of generated C code
Definition JIT.h:29
virtual ~LLVMJIT()
Definition LLVMJIT.cpp:134
virtual void * getFunction(void *handle, std::string name, std::string &error)
returns a function pointer to a compiled function from the handle returned by etiss::JIT::translate
Definition LLVMJIT.cpp:215
std::unordered_set< std::string > loadedLibs_
Definition LLVMJIT.h:31
virtual void free(void *handle)
clean up handled returned by etiss::JIT::translate
Definition LLVMJIT.cpp:213
virtual void * translate(std::string code, std::set< std::string > headerpaths, std::set< std::string > librarypaths, std::set< std::string > libraries, std::string &error, bool debug=false)
translate C code to executable code and return a handle/pointer that identifies the compilation resul...
Definition LLVMJIT.cpp:136
std::unique_ptr< OrcJit > orcJit_
Definition LLVMJIT.h:30
forwards: include/jit/*
Definition Benchmark.h:17