aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp
AgeCommit message (Collapse)AuthorFilesLines
2025-01-09[ORC] Remove an unused typedef.Lang Hames1-2/+0
2024-12-17[ORC] Introduce LinkGraphLayer interface and LinkGraphLinkingLayer. (#120182)Lang Hames1-766/+7
Introduces a new layer interface, LinkGraphLayer, that can be used to add LinkGraphs to an ExecutionSession. This patch moves most of ObjectLinkingLayer's functionality into a new LinkGraphLinkingLayer which should (in the future) be able to be used without linking libObject. ObjectLinkingLayer now inherits from LinkGraphLinkingLayer and just handles conversion of object files to LinkGraphs, which are then handed down to LinkGraphLinkingLayer to be linked.
2024-12-16[ORC] Make ObjectLinkingLayerJITLinkContext a private nested class.Lang Hames1-10/+7
This class is an implementation detail, so doesn't need a publicly accessible name.
2024-12-06[JITLink] Switch to SymbolStringPtr for Symbol names (#115796)Jared Wyles1-37/+20
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>
2024-12-03Re-apply "[ORC][JITLink] Add jitlink::Scope::SideEffectsOnly" with fixes.Lang Hames1-6/+6
This reapplies aba6bb0820b, which was reverted in 28e2a891210 due to bot failures. It contains fixes to silence warnings for uncovered switches, and for incorrect initializer-symbol handling on ELF and COFF.
2024-12-03Revert "[ORC][JITLink] Add jitlink::Scope::SideEffectsOnly, use it in ORC ↵Lang Hames1-6/+6
Platforms." This reverts commit aba6bb0820b247d4caf4b5e00810909214a58053 while I investigate bot failures (e.g. https://lab.llvm.org/buildbot/#/builders/143/builds/3848)
2024-12-03[ORC][JITLink] Add jitlink::Scope::SideEffectsOnly, use it in ORC Platforms.Lang Hames1-6/+6
SideEffectsOnly is a new jitlink::Scope value that corresponds to the JITSymbolFlags::MaterializationSideEffectsOnly flag: Symbols with this scope can be looked up (and form part of the initial interface of a LinkGraph) but never actually resolve to an address (so can only be looked up with a WeaklyReferencedSymbol lookup). Previously ObjectLinkingLayer implicitly treated JITLink symbols as having this scope, regardless of a Symbol's actual scope, if the MaterializationSideEffectsOnly flag was set on the corresponding symbol in the MaterializationResponsibility object. Using an explicit scope in JITLink for this (1) allows JITLink plugins to identify and correctly handle side-effects-only symbols, and (2) allows raw LinkGraphs to define side-effects-only symbols without clients having to manually modify their `MaterializationUnit::Interface`.
2024-12-02[ORC] Remove redundant check from ObjectLinkingLayer.Lang Hames1-2/+2
Non-locally scoped symbols must have names.
2024-11-19[ExecutionEngine] Remove unused includes (NFC) (#116749)Kazu Hirata1-2/+0
Identified with misc-include-cleaner.
2024-10-30[ORC] Fix transfer to unknown ResourceTrackers (#114063)Jonas Hahnfeld1-5/+4
When transferring resources, the destination tracker key may not be in the internal map, invalidating iterators and value references. The added test creates such situation and would fail before with "Finalized allocation was not deallocated." For good measure, fix the same pattern in RTDyldObjectLinkingLayer which is harder to test because it "only" results in memory managers being deleted in the wrong order.
2024-09-22[ORC] Get rid of ObjectLinkingLayer::Plugin::getSyntheticSymbolDependencies.Lang Hames1-10/+9
Instead, when a MaterializationResponsibility contains an initializer symbol, the Platform classes (MachO, COFF, ELFNix) will now add a defined symbol with the same name to an arbitary block within the initializer sections, and then add keep-alive edges from that symbol to all other init section blocks. ObjectLinkingLayer is updated to automatically discard symbols where the corresponding MaterializationResponsibility entry has the MaterializationSideEffecstsOnly flag. This change simplifies both the ObjectLinkingLayer::Plugin interface and the dependence tracking algorithm, which no longer needs a special case for "synthetic" (MaterializationSideEffectsOnly) symbols.
2024-09-22[ORC] Simplify intra-graph dependence tracking in ObjectLinkingLayer.Lang Hames1-203/+133
ObjectLinkingLayer::registerDependencies used to propagate external symbol dependencies (dependencies on symbols outside the current graph) to all nodes. Since ebe8733a11e, which merged addDependencies into notifyEmitted, the notifyEmitted function will propagate intra-graph dependencies, so registerDependencies no longer needs to do this. This patch updates ObjectLinkingLayer::registerDependencies to just propagate named dependencies (on both internal and external symbols) through anonymous blocks, leaving the rest of the work to ExecutionSession::notifyEmitted. It also choses a key symbol to use for blocks containing multiple symbols. The result is both easier to read and faster.
2024-09-06[orc] Avoid pathological propogation order (#107488)Ben Langmuir1-3/+4
In certain pathological object files we were getting extremely slow linking because we were repeatedly propogating dependencies to the same blocks instead of accumulating as many changes as possible. Change the order of iteration so that we go through every node in the worklist before returning to any previous node, reducing the number of expensive dependency iterations. In practice, this took one case from 60 seconds to 2 seconds. Note: the performance is still non-deterministic, because the block order itself is non-deterministic. rdar://133734391
2024-06-26[ORC] Fix block dependence calculation in ObjectLinkingLayer.Lang Hames1-2/+4
This fixes a bug in ObjectLinkingLayer::computeBlockNonLocalDeps: The worklist needs to be built *after* all immediate dependencies / dependants are recorded, rather than trying to populate it as part of the same loop. (Trying to do the latter causes us to miss some blocks that should have been included in the worklist). This fixes a bug discovered by @Sahil123 on discord during work on out-of-process execution support in the clang-repl. No testcase yet. This *might* be testable with a unit test and a custom JITLinkContext but I believe some aspects of the algorithm depend on memory layout. I'll need to investigate that. Alternatively we could add llvm-jitlink testcases that exercise concurrent linking (and should probably do that anyway). Either option will require some investment and I don't want to hold this fix up in the mean time.
2024-04-30[ORC] Switch ObjectLinkingLayer::Plugins to shared ownership, copy pipeline.Lang Hames1-35/+38
Previously ObjectLinkingLayer held unique ownership of Plugins, and links always used the Layer's plugin list at each step. This can cause problems if plugins are added while links are in progress however, as the newly added plugin may receive only some of the callbacks for links that are already running. In this patch each link gets its own copy of the pipeline that remains consistent throughout the link's lifetime, and it is guaranteed that Plugin objects (now with shared ownership) will remain valid until the link completes. Coding my way home: 9.80469S, 139.03167W
2024-03-07[ORC] Deallocate FinalizedAllocs on error paths in notifyEmitted.Lang Hames1-2/+10
If notifyEmitted encounters a failure (either because some plugin returned one, or because the ResourceTracker was defunct) then we need to deallocate the FinalizedAlloc manually. No testcase yet: This requires a concurrent setup -- we'll need to build some infrastructure to coordinate links and deliberately injected failures in order to reliably test this.
2024-03-07[ORC] Propagate defineMaterializing failure when resource tracker is defunct.Lang Hames1-3/+4
Remove an overly aggressive cantFail: This call to defineMaterializing should never fail with a duplicate symbols error (since all new symbols shoul be weak), but may fail if the tracker has become defunct in the mean time. In that case we need to propagate the error.
2024-01-31[ORC] Merge MaterializationResponsibility notifyEmitted and addDependencieslhames1-61/+73
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.
2024-01-05[ORC] Add absoluteSymbolsLinkGraph to expose absolute symbols to platform ↵Ben Langmuir1-3/+11
(#77008) Adds a function to create a LinkGraph of absolute symbols, and a callback in dynamic library search generators to enable using it to expose its symbols to the platform/orc runtime. This allows e.g. using __orc_rt_run_program to run a precompiled function that was found via dlsym. Ideally we would use this in llvm-jitlink's own search generator, but it will require more work to align with the Process/Platform JITDylib split, so not handled here. As part of this change we need to handle LinkGraphs that only have absolute symbols.
2023-09-09[jitlink][rtdyld][checker] Re-apply 4b17c81d5a5 with fixes.Eymen Ünay1-1/+1
This re-applies 4b17c81d5a5, "[jitlink/rtdydl][checker] Add TargetFlag dependent disassembler switching support", which was reverted in 4871a9ca546 due to bot failures. The patch has been updated to add missing plumbing for Subtarget Features and a CPU string, which should fix the failing tests. https://reviews.llvm.org/D158280
2023-09-08Revert "[jitlink/rtdydl][checker] Add TargetFlag dependent disassembler ↵Tom Weaver1-1/+1
switching support" This reverts commit 4b17c81d5a5d3e0f514026c2b7f9b623d901cc04. Caused buildbot failures: https://lab.llvm.org/buildbot/#/builders/230/builds/18341 https://lab.llvm.org/buildbot/#/builders/109/builds/73169 https://lab.llvm.org/buildbot/#/builders/67/builds/12597
2023-09-08[jitlink/rtdydl][checker] Add TargetFlag dependent disassembler switching ↵Eymen Ünay1-1/+1
support Some targets such as AArch32 make use of TargetFlags to indicate ISA mode. Depending on the TargetFlag, MCDisassembler and similar target specific objects should be reinitialized with the correct Target Triple. Backends with similar needs can easily extend this implementation for their usecase. The drivers llvm-rtdyld and llvm-jitlink have their SymbolInfo's extended to take TargetFlag into account. RuntimeDyldChecker can now create necessary TargetInfo to reinitialize MCDisassembler and MCInstPrinter. The required triple is obtained from the new getTripleFromTargetFlag function by checking the TargetFlag. In addition, breaking changes for RuntimeDyld COFF Thumb tests are fixed by making the backend emit a TargetFlag. Reviewed By: lhames, sgraenitz Differential Revision: https://reviews.llvm.org/D158280
2023-03-28[Orc][AArch32] Polish Thumb symbol assertions in ObjectLinkingLayerStefan Gränitz1-6/+8
2023-03-27[ORC] Move most ORC APIs to ExecutorAddr, introduce ExecutorSymbolDef.Lang Hames1-4/+4
ExecutorAddr was introduced in b8e5f918166 as an eventual replacement for JITTargetAddress. ExecutorSymbolDef is introduced in this patch as a replacement for JITEvaluatedSymbol: ExecutorSymbolDef is an (ExecutorAddr, JITSymbolFlags) pair, where JITEvaluatedSymbol was a (JITTargetAddress, JITSymbolFlags) pair. A number of APIs had already migrated from JITTargetAddress to ExecutorAddr, but many of ORC's internals were still using the older type. This patch aims to address that. Some public APIs are affected as well. If you need to migrate your APIs you can use the following operations: * ExecutorAddr::toPtr replaces jitTargetAddressToPointer and jitTargetAddressToFunction. * ExecutorAddr::fromPtr replace pointerToJITTargetAddress. * ExecutorAddr(JITTargetAddress) creates an ExecutorAddr value from a JITTargetAddress. * ExecutorAddr::getValue() creates a JITTargetAddress value from an ExecutorAddr. JITTargetAddress and JITEvaluatedSymbol will remain in JITSymbol.h for now, but the aim will be to eventually deprecate and remove these types (probably when MCJIT and RuntimeDyld are deprecated).
2023-03-24Reland "[JITLink] Initial AArch32 backend"Stefan Gränitz1-4/+17
This first version lays the foundations for AArch32 support in JITLink. ELFLinkGraphBuilder_aarch32 processes REL-type relocations and populates LinkGraphs from ELF object files for both big- and little-endian systems. The ArmCfg member controls subarchitecture-specific details throughout the linking process (i.e. it's passed to ELFJITLinker_aarch32). Relocation types follow the ABI documentation's division into classes: Data (endian-sensitive), Arm (32-bit little-endian) and Thumb (2x 16-bit little-endian, "Thumb32" in the docs). The implementation of instruction encoding/decoding for relocation resolution is implemented symmetrically and is testable in isolation (see AArch32 category in JITLinkTests). Callable Thumb functions are marked with a ThumbSymbol target-flag and stored in the LinkGraph with their real addresses. The thumb-bit is added back in when the owning JITDylib requests the address for such a symbol. The StubsManager can generate (absolute) Thumb-state stubs for branch range extensions on v7+ targets. Proper GOT/PLT handling is not yet implemented. This patch is based on the backend implementation in ez-clang and has just enough functionality to model the infrastructure and link a Thumb function `main()` that calls `printf()` to dump "Hello Arm!" on Armv7a. It was tested on Raspberry Pi with 32-bit Raspbian OS. Reviewed By: lhames Differential Revision: https://reviews.llvm.org/D144083
2023-03-23Revert "[JITLink] Initial AArch32 backend"Gulfem Savrun Yeniceri1-5/+1
This reverts commit c2de8ff92753acdb1ace7a27cc11cb09f28eb8fa. It caused a segmentation fault while running ExecutionEngine tests on Mac. https://luci-milo.appspot.com/ui/p/fuchsia/builders/toolchain.ci/clang-mac-x64/b8785839382041226465/overview
2023-03-23[JITLink] Initial AArch32 backendStefan Gränitz1-1/+5
This first version lays the foundations for AArch32 support in JITLink. ELFLinkGraphBuilder_aarch32 processes REL-type relocations and populates LinkGraphs from ELF object files for both big- and little-endian systems. The ArmCfg member controls subarchitecture-specific details throughout the linking process (i.e. it's passed to ELFJITLinker_aarch32). Relocation types follow the ABI documentation's division into classes: Data (endian-sensitive), Arm (32-bit little-endian) and Thumb (2x 16-bit little-endian, "Thumb32" in the docs). The implementation of instruction encoding/decoding for relocation resolution is implemented symmetrically and is testable in isolation (see AArch32 category in JITLinkTests). Callable Thumb functions are marked with a ThumbSymbol target-flag and stored in the LinkGraph with their real addresses. The thumb-bit is added back in when the owning JITDylib requests the address for such a symbol. The StubsManager can generate (absolute) Thumb-state stubs for branch range extensions on v7+ targets. Proper GOT/PLT handling is not yet implemented. This patch is based on the backend implementation in ez-clang and has just enough functionality to model the infrastructure and link a Thumb function `main()` that calls `printf()` to dump "Hello Arm!" on Armv7a. It was tested on Raspberry Pi with 32-bit Raspbian OS. Reviewed By: lhames Differential Revision: https://reviews.llvm.org/D144083
2023-03-22[JITLink] Introduce target flags for Symbol and prepare ObjectLinkingLayer ↵Stefan Gränitz1-5/+8
to account for them AArch32 branch offsets explicitly encode the target instruction subset (Arm/Thumb) in their least significant bit. We want this bit set (or clear) in addreses we hand out, but the addresses in the LinkGraph should be the real/physical addresses. This patch allows ELFLinkGraphBuilder's to set target-specific flags in jitlink::Symbol and prepares ObjectLinkingLayer to account for them. Reviewed By: lhames Differential Revision: https://reviews.llvm.org/D146641
2023-02-11[ORC] Move ORC-specific object format details into OrcShared.Lang Hames1-0/+17
This allows these details to be shared with JITLink, which is allowed to depend on the OrcShared library (but not on OrcJIT).
2023-02-01[ORC] Merge redundant jitlink::Symbol -> JITSymbolFlags mappings.Lang Hames1-27/+21
Adds a getJITSymbolFlagsForSymbol function that returns the JITSymbolFlags for a given jitlink::Symbol, and replaces severalredundant copies of that mapping with calls to the new function. This fixes a bug in LinkGraphMaterializationUnit::scanLinkGraph where we were failing to set the JITSymbolFlags::Weak flag for weak symbols, and a bug in ObjectLinkingLayer::claimOrExternalizeWeakAndCommonSymbols where we were failing to set the JITSymbolFlags::Callable flag for callable symbols.
2022-12-19[ORC] Add JITDylib argument to ResourceManager notify-removing/transferring ops.Lang Hames1-6/+8
In some cases it's helpful to group trackers by JITDylib. E.g. Platform classes may want to track initializer symbols with a `JITDylib -> Tracker -> [ Symbol ]` map. This makes it easy to collect all symbols for the JITDylib, while still allowing efficient removal of a single tracker. Passing the JITDylib as an argument to ResourceManager::notifyRemovingResources and ResourceManager::notifyTransferringResources supports such use-cases.
2022-12-12[ORC] Extract hasInitializerSection for testing (NFC)Keith Smiley1-24/+2
Based on the discussion in https://reviews.llvm.org/D130221 and https://reviews.llvm.org/D139223 Differential Revision: https://reviews.llvm.org/D139347
2022-12-05Remove unused #include "llvm/ADT/Optional.h"Fangrui Song1-1/+0
2022-10-29[ORC] Mark late-claimed weak symbols as live in ObjectLinkingLayer.Lang Hames1-2/+8
ObjectLinkingLayer attempts to claim responsibility for weak definitions that are present in LinkGraphs, but not present in the corresponding MaterializationResponsibility object. Where such a claim is successful, the symbol should be marked as live to prevent it from being dead stripped. (For the curious: Such "late-breaking" definitions are introduced somewhere in the materialization pipeline after the initial responsibility set is calculated. The usual source is the complier or assembler. Examples of common late-breaking definitions include personality pointers, e.g. "DW.ref.__gxx_personality_v0", and named constant pool entries, e.g. __realXX..XX.) The failure to mark these symbols live caused few problems in practice because late-breaking definitions are usually anchored by existing live definitions within the graph (e.g. DW.ref.__gxx_personality_v0 is transitively referenced by functions via eh-frame records), and so they usually survived dead-stripping anyway. This accidental persistence isn't a principled solution though, and it fails altogether if a late-breaking definition is not otherwise referenced by the graph, with the result that the now-claimed symbol is stripped triggering a "Failed to materialize symbols" error in ORC. Marking such symbols live is the correct solution. No testcase, as it's difficult to construct a situation where a late-breaking definition is inserted without being referenced outside the context of new backend bringup or plugin-specific shenanigans. See discussion in https://reviews.llvm.org/D133452 and https://reviews.llvm.org/D136877.
2022-09-27[ORC][JITLink] Retain Weak flags in JITDylib interfaces, propagate to LinkGraph.Lang Hames1-0/+2
Previously we stripped Weak flags from JITDylib symbol table entries once they were resolved (there was no particularly good reason for this). Now we want to retain them and query them when setting the Linkage on external symbols in LinkGraphs during symbol resolution (this was the motivation for 75404e9ef88). Making weak linkage of external definitions discoverable in the LinkGraph will in turn allow future plugins to implement correct handling for them (by recording locations that depend on exported weak definitions and pointing all of these at one chosen definition at runtime).
2022-09-19[ORC] Fix macho section name typoKeith Smiley1-1/+1
I don't think __obj_selrefs is a thing, but __objc_selrefs definitely is. Differential Revision: https://reviews.llvm.org/D130221
2022-08-11[JITLink][COFF][x86_64] Implement SECTION/SECREL relocation.Sunho Kim1-1/+2
Implements SECTION/SECREL relocation. These are used by debug info (pdb) data. Reviewed By: lhames Differential Revision: https://reviews.llvm.org/D130275
2022-06-09[ORC][ORC_RT] Handle ELF .init_array with non-default priorityPeter S. Housel1-2/+5
ELF-based platforms currently support defining multiple static initializer table sections with differing priorities, for example .init_array.0 or .init_array.100; the default .init_array corresponds to a priority of 65535. When building a shared library or executable, the system linker normally sorts these sections and combines them into a single .init_array section. This change adds the capability to recognize ELF static initializers with priorities other than the default, and to properly sort them by priority, to Orc and the Orc runtime. Reviewed By: lhames Differential Revision: https://reviews.llvm.org/D127056
2022-03-07[ORC][JITLink] Fix MachO absolute symbol handling, add test case.Lang Hames1-2/+3
This patch removes the unintended resolution of locally scoped absolute symbols (which was causing unexpected definition errors). It stops using the JITSymbolFlags::Absolute flag (it isn't set or used elsewhere, and causes mismatch-flags asserts), and adds JITSymbolFlags::Exported to default scoped absolute symbols. Finally, we now set the scope of absolute symbols correctly in MachOLinkGraphBuilder.
2022-02-06[llvm] Use = default (NFC)Kazu Hirata1-1/+1
2022-01-08[ORC][JITLink] Merge JITLink AllocActionCall and ORC WrapperFunctionCall.Lang Hames1-8/+7
These types performed identical roles. Merging them simplifies interoperability between JITLink and ORC APIs (allowing us to address a few FIXMEs).
2022-01-06Re-apply "[JITLink] Update JITLink to use ExecutorAddr rather... " with fixes.Lang Hames1-3/+3
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.
2022-01-06Revert "[JITLink] Update JITLink to use ExecutorAddr rather than..."Lang Hames1-3/+3
This reverts commit 133f86e95492b2a00b944e070878424cfa73f87c while I investigate the bot failures at https://lab.llvm.org/buildbot#builders/186/builds/3370.
2022-01-06[JITLink] Update JITLink to use ExecutorAddr rather than JITTargetAddress.Lang Hames1-3/+3
ExecutorAddr is the preferred representation for executor process addresses now.
2021-12-16[ORC] Add custom object interface support to StaticLibaryDefinitionGenerator.Lang Hames1-3/+8
This adds a GetObjectFileInterface callback member to StaticLibraryDefinitionGenerator, and adds an optional argument for initializing that member to StaticLibraryDefinitionGenerator's named constructors. If not supplied, it will default to getObjectFileInterface from ObjectFileInterface.h. To enable testing a `-hidden-l<x>` option is added to the llvm-jitlink tool. This allows archives to be loaded with all contained symbol visibilities demoted to hidden. The ObjectLinkingLayer::setOverrideObjectFlagsWithResponsibilityFlags method is (belatedly) hooked up, and enabled in llvm-jitlink when `-hidden-l<x>` is used so that the demotion is also applied at symbol resolution time (avoiding any "mismatched symbol flags" crashes).
2021-12-08[ORC] Add a MaterializationUnit::Interface struct.Lang Hames1-13/+5
MaterializationUnit::Interface holds the values that make up the interface (for ORC's purposes) of a materialization unit: the symbol flags map and initializer symbol. Having a type for this will make functions that build materializer interfaces more readable and maintainable.
2021-11-19[ORC] Fix materialization of weak local symbolsBen Langmuir1-1/+2
We were adding all defined weak symbols to the materialization responsibility, but local symbols will not be in the symbol table, so it failed to materialize due to the "missing" symbol. Local weak symbols come up in practice when using `ld -r` with a hidden weak symbol. rdar://85574696
2021-11-12[ORC][ORC-RT] Register type metadata from __swift5_types MachO sectionBen Langmuir1-0/+1
Similar to how the other swift sections are registered by the ORC runtime's macho platform, add the __swift5_types section, which contains type metadata. Add a simple test that demonstrates that the swift runtime recognized the registered types. rdar://85358530 Differential Revision: https://reviews.llvm.org/D113811
2021-10-26[ORC] Don't try to perform empty deallocations.Lang Hames1-0/+3
2021-10-11Re-apply e50aea58d59, "Major JITLinkMemoryManager refactor". with fixes.Lang Hames1-15/+12
Adds explicit narrowing casts to JITLinkMemoryManager.cpp. Honors -slab-address option in llvm-jitlink.cpp, which was accidentally dropped in the refactor. This effectively reverts commit 6641d29b70993bce6dbd7e0e0f1040753d38842f.