diff options
| author | Alex Zinenko <zinenko@google.com> | 2020-01-22 10:12:04 +0100 |
|---|---|---|
| committer | Hans Wennborg <hans@chromium.org> | 2020-01-30 14:25:58 +0100 |
| commit | e40782f3cfabeaa17c38b599d768e8538c8d9951 (patch) | |
| tree | 5bea6994f2a3ae275d49ad25697f5307c33ec3cc /mlir | |
| parent | b516ca061838e2cb8b48b31ee113e3c4aae7e7d5 (diff) | |
| download | bcm5719-llvm-e40782f3cfabeaa17c38b599d768e8538c8d9951.tar.gz bcm5719-llvm-e40782f3cfabeaa17c38b599d768e8538c8d9951.zip | |
[mlir][orc] unbreak MLIR ExecutionEngine after ORC changes
Changes to ORC in ce2207abaf9a925b35f15ef92aaff6b301ba6d22 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.
(cherry picked from commit 7984b47401f7f36475619abf2ff02de3b5ff0481)
Diffstat (limited to 'mlir')
| -rw-r--r-- | mlir/lib/ExecutionEngine/ExecutionEngine.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mlir/lib/ExecutionEngine/ExecutionEngine.cpp b/mlir/lib/ExecutionEngine/ExecutionEngine.cpp index 651c90a87d7..2cd34040dc4 100644 --- a/mlir/lib/ExecutionEngine/ExecutionEngine.cpp +++ b/mlir/lib/ExecutionEngine/ExecutionEngine.cpp @@ -256,14 +256,14 @@ Expected<std::unique_ptr<ExecutionEngine>> ExecutionEngine::create( // Callback to inspect the cache and recompile on demand. This follows Lang's // LLJITWithObjectCache example. auto compileFunctionCreator = [&](JITTargetMachineBuilder JTMB) - -> Expected<IRCompileLayer::CompileFunction> { + -> Expected<std::unique_ptr<IRCompileLayer::IRCompiler>> { if (jitCodeGenOptLevel) JTMB.setCodeGenOptLevel(jitCodeGenOptLevel.getValue()); auto TM = JTMB.createTargetMachine(); if (!TM) return TM.takeError(); - return IRCompileLayer::CompileFunction( - TMOwningSimpleCompiler(std::move(*TM), engine->cache.get())); + return std::make_unique<TMOwningSimpleCompiler>(std::move(*TM), + engine->cache.get()); }; // Create the LLJIT by calling the LLJITBuilder with 2 callbacks. |

