mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2026-07-21 03:05:30 -04:00
[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
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user