[Orc] Rename JITCompileCallbackManagerBase to JITCompileCallbackManager.
authorLang Hames <lhames@gmail.com>
Fri, 4 Dec 2015 02:15:39 +0000 (02:15 +0000)
committerLang Hames <lhames@gmail.com>
Fri, 4 Dec 2015 02:15:39 +0000 (02:15 +0000)
This class is turning into a useful interface, rather than an implementation
detail, so I'm dropping the 'Base' suffix.

No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254693 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h
include/llvm/ExecutionEngine/Orc/IndirectionUtils.h
lib/ExecutionEngine/Orc/IndirectionUtils.cpp
lib/ExecutionEngine/Orc/OrcCBindingsStack.cpp
lib/ExecutionEngine/Orc/OrcCBindingsStack.h
tools/lli/OrcLazyJIT.cpp
tools/lli/OrcLazyJIT.h
unittests/ExecutionEngine/Orc/CompileOnDemandLayerTest.cpp

index 242d2420162fd646702590c2d92fe97714f00925..b7ee9b5937f70bf780b4f308b481735e4f17c3b6 100644 (file)
@@ -38,7 +38,7 @@ namespace orc {
 /// of the function body from the original module. The extracted body is then
 /// compiled and executed.
 template <typename BaseLayerT,
 /// of the function body from the original module. The extracted body is then
 /// compiled and executed.
 template <typename BaseLayerT,
-          typename CompileCallbackMgrT = JITCompileCallbackManagerBase,
+          typename CompileCallbackMgrT = JITCompileCallbackManager,
           typename IndirectStubsMgrT = IndirectStubsManagerBase>
 class CompileOnDemandLayer {
 private:
           typename IndirectStubsMgrT = IndirectStubsManagerBase>
 class CompileOnDemandLayer {
 private:
index cabc95543d8106b3a2d0a254f41f1e6dfa79fca9..b5b258e7a05c9b9ab0f39eb3633b9a13787bc074 100644 (file)
@@ -27,8 +27,8 @@
 namespace llvm {
 namespace orc {
 
 namespace llvm {
 namespace orc {
 
-/// @brief Target-independent base class JITCompileCallbackManager.
-class JITCompileCallbackManagerBase {
+/// @brief Target-independent base class for compile callback management.
+class JITCompileCallbackManager {
 public:
 
   typedef std::function<TargetAddress()> CompileFtor;
 public:
 
   typedef std::function<TargetAddress()> CompileFtor;
@@ -50,13 +50,13 @@ public:
     CompileFtor &Compile;
   };
 
     CompileFtor &Compile;
   };
 
-  /// @brief Construct a JITCompileCallbackManagerBase.
+  /// @brief Construct a JITCompileCallbackManager.
   /// @param ErrorHandlerAddress The address of an error handler in the target
   ///                            process to be used if a compile callback fails.
   /// @param ErrorHandlerAddress The address of an error handler in the target
   ///                            process to be used if a compile callback fails.
-  JITCompileCallbackManagerBase(TargetAddress ErrorHandlerAddress)
+  JITCompileCallbackManager(TargetAddress ErrorHandlerAddress)
     : ErrorHandlerAddress(ErrorHandlerAddress) {}
 
     : ErrorHandlerAddress(ErrorHandlerAddress) {}
 
-  virtual ~JITCompileCallbackManagerBase() {}
+  virtual ~JITCompileCallbackManager() {}
 
   /// @brief Execute the callback for the given trampoline id. Called by the JIT
   ///        to compile functions on demand.
 
   /// @brief Execute the callback for the given trampoline id. Called by the JIT
   ///        to compile functions on demand.
@@ -116,16 +116,16 @@ private:
   virtual void anchor();
 };
 
   virtual void anchor();
 };
 
-/// @brief Manage compile callbacks.
+/// @brief Manage compile callbacks for in-process JITs.
 template <typename TargetT>
 template <typename TargetT>
-class JITCompileCallbackManager : public JITCompileCallbackManagerBase {
+class LocalJITCompileCallbackManager : public JITCompileCallbackManager {
 public:
 
 public:
 
-  /// @brief Construct a JITCompileCallbackManager.
+  /// @brief Construct a InProcessJITCompileCallbackManager.
   /// @param ErrorHandlerAddress The address of an error handler in the target
   ///                            process to be used if a compile callback fails.
   /// @param ErrorHandlerAddress The address of an error handler in the target
   ///                            process to be used if a compile callback fails.
-  JITCompileCallbackManager(TargetAddress ErrorHandlerAddress)
-    : JITCompileCallbackManagerBase(ErrorHandlerAddress) {
+  LocalJITCompileCallbackManager(TargetAddress ErrorHandlerAddress)
+    : JITCompileCallbackManager(ErrorHandlerAddress) {
 
     /// Set up the resolver block.
     std::error_code EC;
 
     /// Set up the resolver block.
     std::error_code EC;
index 30dbe038377189e719975131e1c495ca1af4ab01..dd6e3a3b29aed405128fc841a7fbf9d0b99f9828 100644 (file)
@@ -19,7 +19,7 @@
 namespace llvm {
 namespace orc {
 
 namespace llvm {
 namespace orc {
 
-void JITCompileCallbackManagerBase::anchor() {}
+void JITCompileCallbackManager::anchor() {}
 void IndirectStubsManagerBase::anchor() {}
 
 Constant* createIRTypedAddress(FunctionType &FT, TargetAddress Addr) {
 void IndirectStubsManagerBase::anchor() {}
 
 Constant* createIRTypedAddress(FunctionType &FT, TargetAddress Addr) {
index 7326fa7e2f8f51c26240333e34eee4adde44d30e..d1af56d84867c5424a5f8b5b491193592a56c81e 100644 (file)
@@ -23,7 +23,7 @@ OrcCBindingsStack::createCompileCallbackMgr(Triple T) {
     default: return nullptr;
 
     case Triple::x86_64: {
     default: return nullptr;
 
     case Triple::x86_64: {
-      typedef orc::JITCompileCallbackManager<orc::OrcX86_64> CCMgrT;
+      typedef orc::LocalJITCompileCallbackManager<orc::OrcX86_64> CCMgrT;
       return llvm::make_unique<CCMgrT>(0);
     }
   }
       return llvm::make_unique<CCMgrT>(0);
     }
   }
index c62210112c35f0093db2bb64678585fd5cc57d2b..d2f7fe4ac0ef5b848a0cf6b1cdc3df075c54161e 100644 (file)
@@ -29,7 +29,7 @@ DEFINE_SIMPLE_CONVERSION_FUNCTIONS(TargetMachine, LLVMTargetMachineRef)
 class OrcCBindingsStack {
 public:
 
 class OrcCBindingsStack {
 public:
 
-  typedef orc::JITCompileCallbackManagerBase CompileCallbackMgr;
+  typedef orc::JITCompileCallbackManager CompileCallbackMgr;
   typedef orc::ObjectLinkingLayer<> ObjLayerT;
   typedef orc::IRCompileLayer<ObjLayerT> CompileLayerT;
   typedef orc::CompileOnDemandLayer<CompileLayerT, CompileCallbackMgr> CODLayerT;
   typedef orc::ObjectLinkingLayer<> ObjLayerT;
   typedef orc::IRCompileLayer<ObjLayerT> CompileLayerT;
   typedef orc::CompileOnDemandLayer<CompileLayerT, CompileCallbackMgr> CODLayerT;
index 7d79c48559efe1fb4977365b8d25cda6e2675be0..edac10b86556624710ffbbc094c8f0bc12df9b09 100644 (file)
@@ -52,7 +52,7 @@ OrcLazyJIT::createCompileCallbackMgr(Triple T) {
     default: return nullptr;
 
     case Triple::x86_64: {
     default: return nullptr;
 
     case Triple::x86_64: {
-      typedef orc::JITCompileCallbackManager<orc::OrcX86_64> CCMgrT;
+      typedef orc::LocalJITCompileCallbackManager<orc::OrcX86_64> CCMgrT;
       return llvm::make_unique<CCMgrT>(0);
     }
   }
       return llvm::make_unique<CCMgrT>(0);
     }
   }
index ec86a72efaa0fbdc15520f1b5425526e3baea55f..bb4da33ea9b6d9669d679f5602d0db4c9e7bbdbe 100644 (file)
@@ -29,7 +29,7 @@ namespace llvm {
 class OrcLazyJIT {
 public:
 
 class OrcLazyJIT {
 public:
 
-  typedef orc::JITCompileCallbackManagerBase CompileCallbackMgr;
+  typedef orc::JITCompileCallbackManager CompileCallbackMgr;
   typedef orc::ObjectLinkingLayer<> ObjLayerT;
   typedef orc::IRCompileLayer<ObjLayerT> CompileLayerT;
   typedef std::function<std::unique_ptr<Module>(std::unique_ptr<Module>)>
   typedef orc::ObjectLinkingLayer<> ObjLayerT;
   typedef orc::IRCompileLayer<ObjLayerT> CompileLayerT;
   typedef std::function<std::unique_ptr<Module>(std::unique_ptr<Module>)>
index 49f4cc124f9ebe7cf17bc371fd91a90a35b5210b..4a30cfc429710c345bdc02cf8632271ad38de2ae 100644 (file)
@@ -16,10 +16,10 @@ using namespace llvm::orc;
 
 namespace {
 
 
 namespace {
 
-class DummyCallbackManager : public orc::JITCompileCallbackManagerBase {
+class DummyCallbackManager : public orc::JITCompileCallbackManager {
 public:
   DummyCallbackManager()
 public:
   DummyCallbackManager()
-      : JITCompileCallbackManagerBase(0), NextStubAddress(0),
+      : JITCompileCallbackManager(0), NextStubAddress(0),
         UniversalCompile([]() { return 0; }) {
   }
 
         UniversalCompile([]() { return 0; }) {
   }