aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp
diff options
context:
space:
mode:
authorlhames <lhames@gmail.com>2024-01-31 13:06:09 -0800
committerGitHub <noreply@github.com>2024-01-31 13:06:09 -0800
commitebe8733a11e735bb9f5ca45ec752c2a416380c8d (patch)
tree73fa740ab2c0f52097c4288bd337fd7a831438d8 /llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp
parent9107904e9b6a56636d06bba120c7c19d332430f0 (diff)
downloadllvm-ebe8733a11e735bb9f5ca45ec752c2a416380c8d.zip
llvm-ebe8733a11e735bb9f5ca45ec752c2a416380c8d.tar.gz
llvm-ebe8733a11e735bb9f5ca45ec752c2a416380c8d.tar.bz2
[ORC] Merge MaterializationResponsibility notifyEmitted and addDependencies
Removes the MaterializationResponsibility::addDependencies and addDependenciesForAll methods, and transfers dependency registration to the notifyEmitted operation. The new dependency registration allows dependencies to be specified for arbitrary subsets of the MaterializationResponsibility's symbols (rather than just single symbols or all symbols) via an array of SymbolDependenceGroups (pairs of symbol sets and corresponding dependencies for that set). This patch aims to both improve emission performance and simplify dependence tracking. By eliminating some states (e.g. symbols having registered dependencies but not yet being resolved or emitted) we make some errors impossible by construction, and reduce the number of error cases that we need to check. NonOwningSymbolStringPtrs are used for dependence tracking under the session lock, which should reduce ref-counting operations, and intra-emit dependencies are resolved outside the session lock, which should provide better performance when JITing concurrently (since some dependence tracking can happen in parallel). The Orc C API is updated to account for this change, with the LLVMOrcMaterializationResponsibilityNotifyEmitted API being modified and the LLVMOrcMaterializationResponsibilityAddDependencies and LLVMOrcMaterializationResponsibilityAddDependenciesForAll operations being removed.
Diffstat (limited to 'llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp')
-rw-r--r--llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp b/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp
index f9efff1..119a1aa 100644
--- a/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp
@@ -43,7 +43,7 @@ private:
Result[Name] = {Compile(), JITSymbolFlags::Exported};
// No dependencies, so these calls cannot fail.
cantFail(R->notifyResolved(Result));
- cantFail(R->notifyEmitted());
+ cantFail(R->notifyEmitted({}));
}
void discard(const JITDylib &JD, const SymbolStringPtr &Name) override {