From 08d18af26105fb77665199365c5f3124e0278826 Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Mon, 10 May 2021 09:20:59 -0700 Subject: [PATCH] [ORC] Update SpeculativeJIT example for dispatchTask changes in 5344c88dcb2. --- llvm/examples/SpeculativeJIT/SpeculativeJIT.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/llvm/examples/SpeculativeJIT/SpeculativeJIT.cpp b/llvm/examples/SpeculativeJIT/SpeculativeJIT.cpp index 27e398e..0ca5d62 100644 --- a/llvm/examples/SpeculativeJIT/SpeculativeJIT.cpp +++ b/llvm/examples/SpeculativeJIT/SpeculativeJIT.cpp @@ -112,14 +112,12 @@ private: std::move(ISMBuilder)) { MainJD.addGenerator(std::move(ProcessSymbolsGenerator)); this->CODLayer.setImplMap(&Imps); - this->ES->setDispatchMaterialization( - [this](std::unique_ptr MU, - std::unique_ptr MR) { + this->ES->setDispatchTask( + [this](std::unique_ptr T) { CompileThreads.async( - [UnownedMU = MU.release(), UnownedMR = MR.release()]() { - std::unique_ptr MU(UnownedMU); - std::unique_ptr MR(UnownedMR); - MU->materialize(std::move(MR)); + [UnownedT = T.release()]() { + std::unique_ptr T(UnownedT); + T->run(); }); }); ExitOnErr(S.addSpeculationRuntime(MainJD, Mangle)); -- 2.7.4