summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
d8def4a)
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
/// 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:
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;
- /// @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.
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 {
- /// @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;
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) {
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);
}
}
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;
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);
}
}
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>)>
-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; }) {
}