forked from OSchip/llvm-project
[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. llvm-svn: 254693
This commit is contained in:
parent
1750b2ba89
commit
f0f4b4c882
|
@ -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,
|
||||
typename CompileCallbackMgrT = JITCompileCallbackManagerBase,
|
||||
typename CompileCallbackMgrT = JITCompileCallbackManager,
|
||||
typename IndirectStubsMgrT = IndirectStubsManagerBase>
|
||||
class CompileOnDemandLayer {
|
||||
private:
|
||||
|
|
|
@ -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<TargetAddress()> 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 <typename TargetT>
|
||||
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;
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
namespace llvm {
|
||||
namespace orc {
|
||||
|
||||
void JITCompileCallbackManagerBase::anchor() {}
|
||||
void JITCompileCallbackManager::anchor() {}
|
||||
void IndirectStubsManagerBase::anchor() {}
|
||||
|
||||
Constant* createIRTypedAddress(FunctionType &FT, TargetAddress Addr) {
|
||||
|
|
|
@ -23,7 +23,7 @@ OrcCBindingsStack::createCompileCallbackMgr(Triple T) {
|
|||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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<ObjLayerT> CompileLayerT;
|
||||
typedef orc::CompileOnDemandLayer<CompileLayerT, CompileCallbackMgr> CODLayerT;
|
||||
|
|
|
@ -52,7 +52,7 @@ OrcLazyJIT::createCompileCallbackMgr(Triple T) {
|
|||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace llvm {
|
|||
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>)>
|
||||
|
|
|
@ -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; }) {
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue