@@ -63,21 +63,28 @@ class ExecutionEngine {
63
63
ExecutionEngine (bool enableObjectCache, bool enableGDBNotificationListener,
64
64
bool enablePerfNotificationListener);
65
65
66
- // / Creates an execution engine for the given module. If `transformer` is
67
- // / provided, it will be called on the LLVM module during JIT-compilation and
68
- // / can be used, e.g., for reporting or optimization. `jitCodeGenOptLevel`,
69
- // / when provided, is used as the optimization level for target code
70
- // / generation. If `sharedLibPaths` are provided, the underlying
71
- // / JIT-compilation will open and link the shared libraries for symbol
72
- // / resolution. If `enableObjectCache` is set, the JIT compiler will create
73
- // / one to store the object generated for the given module. If enable
74
- // / `enableGDBNotificationListener` is set, the JIT compiler will notify
75
- // / the llvm's global GDB notification listener. If
76
- // / `enablePerfNotificationListener` is set, the JIT compiler will notify
66
+ // / Creates an execution engine for the given module.
67
+ // /
68
+ // / If `transformer` is provided, it will be called on the LLVM module during
69
+ // / JIT-compilation and can be used, e.g., for reporting or optimization.
70
+ // /
71
+ // / `jitCodeGenOptLevel`, when provided, is used as the optimization level for
72
+ // / target code generation.
73
+ // /
74
+ // / If `sharedLibPaths` are provided, the underlying JIT-compilation will
75
+ // / open and link the shared libraries for symbol resolution.
76
+ // /
77
+ // / If `enableObjectCache` is set, the JIT compiler will create one to store
78
+ // / the object generated for the given module.
79
+ // /
80
+ // / If enable `enableGDBNotificationListener` is set, the JIT compiler will
81
+ // / notify the llvm's global GDB notification listener.
82
+ // /
83
+ // / If `enablePerfNotificationListener` is set, the JIT compiler will notify
77
84
// / the llvm's global Perf notification listener.
78
85
static llvm::Expected<std::unique_ptr<ExecutionEngine>>
79
86
create (ModuleOp m,
80
- std::function <llvm::Error(llvm::Module *)> transformer = {},
87
+ llvm::function_ref <llvm::Error(llvm::Module *)> transformer = {},
81
88
Optional<llvm::CodeGenOpt::Level> jitCodeGenOptLevel = llvm::None,
82
89
ArrayRef<StringRef> sharedLibPaths = {}, bool enableObjectCache = true ,
83
90
bool enableGDBNotificationListener = true ,
@@ -105,6 +112,11 @@ class ExecutionEngine {
105
112
// / Dump object code to output file `filename`.
106
113
void dumpToObjectFile (StringRef filename);
107
114
115
+ // / Register symbols with this ExecutionEngine.
116
+ void registerSymbols (
117
+ llvm::function_ref<llvm::orc::SymbolMap(llvm::orc::MangleAndInterner)>
118
+ symbolMap);
119
+
108
120
private:
109
121
// / Ordering of llvmContext and jit is important for destruction purposes: the
110
122
// / jit must be destroyed before the context.
0 commit comments