summaryrefslogtreecommitdiffstats
path: root/llvm/tools
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2015-10-07 21:53:41 +0000
committerLang Hames <lhames@gmail.com>2015-10-07 21:53:41 +0000
commit6df48a97d2cee06e065d67f2da23db3d843d4b57 (patch)
tree0abb27e31de44ac780b2c86983ac124d6b2582f4 /llvm/tools
parente1f91529c862b75186ac4a77aa207444b566ebda (diff)
downloadbcm5719-llvm-6df48a97d2cee06e065d67f2da23db3d843d4b57.tar.gz
bcm5719-llvm-6df48a97d2cee06e065d67f2da23db3d843d4b57.zip
[Orc] Enable user supplied partitioning functors in the CompileOnDemand layer.
Previously the CompileOnDemand layer always created single-function partitions. In theory this new API allows for more interesting partitions, though this has not been well tested yet. llvm-svn: 249623
Diffstat (limited to 'llvm/tools')
-rw-r--r--llvm/tools/lli/OrcLazyJIT.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/llvm/tools/lli/OrcLazyJIT.h b/llvm/tools/lli/OrcLazyJIT.h
index 5019523c7f0..ac1199dbde0 100644
--- a/llvm/tools/lli/OrcLazyJIT.h
+++ b/llvm/tools/lli/OrcLazyJIT.h
@@ -54,7 +54,7 @@ public:
CompileLayer(ObjectLayer, orc::SimpleCompiler(*this->TM)),
IRDumpLayer(CompileLayer, createDebugDumper()),
CCMgr(BuildCallbackMgr(IRDumpLayer, CCMgrMemMgr, Context)),
- CODLayer(IRDumpLayer, *CCMgr, false),
+ CODLayer(IRDumpLayer, *CCMgr, extractSingleFunction, false),
CXXRuntimeOverrides(
[this](const std::string &S) { return mangle(S); }) {}
@@ -132,6 +132,7 @@ public:
}
private:
+
std::string mangle(const std::string &Name) {
std::string MangledName;
{
@@ -141,6 +142,12 @@ private:
return MangledName;
}
+ static std::set<Function*> extractSingleFunction(Function &F) {
+ std::set<Function*> Partition;
+ Partition.insert(&F);
+ return Partition;
+ }
+
static TransformFtor createDebugDumper();
std::unique_ptr<TargetMachine> TM;
OpenPOWER on IntegriCloud