[all-commits] [llvm/llvm-project] ebe873: [ORC] Merge MaterializationResponsibility notifyEm...
lhames via All-commits
all-commits at lists.llvm.org
Wed Jan 31 13:06:21 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ebe8733a11e735bb9f5ca45ec752c2a416380c8d
https://github.com/llvm/llvm-project/commit/ebe8733a11e735bb9f5ca45ec752c2a416380c8d
Author: lhames <lhames at gmail.com>
Date: 2024-01-31 (Wed, 31 Jan 2024)
Changed paths:
M llvm/include/llvm-c/Orc.h
M llvm/include/llvm/ExecutionEngine/Orc/Core.h
M llvm/include/llvm/ExecutionEngine/Orc/DebugUtils.h
M llvm/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h
M llvm/lib/ExecutionEngine/Orc/Core.cpp
M llvm/lib/ExecutionEngine/Orc/DebugUtils.cpp
M llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp
M llvm/lib/ExecutionEngine/Orc/LazyReexports.cpp
M llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp
M llvm/lib/ExecutionEngine/Orc/OrcV2CBindings.cpp
M llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp
M llvm/test/ExecutionEngine/JITLink/x86-64/LocalDependencyPropagation.s
M llvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp
M llvm/unittests/ExecutionEngine/Orc/LazyCallThroughAndReexportsTest.cpp
M llvm/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp
M llvm/unittests/ExecutionEngine/Orc/ResourceTrackerTest.cpp
Log Message:
-----------
[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.
More information about the All-commits
mailing list