Revision tags: llvmorg-21-init, llvmorg-19.1.7 |
|
#
4eaff6c5 |
| 14-Jan-2025 |
Lang Hames <lhames@gmail.com> |
[JITLink] Use target triple for LinkGraph pointer size and endianness.
Removes LinkGraph's PointerSize and Endianness members and uses the triple to find these values instead.
Also removes some red
[JITLink] Use target triple for LinkGraph pointer size and endianness.
Removes LinkGraph's PointerSize and Endianness members and uses the triple to find these values instead.
Also removes some redundant Triple copies.
show more ...
|
Revision tags: llvmorg-19.1.6 |
|
#
2ccf7ed2 |
| 05-Dec-2024 |
Jared Wyles <jared.wyles@gmail.com> |
[JITLink] Switch to SymbolStringPtr for Symbol names (#115796)
Use SymbolStringPtr for Symbol names in LinkGraph. This reduces string interning
on the boundary between JITLink and ORC, and allows p
[JITLink] Switch to SymbolStringPtr for Symbol names (#115796)
Use SymbolStringPtr for Symbol names in LinkGraph. This reduces string interning
on the boundary between JITLink and ORC, and allows pointer comparisons (rather
than string comparisons) between Symbol names. This should improve the
performance and readability of code that bridges between JITLink and ORC (e.g.
ObjectLinkingLayer and ObjectLinkingLayer::Plugins).
To enable use of SymbolStringPtr a std::shared_ptr<SymbolStringPool> is added to
LinkGraph and threaded through to its construction sites in LLVM and Bolt. All
LinkGraphs that are to have symbol names compared by pointer equality must point
to the same SymbolStringPool instance, which in ORC sessions should be the pool
attached to the ExecutionSession.
---------
Co-authored-by: Lang Hames <lhames@gmail.com>
show more ...
|
Revision tags: llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4 |
|
#
7a4013f0 |
| 28-Aug-2024 |
Lang Hames <lhames@gmail.com> |
[ORC] Generalize loadRelocatableObject to loadLinkableFile, add archive support.
This allows us to rewrite part of StaticLibraryDefinitionGenerator in terms of loadLinkableFile.
It's also useful fo
[ORC] Generalize loadRelocatableObject to loadLinkableFile, add archive support.
This allows us to rewrite part of StaticLibraryDefinitionGenerator in terms of loadLinkableFile.
It's also useful for clients who may not know (either from file extensions or context) whether a given path will be an object file, an archive, or a universal binary.
rdar://134638070
show more ...
|
Revision tags: llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3 |
|
#
3d67cf68 |
| 17-Feb-2024 |
Min-Yih Hsu <min.hsu@sifive.com> |
[JITLink] Always unmap standard segments in InProcessMemoryManager::deallocate (#81943)
Right now InProcessMemoryManager only releases a standard segment (via
sys::Memory::releaseMappedMemory) in `
[JITLink] Always unmap standard segments in InProcessMemoryManager::deallocate (#81943)
Right now InProcessMemoryManager only releases a standard segment (via
sys::Memory::releaseMappedMemory) in `deallocate` when there is a
DeallocAction associated, leaving residual memory pages in the process
until termination.
Despite being a de facto memory leak, it won't cause a major issue if
users only create a single LLJIT instance per process, which is the most
common use cases. It will, however, drain virtual memory pages if we
create thousands of ephemeral LLJIT instances in the same process.
This patch fixes this issue by releasing every standard segments
regardless of the attached DeallocAction.
show more ...
|
Revision tags: llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3 |
|
#
4a0ccfa8 |
| 13-Oct-2023 |
Kazu Hirata <kazu@google.com> |
Use llvm::endianness::{big,little,native} (NFC)
Note that llvm::support::endianness has been renamed to llvm::endianness while becoming an enum class as opposed to an enum. This patch replaces suppo
Use llvm::endianness::{big,little,native} (NFC)
Note that llvm::support::endianness has been renamed to llvm::endianness while becoming an enum class as opposed to an enum. This patch replaces support::{big,little,native} with llvm::endianness::{big,little,native}.
show more ...
|
Revision tags: llvmorg-17.0.2 |
|
#
e994f84c |
| 28-Sep-2023 |
Lang Hames <lhames@gmail.com> |
[ORC] Rename MemLifetimePolicy to MemLifetime.
The *Policy suffix came from the earlier MemAllocPolicy type, where it was included to distinguish the type from a memory-allocation operation. MemLife
[ORC] Rename MemLifetimePolicy to MemLifetime.
The *Policy suffix came from the earlier MemAllocPolicy type, where it was included to distinguish the type from a memory-allocation operation. MemLifetime is a noun already, so the *Policy suffix is just dead weight now.
show more ...
|
Revision tags: llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1 |
|
#
0b7e16af |
| 17-Mar-2023 |
Lang Hames <lhames@gmail.com> |
Re-apply "[JITLink][ORC] Rename MemDeallocPolicy to MemLifetime..." with fixes.
This reapplies 2cc64df0bd6a802eab592dbc282463c3e4a4281c, which was reverted in 5379c46d490640bfa80283e00240b6f1006092b
Re-apply "[JITLink][ORC] Rename MemDeallocPolicy to MemLifetime..." with fixes.
This reapplies 2cc64df0bd6a802eab592dbc282463c3e4a4281c, which was reverted in 5379c46d490640bfa80283e00240b6f1006092b4 due to bot failures.
The new patch contains fixes to ELFLinkGraphBuilder.h to better handle non-SHT_ALLOC sections (these were being accidentally skipped in the previous patch), and to skip SHT_NULL sections.
show more ...
|
#
5379c46d |
| 17-Mar-2023 |
Lang Hames <lhames@gmail.com> |
Revert "[JITLink][ORC] Rename MemDeallocPolicy to MemLifetimePolicy, add ..."
This reverts commit 2cc64df0bd6a802eab592dbc282463c3e4a4281c while I investigate bot failures (e.g. https://lab.llvm.org
Revert "[JITLink][ORC] Rename MemDeallocPolicy to MemLifetimePolicy, add ..."
This reverts commit 2cc64df0bd6a802eab592dbc282463c3e4a4281c while I investigate bot failures (e.g. https://lab.llvm.org/buildbot/#/builders/3/builds/23081).
show more ...
|
Revision tags: llvmorg-16.0.0 |
|
#
2cc64df0 |
| 16-Mar-2023 |
Lang Hames <lhames@gmail.com> |
[JITLink][ORC] Rename MemDeallocPolicy to MemLifetimePolicy, add NoAlloc option.
The original MemDeallocPolicy had two options: * Standard: allocated memory lives until deallocated or abandoned. * F
[JITLink][ORC] Rename MemDeallocPolicy to MemLifetimePolicy, add NoAlloc option.
The original MemDeallocPolicy had two options: * Standard: allocated memory lives until deallocated or abandoned. * Finalize: allocated memory lives until all finalize actions have been run, then is destroyed.
This patch introduces a new 'NoAlloc' option. NoAlloc indicates that the section should be ignored by the JITLinkMemoryManager -- the memory manager should allocate neither working memory nor executor address space to blocks in NoAlloc sections. The NoAlloc option is intended to support metadata sections (e.g. debug info) that we want to keep in the graph and have fixed up if necessary, but don't want allocated or transmitted to the executor (or we want that allocation and transmission to be managed manually by plugins).
Since NoAlloc blocks are ignored by the JITLinkMemoryManager they will not have working memory allocated to them by default post-allocation. Clients wishing to modify the content of a block in a NoAlloc section should call `Block::getMutableMemory(LinkGraph&)` to get writable memory allocated on the LinkGraph's allocator (this memory will exist for the lifetime of the graph). If no client requests mutable memory prior to the fixup phase then the generic link algorithm will do so when it encounters the first edge in any given block.
Addresses of blocks in NoAlloc sections are initialized by the LinkGraph creator (a LinkGraphBuilder, if the graph is generated from an object file), and should not be modified by the JITLinkMemoryManager. Plugins are responsible for updating addresses if they add/remove content from these sections. The meaning of addresses in NoAlloc-sections is backend/plugin defined, but for fixup purposes they will be treated the same as addresses in Standard/Finalize sections. References from Standard/Finalize sections to NoAlloc sections are expected to be common (these represent metadata tracking executor addresses). References from NoAlloc sections to Standard/Finalize sections are expected to be rare/non-existent (they would represent JIT'd code / data tracking metadata in the controller, which would be surprising). LinkGraphBuilders and specific backends may impose additional constraints on edges between Standard/Finalize and NoAlloc sections where required for correctness.
Differential Revision: https://reviews.llvm.org/D146183
show more ...
|
Revision tags: llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2 |
|
#
d42c2352 |
| 02-Feb-2023 |
Lang Hames <lhames@gmail.com> |
[JITLink] Ensure that in-flight alloc is abandoned on error in post-alloc phase.
If an error occurs during the post-allocation phase (JITLinkerBase::linkPhase2) then we need to call JITLinkMemoryMan
[JITLink] Ensure that in-flight alloc is abandoned on error in post-alloc phase.
If an error occurs during the post-allocation phase (JITLinkerBase::linkPhase2) then we need to call JITLinkMemoryManager::InFlightAlloc::abandon so that the allocation has a chance to clean up. This was already handled for later phases, but we were skipping the abandon step when we bailed out of phase 2.
show more ...
|
Revision tags: llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2 |
|
#
d3d9f7ca |
| 02-Oct-2022 |
Lang Hames <lhames@gmail.com> |
[ORC][JITLink] Move MemoryFlags.h (MemProt, AllocGroup,...) from JITLink to ORC.
Moving these types to OrcShared eliminates the need for the separate WireProtectionFlags type.
|
Revision tags: llvmorg-15.0.1 |
|
#
96066084 |
| 12-Sep-2022 |
Kazu Hirata <kazu@google.com> |
[llvm] Use x.empty() instead of llvm::empty(x) (NFC)
I'm planning to deprecate and eventually remove llvm::empty.
I thought about replacing llvm::empty(x) with std::empty(x), but it turns out that
[llvm] Use x.empty() instead of llvm::empty(x) (NFC)
I'm planning to deprecate and eventually remove llvm::empty.
I thought about replacing llvm::empty(x) with std::empty(x), but it turns out that all uses can be converted to x.empty(). That is, no use requires the ability of std::empty to accept C arrays and std::initializer_list.
Differential Revision: https://reviews.llvm.org/D133677
show more ...
|
Revision tags: llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1 |
|
#
3a3cb929 |
| 07-Feb-2022 |
Kazu Hirata <kazu@google.com> |
[llvm] Use = default (NFC)
|
Revision tags: llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2 |
|
#
c0fdc748 |
| 10-Jan-2022 |
Lang Hames <lhames@gmail.com> |
[ORC] Add helper functions for running finalize / dealloc actions.
runFinalizeActions takes an AllocActions vector and attempts to run its finalize actions. If any finalize action fails then all pai
[ORC] Add helper functions for running finalize / dealloc actions.
runFinalizeActions takes an AllocActions vector and attempts to run its finalize actions. If any finalize action fails then all paired dealloc actions up to the failing pair are run, and the error(s) returned. If all finalize actions succeed then a vector containing the dealloc actions is returned.
runDeallocActions takes a vector<WrapperFunctionCall> containing dealloc action calls and runs them all, returning any error(s).
These helpers are intended to simplify the implementation of JITLinkMemoryManager::InFlightAlloc::finalize and JITLinkMemoryManager::deallocate overrides by taking care of execution (and potential roll-back) of allocation actions.
show more ...
|
#
089acf25 |
| 08-Jan-2022 |
Lang Hames <lhames@gmail.com> |
[ORC][JITLink] Merge JITLink AllocActionCall and ORC WrapperFunctionCall.
These types performed identical roles. Merging them simplifies interoperability between JITLink and ORC APIs (allowing us to
[ORC][JITLink] Merge JITLink AllocActionCall and ORC WrapperFunctionCall.
These types performed identical roles. Merging them simplifies interoperability between JITLink and ORC APIs (allowing us to address a few FIXMEs).
show more ...
|
#
118e953b |
| 06-Jan-2022 |
Lang Hames <lhames@gmail.com> |
Re-apply "[JITLink] Update JITLink to use ExecutorAddr rather... " with fixes.
This re-applies 133f86e95492b2a00b944e070878424cfa73f87c, which was reverted in c5965a411c635106a47738b8d2e24db822b7416
Re-apply "[JITLink] Update JITLink to use ExecutorAddr rather... " with fixes.
This re-applies 133f86e95492b2a00b944e070878424cfa73f87c, which was reverted in c5965a411c635106a47738b8d2e24db822b7416f while I investigated bot failures.
The original failure contained an arithmetic conversion think-o (on line 419 of EHFrameSupport.cpp) that could cause failures on 32-bit platforms. The issue should be fixed in this patch.
show more ...
|
#
c5965a41 |
| 06-Jan-2022 |
Lang Hames <lhames@gmail.com> |
Revert "[JITLink] Update JITLink to use ExecutorAddr rather than..."
This reverts commit 133f86e95492b2a00b944e070878424cfa73f87c while I investigate the bot failures at https://lab.llvm.org/buildbo
Revert "[JITLink] Update JITLink to use ExecutorAddr rather than..."
This reverts commit 133f86e95492b2a00b944e070878424cfa73f87c while I investigate the bot failures at https://lab.llvm.org/buildbot#builders/186/builds/3370.
show more ...
|
#
133f86e9 |
| 05-Jan-2022 |
Lang Hames <lhames@gmail.com> |
[JITLink] Update JITLink to use ExecutorAddr rather than JITTargetAddress.
ExecutorAddr is the preferred representation for executor process addresses now.
|
#
6c348c1d |
| 03-Jan-2022 |
Lang Hames <lhames@gmail.com> |
[JITLink] Move AllocActions and associated types out of JITLinkMemoryManager.
They're shared with LinkGraph, so having them as top-level types makes sense, and saves users from qualifying the names
[JITLink] Move AllocActions and associated types out of JITLinkMemoryManager.
They're shared with LinkGraph, so having them as top-level types makes sense, and saves users from qualifying the names everywhere.
show more ...
|
Revision tags: llvmorg-13.0.1-rc1 |
|
#
69be352a |
| 14-Nov-2021 |
Lang Hames <lhames@gmail.com> |
Reapply "[ORC] Initial MachO debugging support (via GDB JIT debug.." with fixes.
This reapplies e1933a0488a50eb939210808fc895d374570d891 (which was reverted in f55ba3525eb19baed7d3f23638cbbd880246a3
Reapply "[ORC] Initial MachO debugging support (via GDB JIT debug.." with fixes.
This reapplies e1933a0488a50eb939210808fc895d374570d891 (which was reverted in f55ba3525eb19baed7d3f23638cbbd880246a370 due to bot failures, e.g. https://lab.llvm.org/buildbot/#/builders/117/builds/2768).
The bot failures were due to a missing symbol error: We use the input object's mangling to decide how to mangle the debug-info registration function name. This caused lookup of the registration function to fail when the input object mangling didn't match the host mangling.
Disbaling the test on non-Darwin platforms is the easiest short-term solution. I have filed https://llvm.org/PR52503 with a proposed longer term solution.
show more ...
|
#
f55ba352 |
| 14-Nov-2021 |
Lang Hames <lhames@gmail.com> |
Revert "[ORC] Initial MachO debugging support (via GDB JIT debug..."
This reverts commit e1933a0488a50eb939210808fc895d374570d891 until I can look into bot failures.
|
#
e1933a04 |
| 11-Nov-2021 |
Lang Hames <lhames@gmail.com> |
[ORC] Initial MachO debugging support (via GDB JIT debug registration interface)
This commit adds a new plugin, GDBJITDebugInfoRegistrationPlugin, that checks for objects containing debug info and r
[ORC] Initial MachO debugging support (via GDB JIT debug registration interface)
This commit adds a new plugin, GDBJITDebugInfoRegistrationPlugin, that checks for objects containing debug info and registers any debug info found via the GDB JIT registration API.
To enable this registration without redundantly representing non-debug sections this plugin synthesizes a new embedded object within a section of the LinkGraph. An allocation action is used to make the registration call.
Currently MachO only. ELF users can still use the DebugObjectManagerPlugin. The two are likely to be merged in the near future.
show more ...
|
#
9d5e6474 |
| 12-Nov-2021 |
Lang Hames <lhames@gmail.com> |
[JITLink] Fix think-o in handwritten CWrapperFunctionResult -> Error converter.
We need to skip the length field when generating error strings.
No test case: This hand-hacked deserializer should be
[JITLink] Fix think-o in handwritten CWrapperFunctionResult -> Error converter.
We need to skip the length field when generating error strings.
No test case: This hand-hacked deserializer should be removed in the near future once JITLink can use generic ORC APIs (including SPS and WrapperFunction).
show more ...
|
#
b77c6db9 |
| 31-Oct-2021 |
Lang Hames <lhames@gmail.com> |
[JITLink] Fix alloc action call signature in InProcessMemoryManager.
Alloc actions should return a CWrapperFunctionResult. JITLink does not have access to this type yet, due to library layering issu
[JITLink] Fix alloc action call signature in InProcessMemoryManager.
Alloc actions should return a CWrapperFunctionResult. JITLink does not have access to this type yet, due to library layering issues, so add a cut-down version with a fixme.
show more ...
|
#
9ca50641 |
| 12-Oct-2021 |
Lang Hames <lhames@gmail.com> |
[ORC] Fix a typo in a variable name.
|