From 51540fbf420fb65bfdf0173a08ea951e10cf431f Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Fri, 4 Dec 2015 02:15:39 +0000 Subject: [PATCH] [Orc] Rename JITCompileCallbackManagerBase to JITCompileCallbackManager. 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 --- .../Orc/CompileOnDemandLayer.h | 2 +- .../ExecutionEngine/Orc/IndirectionUtils.h | 20 +++++++++---------- lib/ExecutionEngine/Orc/IndirectionUtils.cpp | 2 +- lib/ExecutionEngine/Orc/OrcCBindingsStack.cpp | 2 +- lib/ExecutionEngine/Orc/OrcCBindingsStack.h | 2 +- tools/lli/OrcLazyJIT.cpp | 2 +- tools/lli/OrcLazyJIT.h | 2 +- .../Orc/CompileOnDemandLayerTest.cpp | 4 ++-- 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h b/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h index 242d2420162..b7ee9b5937f 100644 --- a/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h +++ b/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h @@ -38,7 +38,7 @@ namespace orc { /// of the function body from the original module. The extracted body is then /// compiled and executed. template class CompileOnDemandLayer { private: diff --git a/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h b/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h index cabc95543d8..b5b258e7a05 100644 --- a/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h +++ b/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h @@ -27,8 +27,8 @@ 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 CompileFtor; @@ -50,13 +50,13 @@ public: 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. - JITCompileCallbackManagerBase(TargetAddress ErrorHandlerAddress) + JITCompileCallbackManager(TargetAddress 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. @@ -116,16 +116,16 @@ private: virtual void anchor(); }; -/// @brief Manage compile callbacks. +/// @brief Manage compile callbacks for in-process JITs. template -class JITCompileCallbackManager : public JITCompileCallbackManagerBase { +class LocalJITCompileCallbackManager : public JITCompileCallbackManager { 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. - JITCompileCallbackManager(TargetAddress ErrorHandlerAddress) - : JITCompileCallbackManagerBase(ErrorHandlerAddress) { + LocalJITCompileCallbackManager(TargetAddress ErrorHandlerAddress) + : JITCompileCallbackManager(ErrorHandlerAddress) { /// Set up the resolver block. std::error_code EC; diff --git a/lib/ExecutionEngine/Orc/IndirectionUtils.cpp b/lib/ExecutionEngine/Orc/IndirectionUtils.cpp index 30dbe038377..dd6e3a3b29a 100644 --- a/lib/ExecutionEngine/Orc/IndirectionUtils.cpp +++ b/lib/ExecutionEngine/Orc/IndirectionUtils.cpp @@ -19,7 +19,7 @@ namespace llvm { namespace orc { -void JITCompileCallbackManagerBase::anchor() {} +void JITCompileCallbackManager::anchor() {} void IndirectStubsManagerBase::anchor() {} Constant* createIRTypedAddress(FunctionType &FT, TargetAddress Addr) { diff --git a/lib/ExecutionEngine/Orc/OrcCBindingsStack.cpp b/lib/ExecutionEngine/Orc/OrcCBindingsStack.cpp index 7326fa7e2f8..d1af56d8486 100644 --- a/lib/ExecutionEngine/Orc/OrcCBindingsStack.cpp +++ b/lib/ExecutionEngine/Orc/OrcCBindingsStack.cpp @@ -23,7 +23,7 @@ OrcCBindingsStack::createCompileCallbackMgr(Triple T) { default: return nullptr; case Triple::x86_64: { - typedef orc::JITCompileCallbackManager CCMgrT; + typedef orc::LocalJITCompileCallbackManager CCMgrT; return llvm::make_unique(0); } } diff --git a/lib/ExecutionEngine/Orc/OrcCBindingsStack.h b/lib/ExecutionEngine/Orc/OrcCBindingsStack.h index c62210112c3..d2f7fe4ac0e 100644 --- a/lib/ExecutionEngine/Orc/OrcCBindingsStack.h +++ b/lib/ExecutionEngine/Orc/OrcCBindingsStack.h @@ -29,7 +29,7 @@ DEFINE_SIMPLE_CONVERSION_FUNCTIONS(TargetMachine, LLVMTargetMachineRef) class OrcCBindingsStack { public: - typedef orc::JITCompileCallbackManagerBase CompileCallbackMgr; + typedef orc::JITCompileCallbackManager CompileCallbackMgr; typedef orc::ObjectLinkingLayer<> ObjLayerT; typedef orc::IRCompileLayer CompileLayerT; typedef orc::CompileOnDemandLayer CODLayerT; diff --git a/tools/lli/OrcLazyJIT.cpp b/tools/lli/OrcLazyJIT.cpp index 7d79c48559e..edac10b8655 100644 --- a/tools/lli/OrcLazyJIT.cpp +++ b/tools/lli/OrcLazyJIT.cpp @@ -52,7 +52,7 @@ OrcLazyJIT::createCompileCallbackMgr(Triple T) { default: return nullptr; case Triple::x86_64: { - typedef orc::JITCompileCallbackManager CCMgrT; + typedef orc::LocalJITCompileCallbackManager CCMgrT; return llvm::make_unique(0); } } diff --git a/tools/lli/OrcLazyJIT.h b/tools/lli/OrcLazyJIT.h index ec86a72efaa..bb4da33ea9b 100644 --- a/tools/lli/OrcLazyJIT.h +++ b/tools/lli/OrcLazyJIT.h @@ -29,7 +29,7 @@ namespace llvm { class OrcLazyJIT { public: - typedef orc::JITCompileCallbackManagerBase CompileCallbackMgr; + typedef orc::JITCompileCallbackManager CompileCallbackMgr; typedef orc::ObjectLinkingLayer<> ObjLayerT; typedef orc::IRCompileLayer CompileLayerT; typedef std::function(std::unique_ptr)> diff --git a/unittests/ExecutionEngine/Orc/CompileOnDemandLayerTest.cpp b/unittests/ExecutionEngine/Orc/CompileOnDemandLayerTest.cpp index 49f4cc124f9..4a30cfc4297 100644 --- a/unittests/ExecutionEngine/Orc/CompileOnDemandLayerTest.cpp +++ b/unittests/ExecutionEngine/Orc/CompileOnDemandLayerTest.cpp @@ -16,10 +16,10 @@ using namespace llvm::orc; namespace { -class DummyCallbackManager : public orc::JITCompileCallbackManagerBase { +class DummyCallbackManager : public orc::JITCompileCallbackManager { public: DummyCallbackManager() - : JITCompileCallbackManagerBase(0), NextStubAddress(0), + : JITCompileCallbackManager(0), NextStubAddress(0), UniversalCompile([]() { return 0; }) { } -- 2.34.1