|
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, 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, 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, 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, llvmorg-17.0.2, 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, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, 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, llvmorg-15.0.2, llvmorg-15.0.1, 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 |
|
| #
232bd331 |
| 17-Jun-2022 |
Lang Hames <[email protected]> |
[ORC-RT] Make the ORC runtime C API public.
This is a first step towards allowing programs to pre-link against the ORC runtime, which would allow us to move some code that is currently in the LLVM O
[ORC-RT] Make the ORC runtime C API public.
This is a first step towards allowing programs to pre-link against the ORC runtime, which would allow us to move some code that is currently in the LLVM OrcTarget library into the ORC runtime instead.
The C API header has limited utility as-is, but serves as a minimal first step and provides clients with tools for interacting with wrapper functions.
Reviewed By: beanz
Differential Revision: https://reviews.llvm.org/D127324
show more ...
|
|
Revision tags: 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, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3 |
|
| #
0ede1b90 |
| 16-Jan-2022 |
Lang Hames <[email protected]> |
[ORC-RT] Update WrapperFunctionCall for 089acf25223.
089acf25223 updated WrapperFunctionCall to carry arbitrary argument payloads (rather than plain address ranges). This commit implements the corre
[ORC-RT] Update WrapperFunctionCall for 089acf25223.
089acf25223 updated WrapperFunctionCall to carry arbitrary argument payloads (rather than plain address ranges). This commit implements the corresponding update for the ORC runtime.
show more ...
|
|
Revision tags: llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1 |
|
| #
dc8e5e1d |
| 28-Oct-2021 |
Lang Hames <[email protected]> |
[ORC-RT] Add a WrapperFunctionCall utility.
WrapperFunctionCall represents a call to a wrapper function as a pair of a target function (as an ExecutorAddr), and an argument buffer range (as an Execu
[ORC-RT] Add a WrapperFunctionCall utility.
WrapperFunctionCall represents a call to a wrapper function as a pair of a target function (as an ExecutorAddr), and an argument buffer range (as an ExecutorAddrRange). WrapperFunctionCall instances can be serialized via SPS to send to remote machines (only the argument buffer address range is copied, not any buffer content).
This utility will simplify the implementation of JITLinkMemoryManager allocation actions in the ORC runtime.
show more ...
|
| #
b574c52d |
| 19-Oct-2021 |
Lang Hames <[email protected]> |
[ORC-RT] Add MethodWrapperHandler utility for WrapperFunction.
This is an ORC runtime counterpart to a01f772d19d, which introduced the same functionality into LLVM.
|
| #
21369d4b |
| 19-Oct-2021 |
Lang Hames <[email protected]> |
[ORC-RT] Use function pointer type (rather than reference) for traits class.
Aligns this template with the corresponding one in LLVM.
|
| #
ea9826ff |
| 19-Oct-2021 |
Lang Hames <[email protected]> |
[ORC-RT] Avoid switching out-of-band error value into __orc_rt::Error and back.
WrapperFunctionResult can already convey serialization errors as out-of-band error values, so there's no need to wrap
[ORC-RT] Avoid switching out-of-band error value into __orc_rt::Error and back.
WrapperFunctionResult can already convey serialization errors as out-of-band error values, so there's no need to wrap it in an Expected here. Removing the wrapper simplifies the plumbing and call sites.
show more ...
|
|
Revision tags: llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2 |
|
| #
8614cb9f |
| 24-Aug-2021 |
Lang Hames <[email protected]> |
[ORC-RT] Add non-const WrapperFunctionResult data access, simplify allocate.
WrapperFunctionResult no longer supports wrapping constant data, so this patch provides direct non-const access to the wr
[ORC-RT] Add non-const WrapperFunctionResult data access, simplify allocate.
WrapperFunctionResult no longer supports wrapping constant data, so this patch provides direct non-const access to the wrapped data. Since wrapped data can now be written, the WrapperFunctionResult::allocate method can be simplified to return a WrapperFunctionResult.
This is essentially the same change (and with the same motivation) as LLVM commit 8b117830b1b, but applied to the ORC runtime's WrapperFunctionResult code.
show more ...
|
|
Revision tags: llvmorg-13.0.0-rc1, llvmorg-14-init |
|
| #
ad4f0477 |
| 19-Jul-2021 |
Lang Hames <[email protected]> |
[ORC-RT] Fix missing std::move.
This should fix the 'could-not-covert' error at wrapper_function_utils.h:128 in https://lab.llvm.org/buildbot/#/builders/112/builds/7748.
|
| #
bb5f97e3 |
| 14-Jul-2021 |
Lang Hames <[email protected]> |
[ORC][ORC-RT] Introduce ORC-runtime based MachO-Platform.
Adds support for MachO static initializers/deinitializers and eh-frame registration via the ORC runtime.
This commit introduces cooperative
[ORC][ORC-RT] Introduce ORC-runtime based MachO-Platform.
Adds support for MachO static initializers/deinitializers and eh-frame registration via the ORC runtime.
This commit introduces cooperative support code into the ORC runtime and ORC LLVM libraries (especially the MachOPlatform class) to support macho runtime features for JIT'd code. This commit introduces support for static initializers, static destructors (via cxa_atexit interposition), and eh-frame registration. Near-future commits will add support for MachO native thread-local variables, and language runtime registration (e.g. for Objective-C and Swift).
The llvm-jitlink tool is updated to use the ORC runtime where available, and regression tests for the new MachOPlatform support are added to compiler-rt.
Notable changes on the ORC runtime side:
1. The new macho_platform.h / macho_platform.cpp files contain the bulk of the runtime-side support. This includes eh-frame registration; jit versions of dlopen, dlsym, and dlclose; a cxa_atexit interpose to record static destructors, and an '__orc_rt_macho_run_program' function that defines running a JIT'd MachO program in terms of the jit- dlopen/dlsym/dlclose functions.
2. Replaces JITTargetAddress (and casting operations) with ExecutorAddress (copied from LLVM) to improve type-safety of address management.
3. Adds serialization support for ExecutorAddress and unordered_map types to the runtime-side Simple Packed Serialization code.
4. Adds orc-runtime regression tests to ensure that static initializers and cxa-atexit interposes work as expected.
Notable changes on the LLVM side:
1. The MachOPlatform class is updated to:
1.1. Load the ORC runtime into the ExecutionSession. 1.2. Set up standard aliases for macho-specific runtime functions. E.g. ___cxa_atexit -> ___orc_rt_macho_cxa_atexit. 1.3. Install the MachOPlatformPlugin to scrape LinkGraphs for information needed to support MachO features (e.g. eh-frames, mod-inits), and communicate this information to the runtime. 1.4. Provide entry-points that the runtime can call to request initializers, perform symbol lookup, and request deinitialiers (the latter is implemented as an empty placeholder as macho object deinits are rarely used). 1.5. Create a MachO header object for each JITDylib (defining the __mh_header and __dso_handle symbols).
2. The llvm-jitlink tool (and llvm-jitlink-executor) are updated to use the runtime when available.
3. A `lookupInitSymbolsAsync` method is added to the Platform base class. This can be used to issue an async lookup for initializer symbols. The existing `lookupInitSymbols` method is retained (the GenericIRPlatform code is still using it), but is deprecated and will be removed soon.
4. JIT-dispatch support code is added to ExecutorProcessControl.
The JIT-dispatch system allows handlers in the JIT process to be associated with 'tag' symbols in the executor, and allows the executor to make remote procedure calls back to the JIT process (via __orc_rt_jit_dispatch) using those tags.
The primary use case is ORC runtime code that needs to call bakc to handlers in orc::Platform subclasses. E.g. __orc_rt_macho_jit_dlopen calling back to MachOPlatform::rt_getInitializers using __orc_rt_macho_get_initializers_tag. (The system is generic however, and could be used by non-runtime code).
The new ExecutorProcessControl::JITDispatchInfo struct provides the address (in the executor) of the jit-dispatch function and a jit-dispatch context object, and implementations of the dispatch function are added to SelfExecutorProcessControl and OrcRPCExecutorProcessControl.
5. OrcRPCTPCServer is updated to support JIT-dispatch calls over ORC-RPC.
6. Serialization support for StringMap is added to the LLVM-side Simple Packed Serialization code.
7. A JITLink::allocateBuffer operation is introduced to allocate writable memory attached to the graph. This is used by the MachO header synthesis code, and will be generically useful for other clients who want to create new graph content from scratch.
show more ...
|
|
Revision tags: llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2 |
|
| #
68c16109 |
| 15-Jun-2021 |
Lang Hames <[email protected]> |
[ORC-RT] Fix void function handling in the WrapperFunction utility.
Handlers returning void previously caused compile errors. Fix that by substituting SPSEmpty placeholder values.
|
| #
ba9e2806 |
| 14-Jun-2021 |
Lang Hames <[email protected]> |
[ORC-RT] Fix an error check.
|
| #
e405db07 |
| 13-Jun-2021 |
Lang Hames <[email protected]> |
[ORC-RT] Fix a comment.
|
| #
49f4a58d |
| 12-Jun-2021 |
Lang Hames <[email protected]> |
[ORC-RT] Split Simple-Packed-Serialization code into its own header.
This will simplify integration of this code into LLVM -- The Simple-Packed-Serialization code can be copied near-verbatim, but Wr
[ORC-RT] Split Simple-Packed-Serialization code into its own header.
This will simplify integration of this code into LLVM -- The Simple-Packed-Serialization code can be copied near-verbatim, but WrapperFunctionResult will require more adaptation.
show more ...
|
| #
cb09f2b1 |
| 09-Jun-2021 |
David Blaikie <[email protected]> |
Rename compiler-rt/lib/orc/endian.h to endianness.h to avoid conflict with system headers
|
| #
da592413 |
| 31-May-2021 |
Lang Hames <[email protected]> |
[ORC-RT] Add WrapperFunctionResult, Simple Packed Serialization (SPS) system.
WrapperFunctionResult is a C++ wrapper for __orc_rt_CWrapperFunctionResult that automatically manages the underlying str
[ORC-RT] Add WrapperFunctionResult, Simple Packed Serialization (SPS) system.
WrapperFunctionResult is a C++ wrapper for __orc_rt_CWrapperFunctionResult that automatically manages the underlying struct.
The Simple Packed Serialization (SPS) utilities support a simple serialization scheme for wrapper function argument and result buffers:
Primitive typess (bool, char, int8_t, and uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t, uint64_t) are serialized in little-endian form.
SPSTuples are serialized by serializing each of the tuple members in order without padding.
SPSSequences are serialized by serializing a sequence length (as a uint64_t) followed by each of the elements of the sequence in order without padding.
Serialization/deserialization always involves a pair of SPS type tag (a tag representing the serialized format to use, e.g. uint32_t, or SPSTuple<bool, SPSString>) and a concrete type to be serialized from or deserialized to (uint32_t, std::pair<bool, std::string>). Serialization for new types can be implemented by specializing the SPSSerializationTraits type.
show more ...
|