<div dir="ltr">Could you update examples?</div><br><div class="gmail_quote"><div dir="ltr">On Fri, Dec 4, 2015 at 11:18 AM Lang Hames via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: lhames<br>
Date: Thu Dec 3 20:15:39 2015<br>
New Revision: 254693<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=254693&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=254693&view=rev</a><br>
Log:<br>
[Orc] Rename JITCompileCallbackManagerBase to JITCompileCallbackManager.<br>
<br>
This class is turning into a useful interface, rather than an implementation<br>
detail, so I'm dropping the 'Base' suffix.<br>
<br>
No functional change.<br>
<br>
<br>
Modified:<br>
llvm/trunk/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h<br>
llvm/trunk/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h<br>
llvm/trunk/lib/ExecutionEngine/Orc/IndirectionUtils.cpp<br>
llvm/trunk/lib/ExecutionEngine/Orc/OrcCBindingsStack.cpp<br>
llvm/trunk/lib/ExecutionEngine/Orc/OrcCBindingsStack.h<br>
llvm/trunk/tools/lli/OrcLazyJIT.cpp<br>
llvm/trunk/tools/lli/OrcLazyJIT.h<br>
llvm/trunk/unittests/ExecutionEngine/Orc/CompileOnDemandLayerTest.cpp<br>
<br>
Modified: llvm/trunk/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h?rev=254693&r1=254692&r2=254693&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h?rev=254693&r1=254692&r2=254693&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h (original)<br>
+++ llvm/trunk/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h Thu Dec 3 20:15:39 2015<br>
@@ -38,7 +38,7 @@ namespace orc {<br>
/// of the function body from the original module. The extracted body is then<br>
/// compiled and executed.<br>
template <typename BaseLayerT,<br>
- typename CompileCallbackMgrT = JITCompileCallbackManagerBase,<br>
+ typename CompileCallbackMgrT = JITCompileCallbackManager,<br>
typename IndirectStubsMgrT = IndirectStubsManagerBase><br>
class CompileOnDemandLayer {<br>
private:<br>
<br>
Modified: llvm/trunk/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h?rev=254693&r1=254692&r2=254693&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h?rev=254693&r1=254692&r2=254693&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h (original)<br>
+++ llvm/trunk/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h Thu Dec 3 20:15:39 2015<br>
@@ -27,8 +27,8 @@<br>
namespace llvm {<br>
namespace orc {<br>
<br>
-/// @brief Target-independent base class JITCompileCallbackManager.<br>
-class JITCompileCallbackManagerBase {<br>
+/// @brief Target-independent base class for compile callback management.<br>
+class JITCompileCallbackManager {<br>
public:<br>
<br>
typedef std::function<TargetAddress()> CompileFtor;<br>
@@ -50,13 +50,13 @@ public:<br>
CompileFtor &Compile;<br>
};<br>
<br>
- /// @brief Construct a JITCompileCallbackManagerBase.<br>
+ /// @brief Construct a JITCompileCallbackManager.<br>
/// @param ErrorHandlerAddress The address of an error handler in the target<br>
/// process to be used if a compile callback fails.<br>
- JITCompileCallbackManagerBase(TargetAddress ErrorHandlerAddress)<br>
+ JITCompileCallbackManager(TargetAddress ErrorHandlerAddress)<br>
: ErrorHandlerAddress(ErrorHandlerAddress) {}<br>
<br>
- virtual ~JITCompileCallbackManagerBase() {}<br>
+ virtual ~JITCompileCallbackManager() {}<br>
<br>
/// @brief Execute the callback for the given trampoline id. Called by the JIT<br>
/// to compile functions on demand.<br>
@@ -116,16 +116,16 @@ private:<br>
virtual void anchor();<br>
};<br>
<br>
-/// @brief Manage compile callbacks.<br>
+/// @brief Manage compile callbacks for in-process JITs.<br>
template <typename TargetT><br>
-class JITCompileCallbackManager : public JITCompileCallbackManagerBase {<br>
+class LocalJITCompileCallbackManager : public JITCompileCallbackManager {<br>
public:<br>
<br>
- /// @brief Construct a JITCompileCallbackManager.<br>
+ /// @brief Construct a InProcessJITCompileCallbackManager.<br>
/// @param ErrorHandlerAddress The address of an error handler in the target<br>
/// process to be used if a compile callback fails.<br>
- JITCompileCallbackManager(TargetAddress ErrorHandlerAddress)<br>
- : JITCompileCallbackManagerBase(ErrorHandlerAddress) {<br>
+ LocalJITCompileCallbackManager(TargetAddress ErrorHandlerAddress)<br>
+ : JITCompileCallbackManager(ErrorHandlerAddress) {<br>
<br>
/// Set up the resolver block.<br>
std::error_code EC;<br>
<br>
Modified: llvm/trunk/lib/ExecutionEngine/Orc/IndirectionUtils.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Orc/IndirectionUtils.cpp?rev=254693&r1=254692&r2=254693&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Orc/IndirectionUtils.cpp?rev=254693&r1=254692&r2=254693&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/ExecutionEngine/Orc/IndirectionUtils.cpp (original)<br>
+++ llvm/trunk/lib/ExecutionEngine/Orc/IndirectionUtils.cpp Thu Dec 3 20:15:39 2015<br>
@@ -19,7 +19,7 @@<br>
namespace llvm {<br>
namespace orc {<br>
<br>
-void JITCompileCallbackManagerBase::anchor() {}<br>
+void JITCompileCallbackManager::anchor() {}<br>
void IndirectStubsManagerBase::anchor() {}<br>
<br>
Constant* createIRTypedAddress(FunctionType &FT, TargetAddress Addr) {<br>
<br>
Modified: llvm/trunk/lib/ExecutionEngine/Orc/OrcCBindingsStack.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Orc/OrcCBindingsStack.cpp?rev=254693&r1=254692&r2=254693&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Orc/OrcCBindingsStack.cpp?rev=254693&r1=254692&r2=254693&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/ExecutionEngine/Orc/OrcCBindingsStack.cpp (original)<br>
+++ llvm/trunk/lib/ExecutionEngine/Orc/OrcCBindingsStack.cpp Thu Dec 3 20:15:39 2015<br>
@@ -23,7 +23,7 @@ OrcCBindingsStack::createCompileCallback<br>
default: return nullptr;<br>
<br>
case Triple::x86_64: {<br>
- typedef orc::JITCompileCallbackManager<orc::OrcX86_64> CCMgrT;<br>
+ typedef orc::LocalJITCompileCallbackManager<orc::OrcX86_64> CCMgrT;<br>
return llvm::make_unique<CCMgrT>(0);<br>
}<br>
}<br>
<br>
Modified: llvm/trunk/lib/ExecutionEngine/Orc/OrcCBindingsStack.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Orc/OrcCBindingsStack.h?rev=254693&r1=254692&r2=254693&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Orc/OrcCBindingsStack.h?rev=254693&r1=254692&r2=254693&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/ExecutionEngine/Orc/OrcCBindingsStack.h (original)<br>
+++ llvm/trunk/lib/ExecutionEngine/Orc/OrcCBindingsStack.h Thu Dec 3 20:15:39 2015<br>
@@ -29,7 +29,7 @@ DEFINE_SIMPLE_CONVERSION_FUNCTIONS(Targe<br>
class OrcCBindingsStack {<br>
public:<br>
<br>
- typedef orc::JITCompileCallbackManagerBase CompileCallbackMgr;<br>
+ typedef orc::JITCompileCallbackManager CompileCallbackMgr;<br>
typedef orc::ObjectLinkingLayer<> ObjLayerT;<br>
typedef orc::IRCompileLayer<ObjLayerT> CompileLayerT;<br>
typedef orc::CompileOnDemandLayer<CompileLayerT, CompileCallbackMgr> CODLayerT;<br>
<br>
Modified: llvm/trunk/tools/lli/OrcLazyJIT.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lli/OrcLazyJIT.cpp?rev=254693&r1=254692&r2=254693&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lli/OrcLazyJIT.cpp?rev=254693&r1=254692&r2=254693&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/tools/lli/OrcLazyJIT.cpp (original)<br>
+++ llvm/trunk/tools/lli/OrcLazyJIT.cpp Thu Dec 3 20:15:39 2015<br>
@@ -52,7 +52,7 @@ OrcLazyJIT::createCompileCallbackMgr(Tri<br>
default: return nullptr;<br>
<br>
case Triple::x86_64: {<br>
- typedef orc::JITCompileCallbackManager<orc::OrcX86_64> CCMgrT;<br>
+ typedef orc::LocalJITCompileCallbackManager<orc::OrcX86_64> CCMgrT;<br>
return llvm::make_unique<CCMgrT>(0);<br>
}<br>
}<br>
<br>
Modified: llvm/trunk/tools/lli/OrcLazyJIT.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lli/OrcLazyJIT.h?rev=254693&r1=254692&r2=254693&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lli/OrcLazyJIT.h?rev=254693&r1=254692&r2=254693&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/tools/lli/OrcLazyJIT.h (original)<br>
+++ llvm/trunk/tools/lli/OrcLazyJIT.h Thu Dec 3 20:15:39 2015<br>
@@ -29,7 +29,7 @@ namespace llvm {<br>
class OrcLazyJIT {<br>
public:<br>
<br>
- typedef orc::JITCompileCallbackManagerBase CompileCallbackMgr;<br>
+ typedef orc::JITCompileCallbackManager CompileCallbackMgr;<br>
typedef orc::ObjectLinkingLayer<> ObjLayerT;<br>
typedef orc::IRCompileLayer<ObjLayerT> CompileLayerT;<br>
typedef std::function<std::unique_ptr<Module>(std::unique_ptr<Module>)><br>
<br>
Modified: llvm/trunk/unittests/ExecutionEngine/Orc/CompileOnDemandLayerTest.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ExecutionEngine/Orc/CompileOnDemandLayerTest.cpp?rev=254693&r1=254692&r2=254693&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ExecutionEngine/Orc/CompileOnDemandLayerTest.cpp?rev=254693&r1=254692&r2=254693&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/unittests/ExecutionEngine/Orc/CompileOnDemandLayerTest.cpp (original)<br>
+++ llvm/trunk/unittests/ExecutionEngine/Orc/CompileOnDemandLayerTest.cpp Thu Dec 3 20:15:39 2015<br>
@@ -16,10 +16,10 @@ using namespace llvm::orc;<br>
<br>
namespace {<br>
<br>
-class DummyCallbackManager : public orc::JITCompileCallbackManagerBase {<br>
+class DummyCallbackManager : public orc::JITCompileCallbackManager {<br>
public:<br>
DummyCallbackManager()<br>
- : JITCompileCallbackManagerBase(0), NextStubAddress(0),<br>
+ : JITCompileCallbackManager(0), NextStubAddress(0),<br>
UniversalCompile([]() { return 0; }) {<br>
}<br>
<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>