mirror of
https://github.com/RPCS3/llvm.git
synced 2025-04-12 02:47:10 +00:00
[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
This commit is contained in:
parent
d8def4abd1
commit
51540fbf42
@ -38,7 +38,7 @@ namespace orc {
|
|||||||
/// of the function body from the original module. The extracted body is then
|
/// of the function body from the original module. The extracted body is then
|
||||||
/// compiled and executed.
|
/// compiled and executed.
|
||||||
template <typename BaseLayerT,
|
template <typename BaseLayerT,
|
||||||
typename CompileCallbackMgrT = JITCompileCallbackManagerBase,
|
typename CompileCallbackMgrT = JITCompileCallbackManager,
|
||||||
typename IndirectStubsMgrT = IndirectStubsManagerBase>
|
typename IndirectStubsMgrT = IndirectStubsManagerBase>
|
||||||
class CompileOnDemandLayer {
|
class CompileOnDemandLayer {
|
||||||
private:
|
private:
|
||||||
|
@ -27,8 +27,8 @@
|
|||||||
namespace llvm {
|
namespace llvm {
|
||||||
namespace orc {
|
namespace orc {
|
||||||
|
|
||||||
/// @brief Target-independent base class JITCompileCallbackManager.
|
/// @brief Target-independent base class for compile callback management.
|
||||||
class JITCompileCallbackManagerBase {
|
class JITCompileCallbackManager {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
typedef std::function<TargetAddress()> CompileFtor;
|
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
|
/// @param ErrorHandlerAddress The address of an error handler in the target
|
||||||
/// process to be used if a compile callback fails.
|
/// 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
|
/// @brief Execute the callback for the given trampoline id. Called by the JIT
|
||||||
/// to compile functions on demand.
|
/// 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
|
/// @param ErrorHandlerAddress The address of an error handler in the target
|
||||||
/// process to be used if a compile callback fails.
|
/// process to be used if a compile callback fails.
|
||||||
JITCompileCallbackManager(TargetAddress ErrorHandlerAddress)
|
LocalJITCompileCallbackManager(TargetAddress ErrorHandlerAddress)
|
||||||
: JITCompileCallbackManagerBase(ErrorHandlerAddress) {
|
: JITCompileCallbackManager(ErrorHandlerAddress) {
|
||||||
|
|
||||||
/// Set up the resolver block.
|
/// Set up the resolver block.
|
||||||
std::error_code EC;
|
std::error_code EC;
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
namespace llvm {
|
namespace llvm {
|
||||||
namespace orc {
|
namespace orc {
|
||||||
|
|
||||||
void JITCompileCallbackManagerBase::anchor() {}
|
void JITCompileCallbackManager::anchor() {}
|
||||||
void IndirectStubsManagerBase::anchor() {}
|
void IndirectStubsManagerBase::anchor() {}
|
||||||
|
|
||||||
Constant* createIRTypedAddress(FunctionType &FT, TargetAddress Addr) {
|
Constant* createIRTypedAddress(FunctionType &FT, TargetAddress Addr) {
|
||||||
|
@ -23,7 +23,7 @@ OrcCBindingsStack::createCompileCallbackMgr(Triple T) {
|
|||||||
default: return nullptr;
|
default: return nullptr;
|
||||||
|
|
||||||
case Triple::x86_64: {
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ DEFINE_SIMPLE_CONVERSION_FUNCTIONS(TargetMachine, LLVMTargetMachineRef)
|
|||||||
class OrcCBindingsStack {
|
class OrcCBindingsStack {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
typedef orc::JITCompileCallbackManagerBase CompileCallbackMgr;
|
typedef orc::JITCompileCallbackManager CompileCallbackMgr;
|
||||||
typedef orc::ObjectLinkingLayer<> ObjLayerT;
|
typedef orc::ObjectLinkingLayer<> ObjLayerT;
|
||||||
typedef orc::IRCompileLayer<ObjLayerT> CompileLayerT;
|
typedef orc::IRCompileLayer<ObjLayerT> CompileLayerT;
|
||||||
typedef orc::CompileOnDemandLayer<CompileLayerT, CompileCallbackMgr> CODLayerT;
|
typedef orc::CompileOnDemandLayer<CompileLayerT, CompileCallbackMgr> CODLayerT;
|
||||||
|
@ -52,7 +52,7 @@ OrcLazyJIT::createCompileCallbackMgr(Triple T) {
|
|||||||
default: return nullptr;
|
default: return nullptr;
|
||||||
|
|
||||||
case Triple::x86_64: {
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ namespace llvm {
|
|||||||
class OrcLazyJIT {
|
class OrcLazyJIT {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
typedef orc::JITCompileCallbackManagerBase CompileCallbackMgr;
|
typedef orc::JITCompileCallbackManager CompileCallbackMgr;
|
||||||
typedef orc::ObjectLinkingLayer<> ObjLayerT;
|
typedef orc::ObjectLinkingLayer<> ObjLayerT;
|
||||||
typedef orc::IRCompileLayer<ObjLayerT> CompileLayerT;
|
typedef orc::IRCompileLayer<ObjLayerT> CompileLayerT;
|
||||||
typedef std::function<std::unique_ptr<Module>(std::unique_ptr<Module>)>
|
typedef std::function<std::unique_ptr<Module>(std::unique_ptr<Module>)>
|
||||||
|
@ -16,10 +16,10 @@ using namespace llvm::orc;
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
class DummyCallbackManager : public orc::JITCompileCallbackManagerBase {
|
class DummyCallbackManager : public orc::JITCompileCallbackManager {
|
||||||
public:
|
public:
|
||||||
DummyCallbackManager()
|
DummyCallbackManager()
|
||||||
: JITCompileCallbackManagerBase(0), NextStubAddress(0),
|
: JITCompileCallbackManager(0), NextStubAddress(0),
|
||||||
UniversalCompile([]() { return 0; }) {
|
UniversalCompile([]() { return 0; }) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user