Skip to content

Commit 7984b47

Browse files
committed
[mlir][orc] unbreak MLIR ExecutionEngine after ORC changes
Changes to ORC in ce2207a changed the APIs in IRCompileLayer, now requiring the custom compiler to be wrapped in IRCompileLayer::IRCompiler. Even though MLIR relies on Orc CompileUtils, the type is still visible in several places in the code. Adapt those to the new API.
1 parent 0157a74 commit 7984b47

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mlir/lib/ExecutionEngine/ExecutionEngine.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -256,14 +256,14 @@ Expected<std::unique_ptr<ExecutionEngine>> ExecutionEngine::create(
256256
// Callback to inspect the cache and recompile on demand. This follows Lang's
257257
// LLJITWithObjectCache example.
258258
auto compileFunctionCreator = [&](JITTargetMachineBuilder JTMB)
259-
-> Expected<IRCompileLayer::CompileFunction> {
259+
-> Expected<std::unique_ptr<IRCompileLayer::IRCompiler>> {
260260
if (jitCodeGenOptLevel)
261261
JTMB.setCodeGenOptLevel(jitCodeGenOptLevel.getValue());
262262
auto TM = JTMB.createTargetMachine();
263263
if (!TM)
264264
return TM.takeError();
265-
return IRCompileLayer::CompileFunction(
266-
TMOwningSimpleCompiler(std::move(*TM), engine->cache.get()));
265+
return std::make_unique<TMOwningSimpleCompiler>(std::move(*TM),
266+
engine->cache.get());
267267
};
268268

269269
// Create the LLJIT by calling the LLJITBuilder with 2 callbacks.

0 commit comments

Comments
 (0)