Revision tags: llvmorg-21-init |
|
#
212cdc9a |
| 24-Jan-2025 |
Lang Hames <lhames@gmail.com> |
Revert "[ORC] Enable JIT support for the compact-unwind frame info format..."
This reverts 4f0325873faccfbe171bae4babceb65975ca892e and follow-up patches (see below) while I investigate some ongoing
Revert "[ORC] Enable JIT support for the compact-unwind frame info format..."
This reverts 4f0325873faccfbe171bae4babceb65975ca892e and follow-up patches (see below) while I investigate some ongoing failures on the buildbots.
---
Revert "[clang-repl] Try to XFAIL testcase on arm32 without affecting arm64 darwin."
This reverts commit fd174f0ff3e793fe96a6663b1488ed159cfe042f.
Revert "[clang-repl] The simple-exception test now passes on arm64-darwin."
This reverts commit c9bc242e387f4a4a3dfcd86561f3ec0ca8a72d62.
Revert "[ORC] Destroy defunct MaterializationUnits outside the session lock."
This reverts commit a001cc0e6cdcfa672b8aff9ce6d14782bb96356a.
Revert "[ORC] Add explicit narrowing casts to fix build errors."
This reverts commit 26fc07d5d88760ad659599184fd10181287d2d9e.
Revert "[ORC] Enable JIT support for the compact-unwind frame info format on Darwin."
This reverts commit 4f0325873faccfbe171bae4babceb65975ca892e.
show more ...
|
#
a001cc0e |
| 24-Jan-2025 |
Lang Hames <lhames@gmail.com> |
[ORC] Destroy defunct MaterializationUnits outside the session lock.
MaterializationUnits may contain arbitrary resources that need cleanup. We want to do this outside the JIT's session lock.
This
[ORC] Destroy defunct MaterializationUnits outside the session lock.
MaterializationUnits may contain arbitrary resources that need cleanup. We want to do this outside the JIT's session lock.
This should fix a lock-order-inversion warning in clang-repl (for details see https://github.com/llvm/llvm-project/issues/124215).
show more ...
|
Revision tags: llvmorg-19.1.7 |
|
#
42b23257 |
| 06-Jan-2025 |
Lang Hames <lhames@gmail.com> |
[ORC] Fail materialization in tasks that are destroyed before running.
If a MaterialiaztionTask is destroyed before running then we need to call failMaterialization on the MaterializationResponsibil
[ORC] Fail materialization in tasks that are destroyed before running.
If a MaterialiaztionTask is destroyed before running then we need to call failMaterialization on the MaterializationResponsibility member.
show more ...
|
#
bfb0a518 |
| 08-Jan-2025 |
Lang Hames <lhames@gmail.com> |
[llvm-jitlink] Use -num-threads=0 for regression tests relying on debug output.
ORC and JITLink debugging output write the dbgs() raw_ostream, which isn't thread-safe. Use -num-threads=0 to force si
[llvm-jitlink] Use -num-threads=0 for regression tests relying on debug output.
ORC and JITLink debugging output write the dbgs() raw_ostream, which isn't thread-safe. Use -num-threads=0 to force single-threaded linking for tests that produce debugging output.
The llvm-jitlink tool is updated to suggest -num-threads=0 when debugging output is enabled.
show more ...
|
Revision tags: llvmorg-19.1.6 |
|
#
f2d18a4d |
| 09-Dec-2024 |
Lang Hames <lhames@gmail.com> |
Reapply "[ORC] Introduce LazyReexportsManager, ... (#118923)" with fixes.
This re-applies 570ecdcf8b4, which was reverted in 74e8a37ff32 due to bot failures. This commit renames sysv_resolve.cpp to
Reapply "[ORC] Introduce LazyReexportsManager, ... (#118923)" with fixes.
This re-applies 570ecdcf8b4, which was reverted in 74e8a37ff32 due to bot failures. This commit renames sysv_resolve.cpp to resolve.cpp, which was the cause of the config errors.
show more ...
|
#
74e8a37f |
| 09-Dec-2024 |
Lang Hames <lhames@gmail.com> |
Revert "Reapply "[ORC] Introduce LazyReexportsManager, … (#118923)" with fixes"
This reverts commit 41652c6c92958a87b8505b9b1e6f008856e392ac while I investigate more bot failures.
|
#
41652c6c |
| 08-Dec-2024 |
Lang Hames <lhames@gmail.com> |
Reapply "[ORC] Introduce LazyReexportsManager, … (#118923)" with fixes
This reapplies 570ecdcf8b4, which was reverted in 6073dd923b8 due to bot failures.
The test failures on Linux were fixed by: 1
Reapply "[ORC] Introduce LazyReexportsManager, … (#118923)" with fixes
This reapplies 570ecdcf8b4, which was reverted in 6073dd923b8 due to bot failures.
The test failures on Linux were fixed by: 1. Removing an overly restrictive assertion (query dependence on a symbol no longer implies a MaterializingInfo for that symbol) 2. Adding reentry and resolver files to the ORC runtime CMakeLists.txt for Linux. 3. Adding the __orc_rt_reentry -> __orc_rt_sysv_reentry alias to ELFNixPlatform.
show more ...
|
#
6073dd92 |
| 07-Dec-2024 |
Lang Hames <lhames@gmail.com> |
Revert "[ORC] Introduce LazyReexportsManager, JITLinkTrampolines, … (#118923)"
This reverts commit 570ecdcf8b44aec853ce381a5f6b77222b041afa while I investigate bot failures, e.g. https://lab.llvm.or
Revert "[ORC] Introduce LazyReexportsManager, JITLinkTrampolines, … (#118923)"
This reverts commit 570ecdcf8b44aec853ce381a5f6b77222b041afa while I investigate bot failures, e.g. https://lab.llvm.org/buildbot/#/builders/17/builds/4446.
show more ...
|
#
570ecdcf |
| 07-Dec-2024 |
Lang Hames <lhames@gmail.com> |
[ORC] Introduce LazyReexportsManager, JITLinkTrampolines, ORC-RT base… (#118923)
…d reentry.
These utilities provide new, more generic and easier to use support for
lazy compilation in ORC.
L
[ORC] Introduce LazyReexportsManager, JITLinkTrampolines, ORC-RT base… (#118923)
…d reentry.
These utilities provide new, more generic and easier to use support for
lazy compilation in ORC.
LazyReexportsManager is an alternative to LazyCallThroughManager. It
takes requests for lazy re-entry points in the form of an alias map:
lazy-reexports = {
( <entry point symbol #1>, <implementation symbol #1> ),
( <entry point symbol #2>, <implementation symbol #2> ),
...
( <entry point symbol #n>, <implementation symbol #n> )
}
LazyReexportsManager then:
1. binds the entry points to the implementation names in an internal
table.
2. creates a JIT re-entry trampoline for each entry point.
3. creates a redirectable symbol for each of the entry point name and
binds redirectable symbol to the corresponding reentry trampoline.
When an entry point symbol is first called at runtime (which may be on
any thread of the JIT'd program) it will re-enter the JIT via the
trampoline and trigger a lookup for the implementation symbol stored in
LazyReexportsManager's internal table. When the lookup completes the
entry point symbol will be updated (via the RedirectableSymbolManager)
to point at the implementation symbol, and execution will proceed to the
implementation symbol.
Actual construction of the re-entry trampolines and redirectable symbols
is delegated to an EmitTrampolines functor and the
RedirectableSymbolsManager respectively.
JITLinkReentryTrampolines.h provides a JITLink-based implementation of
the EmitTrampolines functor. (AArch64 only in this patch, but other
architectures will be added in the near future).
Register state save and reentry functionality is added to the ORC
runtime in the __orc_rt_sysv_resolve and __orc_rt_resolve_implementation
functions (the latter is generic, the former will need custom
implementations for each ABI and architecture to be supported, however
this should be much less effort than the existing OrcABISupport
approach, since the ORC runtime allows this code to be written as native
assembly).
The resulting system:
1. Works equally well for in-process and out-of-process JIT'd code.
2. Requires less boilerplate to set up.
Given an ObjectLinkingLayer and PlatformJD (JITDylib containing the ORC
runtime), setup is just:
```c++
auto RSMgr = JITLinkRedirectableSymbolManager::Create(OLL);
if (!RSMgr)
return RSMgr.takeError();
auto LRMgr = createJITLinkLazyReexportsManager(OLL, **RSMgr, PlatformJD);
if (!LRMgr)
return LRMgr.takeError();
```
after which lazy reexports can be introduced with:
```c++
JD.define(lazyReexports(LRMgr, <alias map>));
```
LazyObectLinkingLayer is updated to use this new method, but the LLVM-IR
level CompileOnDemandLayer will continue to use LazyCallThroughManager
and OrcABISupport until the new system supports a wider range of
architectures and ABIs.
The llvm-jitlink utility's -lazy option now uses the new scheme. Since
it depends on the ORC runtime, the lazy-link.ll testcase and associated
helpers are moved to the ORC runtime.
show more ...
|
#
9c9d4b9e |
| 04-Dec-2024 |
Lang Hames <lhames@gmail.com> |
[ORC] Move ostream operator for SymbolStringPtrBase into OrcShared.
This will allow clients outside ORC (e.g. JITLink) to use the operator without taking a dependence on ORC.
|
#
3e11ae69 |
| 04-Dec-2024 |
Lang Hames <lhames@gmail.com> |
[ORC] Merge ostream operators for SymbolStringPtrs into SymbolStringPool.h. NFC.
These are simple and commonly used. Having them in the SymbolStringPool header saves clients from having to #include
[ORC] Merge ostream operators for SymbolStringPtrs into SymbolStringPool.h. NFC.
These are simple and commonly used. Having them in the SymbolStringPool header saves clients from having to #include "DebugUtils.h" everywhere.
show more ...
|
Revision tags: llvmorg-19.1.5 |
|
#
6ef4990d |
| 03-Dec-2024 |
Lang Hames <lhames@gmail.com> |
Re-apply "[ORC] Track all dependencies on symbols that aren't..." with fixes.
This reapplies 427fb5cc5ac, which was reverted in 08c1a6b3e18 due to bot failures.
The fix was to remove an incorrect a
Re-apply "[ORC] Track all dependencies on symbols that aren't..." with fixes.
This reapplies 427fb5cc5ac, which was reverted in 08c1a6b3e18 due to bot failures.
The fix was to remove an incorrect assertion: In IL_emit, during the initial worklist loop, an EDU can have all of its dependencies removed without becoming ready (because it may still have implicit dependencies that will be added back during the subsequent propagateExtraEmitDeps operation). The EDU will be marked Ready at the end of IL_emit if its Dependencies set is empty at that point. Prior to that we can only assert that it's either Emitted or Ready (which is already covered by other assertions).
show more ...
|
#
fb140125 |
| 03-Dec-2024 |
Lang Hames <lhames@gmail.com> |
[ORC] Fix typo in comment. NFC.
|
#
08c1a6b3 |
| 02-Dec-2024 |
Lang Hames <lhames@gmail.com> |
Revert "[ORC] Track all dependencies on symbols that aren't Ready yet."
This reverts commit 427fb5cc5ac34414c4682c90d3db0c63c5a1b227 while I investigate the bot failure in https://lab.llvm.org/build
Revert "[ORC] Track all dependencies on symbols that aren't Ready yet."
This reverts commit 427fb5cc5ac34414c4682c90d3db0c63c5a1b227 while I investigate the bot failure in https://lab.llvm.org/buildbot/#/builders/95/builds/6835.
show more ...
|
#
427fb5cc |
| 02-Dec-2024 |
Lang Hames <lhames@gmail.com> |
[ORC] Track all dependencies on symbols that aren't Ready yet.
AsynchronousSymbolQuery tracks the symbols that it depends on in order to (1) detach the query in the event of a failure, and (2) repor
[ORC] Track all dependencies on symbols that aren't Ready yet.
AsynchronousSymbolQuery tracks the symbols that it depends on in order to (1) detach the query in the event of a failure, and (2) report those dependencies to clients of the ExecutionSession::lookup method (via the RegisterDependencies argument). Previously we tracked only dependencies on symbols that didn't meet the required state (the only symbols that the query needs to be attached to), but this is insufficient to report all necessary dependencies to lookup clients. E.g. A lookup requiring SymbolState::Resolved where some matched symbol is already Resolved but not yet Emitted or Ready would result in the dependency on that symbol not being reported, which could result in illegal access in concurrent JIT setups. (This bug was discovered by @mikaoP on discord with a simple concurrent JIT setup).
This patch tracks and reports all dependencies on symbols that aren't Ready yet, correcting the under-reporting issue. AsynchronousSymbolQuery::detach is updated to stop asserting that all depended-upon symbols have a query attached.
show more ...
|
#
d02c1676 |
| 29-Nov-2024 |
Lang Hames <lhames@gmail.com> |
[Support][Error] Add ErrorAsOutParameter constructor that takes an Error by ref.
ErrorAsOutParameter's Error* constructor supports cases where an Error might not be passed in (because in the calling
[Support][Error] Add ErrorAsOutParameter constructor that takes an Error by ref.
ErrorAsOutParameter's Error* constructor supports cases where an Error might not be passed in (because in the calling context it's known that this call won't fail). Most clients always have an Error present however, and for them an Error& overload is more convenient.
show more ...
|
#
f710b042 |
| 28-Nov-2024 |
Lang Hames <lhames@gmail.com> |
[ORC] Fail early in ExecutionSession::registerJITDispatchHandlers.
Check that we're not reusing any handler tag addresses before installing any handlers. This ensures that either all of the handlers
[ORC] Fail early in ExecutionSession::registerJITDispatchHandlers.
Check that we're not reusing any handler tag addresses before installing any handlers. This ensures that either all of the handlers are installed*, or none of them are, simplifying error recovery.
* Ignoring handlers whose tags couldn't be resolved at all: these were never installed.
show more ...
|
Revision tags: llvmorg-19.1.4 |
|
#
dc11c060 |
| 11-Nov-2024 |
Lang Hames <lhames@gmail.com> |
[ORC] Move absoluteSymbols from Core.h to new AbsoluteSymbols.h header. NFC.
Continuing Core.h clean-up.
If you see any errors about a missing absoluteSymbols function you need to include the new A
[ORC] Move absoluteSymbols from Core.h to new AbsoluteSymbols.h header. NFC.
Continuing Core.h clean-up.
If you see any errors about a missing absoluteSymbols function you need to include the new AbsoluteSymbols.h header.
show more ...
|
Revision tags: llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0 |
|
#
7034ec49 |
| 10-Sep-2024 |
Lang Hames <lhames@gmail.com> |
[ORC] Remove EDU from dependants list of dependencies before destroying.
Dependant lists hold raw pointers back to EDUs that depend on them. We need to remove these entries before destroying the EDU
[ORC] Remove EDU from dependants list of dependencies before destroying.
Dependant lists hold raw pointers back to EDUs that depend on them. We need to remove these entries before destroying the EDU or we'll be left with a dangling reference that can result in use-after-free bugs.
No testcase: This has only been observed in multi-threaded setups that reproduce the issue inconsistently.
rdar://135403614
show more ...
|
Revision tags: llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1 |
|
#
f719a339 |
| 24-Jul-2024 |
David Blaikie <dblaikie@gmail.com> |
Mark assert-used-only variable as [[maybe_unused]]
Seemed nicer than inlining, given the complexities of flag checking and the multiple uses.
|
#
e7698a13 |
| 24-Jul-2024 |
Lang Hames <lhames@gmail.com> |
Re-apply "[ORC][JITLink] Treat common symbols as weak definitions." with fixes.
This reapplies 785d376d123, which was reverted in c49837f5f68 due to bot failures. The fix was to relax some asserts t
Re-apply "[ORC][JITLink] Treat common symbols as weak definitions." with fixes.
This reapplies 785d376d123, which was reverted in c49837f5f68 due to bot failures. The fix was to relax some asserts to allow common symbols to be resolved with either common or weak flags, rather than requiring one or the other.
show more ...
|
#
c49837f5 |
| 24-Jul-2024 |
Lang Hames <lhames@gmail.com> |
Revert "[ORC][JITLink] Treat common symbols as weak definitions."
This reverts commit 785d376d1231167688dd12f93c5c0a5d46cd4086 while I investigate some bot failures (e.g. https://lab.llvm.org/buildb
Revert "[ORC][JITLink] Treat common symbols as weak definitions."
This reverts commit 785d376d1231167688dd12f93c5c0a5d46cd4086 while I investigate some bot failures (e.g. https://lab.llvm.org/buildbot/#/builders/3/builds/1983).
show more ...
|
#
785d376d |
| 24-Jul-2024 |
Lang Hames <lhames@gmail.com> |
[ORC][JITLink] Treat common symbols as weak definitions.
Duplicate common definitions should be coaleseced, rather than being treated as duplicate definitions. Strong definitions should override com
[ORC][JITLink] Treat common symbols as weak definitions.
Duplicate common definitions should be coaleseced, rather than being treated as duplicate definitions. Strong definitions should override common definitions.
rdar://132314264
show more ...
|
Revision tags: llvmorg-20-init, llvmorg-18.1.8 |
|
#
96b1f885 |
| 15-Jun-2024 |
Lang Hames <lhames@gmail.com> |
[ORC] Remove redundant locking of session mutex, update method name.
JITDylib::removeTracker already runs with the session mutex locked (and must do so), so remove the redundant locking and add an '
[ORC] Remove redundant locking of session mutex, update method name.
JITDylib::removeTracker already runs with the session mutex locked (and must do so), so remove the redundant locking and add an 'IL_' ("inside lock") prefix to the method name.
show more ...
|
#
fef144ce |
| 25-Jun-2024 |
Kazu Hirata <kazu@google.com> |
Revert "[llvm] Use llvm::sort (NFC) (#96434)"
This reverts commit 05d167fc201b4f2e96108be0d682f6800a70c23d.
Reverting the patch fixes the following under EXPENSIVE_CHECKS:
LLVM :: CodeGen/AMDGPU
Revert "[llvm] Use llvm::sort (NFC) (#96434)"
This reverts commit 05d167fc201b4f2e96108be0d682f6800a70c23d.
Reverting the patch fixes the following under EXPENSIVE_CHECKS:
LLVM :: CodeGen/AMDGPU/sched-group-barrier-pipeline-solver.mir LLVM :: CodeGen/AMDGPU/sched-group-barrier-pre-RA.mir LLVM :: CodeGen/PowerPC/aix-xcoff-used-with-stringpool.ll LLVM :: CodeGen/PowerPC/merge-string-used-by-metadata.mir LLVM :: CodeGen/PowerPC/mergeable-string-pool-large.ll LLVM :: CodeGen/PowerPC/mergeable-string-pool-pass-only.mir LLVM :: CodeGen/PowerPC/mergeable-string-pool.ll
show more ...
|