Proteus
Programmable JIT compilation and optimization for C/C++ using LLVM
Loading...
Searching...
No Matches
JitEngine.h
Go to the documentation of this file.
1//===-- JitEngine.h -- 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_H
12#define PROTEUS_JITENGINE_H
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
22#include "proteus/Error.h"
24#include "proteus/impl/Config.h"
27
28namespace proteus {
29
30using namespace llvm;
31
32class JitEngine {
33public:
36
37 void enable() { Config::get().ProteusDisable = false; }
38
39 void disable() { Config::get().ProteusDisable = true; }
40
41protected:
42 SmallVector<RuntimeConstant>
43 getRuntimeConstantValues(void **KernelArgs,
44 ArrayRef<RuntimeConstantInfo *> RCInfoArray);
45
46 JitEngine();
47};
48
49} // namespace proteus
50
51#endif
ArrayRef< RuntimeConstantInfo * > RCInfoArray
Definition CompilerInterfaceHost.cpp:26
bool ProteusDisable
Definition Config.h:341
static Config & get()
Definition Config.h:334
Definition JitEngine.h:32
JitEngine()
Definition JitEngine.cpp:22
bool isProteusDisabled()
Definition JitEngine.h:35
InitLLVMTargets Init
Definition JitEngine.h:34
SmallVector< RuntimeConstant > getRuntimeConstantValues(void **KernelArgs, ArrayRef< RuntimeConstantInfo * > RCInfoArray)
Definition JitEngine.cpp:28
void disable()
Definition JitEngine.h:39
void enable()
Definition JitEngine.h:37
Definition CompiledLibrary.h:7
Definition MemoryCache.h:26
Definition CoreLLVM.h:172