Proteus
Programmable JIT compilation and optimization for C/C++ using LLVM
Loading...
Searching...
No Matches
JitEngine.hpp
Go to the documentation of this file.
1//===-- JitEngine.hpp -- Base JIT Engine header --===//
2//
3// Part of the Proteus Project, under the Apache License v2.0 with LLVM
4// Exceptions. See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9//===----------------------------------------------------------------------===//
10
11#ifndef PROTEUS_JITENGINE_HPP
12#define PROTEUS_JITENGINE_HPP
13
14#include <cstdlib>
15#include <string>
16
17#include <llvm/ADT/DenseMap.h>
18#include <llvm/Demangle/Demangle.h>
19#include <llvm/IR/Module.h>
20#include <llvm/Target/TargetMachine.h>
21
23#include "proteus/Config.hpp"
24#include "proteus/CoreLLVM.hpp"
25#include "proteus/Hashing.hpp"
26
27namespace proteus {
28
29using namespace llvm;
30
31class JitEngine {
32public:
35
36 void enable() { Config::get().ProteusDisable = false; }
37
38 void disable() { Config::get().ProteusDisable = true; }
39
40protected:
44
45 JitEngine();
46
47 std::string mangleSuffix(HashT &HashValue);
48};
49
50} // namespace proteus
51
52#endif
ArrayRef< RuntimeConstantInfo * > RCInfoArray
Definition CompilerInterfaceHost.cpp:24
bool ProteusDisable
Definition Config.hpp:305
static Config & get()
Definition Config.hpp:298
Definition Hashing.hpp:20
Definition JitEngine.hpp:31
JitEngine()
Definition JitEngine.cpp:26
bool isProteusDisabled()
Definition JitEngine.hpp:34
std::string mangleSuffix(HashT &HashValue)
Definition JitEngine.cpp:32
InitLLVMTargets Init
Definition JitEngine.hpp:33
SmallVector< RuntimeConstant > getRuntimeConstantValues(void **KernelArgs, ArrayRef< RuntimeConstantInfo * > RCInfoArray)
Definition JitEngine.cpp:36
void disable()
Definition JitEngine.hpp:38
void enable()
Definition JitEngine.hpp:36
Definition Helpers.h:138
Definition StorageCache.cpp:24
T getRuntimeConstantValue(void *Arg)
Definition CompilerInterfaceRuntimeConstantInfo.h:114
Definition CoreLLVM.hpp:172