[llvm] Revert "[Orc] Add NotifyCreated callback for LLJITBuilder" (PR #84398)

Mehdi Amini via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 7 15:16:26 PST 2024


https://github.com/joker-eph created https://github.com/llvm/llvm-project/pull/84398

Reverts llvm/llvm-project#84175

This broke bots widely, see https://lab.llvm.org/buildbot/#/builders/109/builds/84672/steps/5/logs/stdio for example

>From b67fec3d6f1f1c87cd3d8037701d4681b96bfd85 Mon Sep 17 00:00:00 2001
From: Mehdi Amini <joker.eph at gmail.com>
Date: Thu, 7 Mar 2024 15:15:56 -0800
Subject: [PATCH] Revert "[Orc] Add NotifyCreated callback for LLJITBuilder
 (#84175)"

This reverts commit f78129e2bbafdd04a71bc09fc44e0797dd08db05.
---
 llvm/include/llvm/ExecutionEngine/Orc/LLJIT.h | 18 ------------------
 1 file changed, 18 deletions(-)

diff --git a/llvm/include/llvm/ExecutionEngine/Orc/LLJIT.h b/llvm/include/llvm/ExecutionEngine/Orc/LLJIT.h
index d5682fcaa28b79..76d16e63df2815 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/LLJIT.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/LLJIT.h
@@ -311,8 +311,6 @@ class LLJITBuilderState {
 
   using PlatformSetupFunction = unique_function<Expected<JITDylibSP>(LLJIT &J)>;
 
-  using NotifyCreatedFunction = std::function<Error(LLJIT &)>;
-
   std::unique_ptr<ExecutorProcessControl> EPC;
   std::unique_ptr<ExecutionSession> ES;
   std::optional<JITTargetMachineBuilder> JTMB;
@@ -323,7 +321,6 @@ class LLJITBuilderState {
   CompileFunctionCreator CreateCompileFunction;
   unique_function<Error(LLJIT &)> PrePlatformSetup;
   PlatformSetupFunction SetUpPlatform;
-  NotifyCreatedFunction NotifyCreated;
   unsigned NumCompileThreads = 0;
 
   /// Called prior to JIT class construcion to fix up defaults.
@@ -444,16 +441,6 @@ class LLJITBuilderSetters {
     return impl();
   }
 
-  /// Set up a callback after successful construction of the JIT.
-  ///
-  /// This is useful to attach generators to JITDylibs or inject initial symbol
-  /// definitions.
-  SetterImpl &
-  setNotifyCreatedCallback(LLJITBuilderState::NotifyCreatedFunction Callback) {
-    impl().NotifyCreated = std::move(Callback);
-    return impl();
-  }
-
   /// Set the number of compile threads to use.
   ///
   /// If set to zero, compilation will be performed on the execution thread when
@@ -487,11 +474,6 @@ class LLJITBuilderSetters {
     std::unique_ptr<JITType> J(new JITType(impl(), Err));
     if (Err)
       return std::move(Err);
-
-    if (impl().NotifyCreated)
-      if (Error Err = impl().NotifyCreated(*J))
-        return Err;
-
     return std::move(J);
   }
 



More information about the llvm-commits mailing list