[all-commits] [llvm/llvm-project] 529c09: [ORC] Simplify JITLinkRedirectableSymbolManager, f...
Lang Hames via All-commits
all-commits at lists.llvm.org
Fri Nov 1 21:34:13 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 529c091381a4d34796b5d0f0f2f5bd17c8a6647e
https://github.com/llvm/llvm-project/commit/529c091381a4d34796b5d0f0f2f5bd17c8a6647e
Author: Lang Hames <lhames at gmail.com>
Date: 2024-11-02 (Sat, 02 Nov 2024)
Changed paths:
M llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h
M llvm/include/llvm/ExecutionEngine/Orc/JITLinkRedirectableSymbolManager.h
M llvm/lib/ExecutionEngine/Orc/JITLinkRedirectableSymbolManager.cpp
M llvm/unittests/ExecutionEngine/Orc/JITLinkRedirectionManagerTest.cpp
M llvm/unittests/ExecutionEngine/Orc/ReOptimizeLayerTest.cpp
Log Message:
-----------
[ORC] Simplify JITLinkRedirectableSymbolManager, fix definition locations.
Redirectable stubs should be placed in the same JITDylib as their names, with
their lifetimes managed according to the ResourceTracker used when adding them.
The original implementation created a single pool of stubs in the JITDylib
that is passed to the JITLinkRedirectableSymbolManager constructor, but this
may cause the addresses of the redirectable symbols themselves (added to the
JITDylibs passed to createRedirectableSymbols) to appear outside the address
range of their defining JITDylib.
This patch fixes the issue by dropping the pool and emitting a new graph for
each set of requested redirectable symbols. We lose the ability to recycle
stubs, but gain the ability to free them entirely. Since we don't expect stub
reuse to be a common case this is likely the best trade-off.
If in the future we do need to return to a stub pool we should create a
separate one for each JITDylib to ensure that addresses behave as expected.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list