[llvm] e400e90 - [ORC] Fix SpeculativeJIT example after 7da63426ac5 (ORC dispatch unification).

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 24 02:03:43 PDT 2024


Author: Lang Hames
Date: 2024-04-24T01:03:29-08:00
New Revision: e400e908b2d97529b1a65dd0bdad80d481c39527

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

LOG: [ORC] Fix SpeculativeJIT example after 7da63426ac5 (ORC dispatch unification).

Fixes the bot failure at
https://lab.llvm.org/buildbot/#/builders/272/builds/14788.

Coding my way home: 6.48551S, 128.21109W

Added: 
    

Modified: 
    llvm/examples/SpeculativeJIT/SpeculativeJIT.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/examples/SpeculativeJIT/SpeculativeJIT.cpp b/llvm/examples/SpeculativeJIT/SpeculativeJIT.cpp
index 0d97d379d2279e..1659e5c5c8b40b 100644
--- a/llvm/examples/SpeculativeJIT/SpeculativeJIT.cpp
+++ b/llvm/examples/SpeculativeJIT/SpeculativeJIT.cpp
@@ -49,7 +49,9 @@ class SpeculativeJIT {
     if (!DL)
       return DL.takeError();
 
-    auto EPC = SelfExecutorProcessControl::Create();
+    auto EPC = SelfExecutorProcessControl::Create(
+        nullptr,
+        std::make_unique<DynamicThreadPoolTaskDispatcher>(std::nullopt));
     if (!EPC)
       return EPC.takeError();
 
@@ -116,14 +118,6 @@ class SpeculativeJIT {
                  std::move(ISMBuilder)) {
     MainJD.addGenerator(std::move(ProcessSymbolsGenerator));
     this->CODLayer.setImplMap(&Imps);
-    this->ES->setDispatchTask(
-        [this](std::unique_ptr<Task> T) {
-          CompileThreads.async(
-              [UnownedT = T.release()]() {
-                std::unique_ptr<Task> T(UnownedT);
-                T->run();
-              });
-        });
     ExitOnErr(S.addSpeculationRuntime(MainJD, Mangle));
     LocalCXXRuntimeOverrides CXXRuntimeoverrides;
     ExitOnErr(CXXRuntimeoverrides.enable(MainJD, Mangle));


        


More information about the llvm-commits mailing list