summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/Orc/ThreadSafeModule.cpp
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2018-09-29 23:49:57 +0000
committerLang Hames <lhames@gmail.com>2018-09-29 23:49:57 +0000
commit98440293fb903f69dbec401b8b4826b1fa206385 (patch)
treecf7feeb31965aa6bca6c709c047badabbd641576 /llvm/lib/ExecutionEngine/Orc/ThreadSafeModule.cpp
parentc3053e41bfcee50d80e3597452df55e2ecb4198a (diff)
downloadbcm5719-llvm-98440293fb903f69dbec401b8b4826b1fa206385.tar.gz
bcm5719-llvm-98440293fb903f69dbec401b8b4826b1fa206385.zip
[ORC] Add partitioning support to CompileOnDemandLayer2.
CompileOnDemandLayer2 now supports user-supplied partition functions (the original CompileOnDemandLayer already supported these). Partition functions are called with the list of requested global values (i.e. global values that currently have queries waiting on them) and have an opportunity to select extra global values to materialize at the same time. Also adds testing infrastructure for the new feature to lli. llvm-svn: 343396
Diffstat (limited to 'llvm/lib/ExecutionEngine/Orc/ThreadSafeModule.cpp')
-rw-r--r--llvm/lib/ExecutionEngine/Orc/ThreadSafeModule.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/ExecutionEngine/Orc/ThreadSafeModule.cpp b/llvm/lib/ExecutionEngine/Orc/ThreadSafeModule.cpp
index cf091743f9d..9525b168fbd 100644
--- a/llvm/lib/ExecutionEngine/Orc/ThreadSafeModule.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/ThreadSafeModule.cpp
@@ -29,11 +29,11 @@ ThreadSafeModule cloneToNewContext(ThreadSafeModule &TSM,
SmallVector<char, 1> ClonedModuleBuffer;
{
- std::vector<GlobalValue *> ClonedDefsInSrc;
+ std::set<GlobalValue *> ClonedDefsInSrc;
ValueToValueMapTy VMap;
auto Tmp = CloneModule(*TSM.getModule(), VMap, [&](const GlobalValue *GV) {
if (ShouldCloneDef(*GV)) {
- ClonedDefsInSrc.push_back(const_cast<GlobalValue *>(GV));
+ ClonedDefsInSrc.insert(const_cast<GlobalValue *>(GV));
return true;
}
return false;
OpenPOWER on IntegriCloud