[llvm] 08d18af - [ORC] Update SpeculativeJIT example for dispatchTask changes in 5344c88dcb2.

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Mon May 10 09:30:52 PDT 2021


Author: Lang Hames
Date: 2021-05-10T09:30:46-07:00
New Revision: 08d18af26105fb77665199365c5f3124e0278826

URL: https://github.com/llvm/llvm-project/commit/08d18af26105fb77665199365c5f3124e0278826
DIFF: https://github.com/llvm/llvm-project/commit/08d18af26105fb77665199365c5f3124e0278826.diff

LOG: [ORC] Update SpeculativeJIT example for dispatchTask changes in 5344c88dcb2.

Added: 
    

Modified: 
    llvm/examples/SpeculativeJIT/SpeculativeJIT.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/examples/SpeculativeJIT/SpeculativeJIT.cpp b/llvm/examples/SpeculativeJIT/SpeculativeJIT.cpp
index 27e398e8bba4b..0ca5d62e7b67c 100644
--- a/llvm/examples/SpeculativeJIT/SpeculativeJIT.cpp
+++ b/llvm/examples/SpeculativeJIT/SpeculativeJIT.cpp
@@ -112,14 +112,12 @@ class SpeculativeJIT {
                  std::move(ISMBuilder)) {
     MainJD.addGenerator(std::move(ProcessSymbolsGenerator));
     this->CODLayer.setImplMap(&Imps);
-    this->ES->setDispatchMaterialization(
-        [this](std::unique_ptr<MaterializationUnit> MU,
-               std::unique_ptr<MaterializationResponsibility> MR) {
+    this->ES->setDispatchTask(
+        [this](std::unique_ptr<Task> T) {
           CompileThreads.async(
-              [UnownedMU = MU.release(), UnownedMR = MR.release()]() {
-                std::unique_ptr<MaterializationUnit> MU(UnownedMU);
-                std::unique_ptr<MaterializationResponsibility> MR(UnownedMR);
-                MU->materialize(std::move(MR));
+              [UnownedT = T.release()]() {
+                std::unique_ptr<Task> T(UnownedT);
+                T->run();
               });
         });
     ExitOnErr(S.addSpeculationRuntime(MainJD, Mangle));


        


More information about the llvm-commits mailing list