44#include "clang/Basic/DiagnosticOptions.h"
45#include "clang/CodeGen/CodeGenAction.h"
46#include "clang/Frontend/CompilerInstance.h"
47#include "clang/Frontend/CompilerInvocation.h"
48#include "clang/Frontend/FrontendDiagnostic.h"
49#include "clang/Frontend/TextDiagnosticPrinter.h"
50#include "llvm/ADT/SmallString.h"
51#include "llvm/ExecutionEngine/ExecutionEngine.h"
52#include "llvm/ExecutionEngine/Interpreter.h"
53#include "llvm/ExecutionEngine/MCJIT.h"
54#include "llvm/Support/TargetSelect.h"
55#include "llvm/Support/raw_ostream.h"
58#include "clang/Basic/DiagnosticOptions.h"
59#include "clang/Basic/TargetInfo.h"
60#include "clang/Basic/TargetOptions.h"
61#include "clang/Frontend/CompilerInstance.h"
62#include "clang/Frontend/TextDiagnosticPrinter.h"
63#include "llvm/ADT/IntrusiveRefCntPtr.h"
64#include "llvm/Analysis/LoopPass.h"
65#include "llvm/Analysis/Passes.h"
66#include "llvm/ExecutionEngine/ExecutionEngine.h"
67#include "llvm/IR/DataLayout.h"
68#include "llvm/IR/DerivedTypes.h"
69#include "llvm/IR/IRBuilder.h"
70#include "llvm/IR/LLVMContext.h"
71#include "llvm/IR/Module.h"
72#include "llvm/IR/Module.h"
73#include "llvm/Support/CommandLine.h"
74#include "llvm/Support/DynamicLibrary.h"
75#include "llvm/Support/FileSystem.h"
76#include "llvm/Support/Host.h"
77#include "llvm/Support/ManagedStatic.h"
78#include "llvm/Support/Path.h"
79#include "llvm/Support/TargetSelect.h"
80#include "llvm/Support/raw_ostream.h"
81#include "llvm/Target/TargetMachine.h"
82#include "llvm/Transforms/IPO.h"
83#include "llvm/Transforms/Scalar.h"
85#include <clang/CodeGen/CodeGenAction.h>
86#include <clang/Frontend/CompilerInstance.h>
87#include <clang/Frontend/CompilerInvocation.h>
88#include <clang/Frontend/TextDiagnosticPrinter.h>
90#include <llvm/ADT/IntrusiveRefCntPtr.h>
96#include <unordered_set>
108 virtual void *
translate(std::string code, std::set<std::string> headerpaths, std::set<std::string> librarypaths,
109 std::set<std::string> libraries, std::string &error,
bool debug =
false);
110 virtual void *
getFunction(
void *handle, std::string name, std::string &error);
111 virtual void free(
void *handle);
JIT compiler interface definition.
compiler interface for just in time compilation of generated C code
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
llvm::LLVMContext context_
std::unordered_set< std::string > loadedLibs_
virtual void free(void *handle)
clean up handled returned by etiss::JIT::translate
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...
Page Table Entry (PTE) defines the composition of Page Frame Number (PFN) and relavant flags.