2015-10-28 03:40:04 +01:00
|
|
|
|
2015-02-23 01:36:25 +01:00
|
|
|
set(LLVM_LINK_COMPONENTS
|
|
|
|
Core
|
2015-10-28 10:37:09 +01:00
|
|
|
ExecutionEngine
|
2021-05-06 04:30:24 +02:00
|
|
|
IRReader
|
2021-05-14 07:47:35 +02:00
|
|
|
JITLink
|
2015-10-29 07:40:04 +01:00
|
|
|
Object
|
2015-04-20 22:41:45 +02:00
|
|
|
OrcJIT
|
2020-11-11 01:55:24 +01:00
|
|
|
OrcShared
|
2020-11-13 07:48:27 +01:00
|
|
|
OrcTargetProcess
|
2019-08-20 01:12:48 +02:00
|
|
|
Passes
|
2015-10-29 07:40:04 +01:00
|
|
|
RuntimeDyld
|
2015-02-23 01:36:25 +01:00
|
|
|
Support
|
2015-10-28 03:40:04 +01:00
|
|
|
native
|
2015-02-23 01:36:25 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
add_llvm_unittest(OrcJITTests
|
2018-01-10 01:09:38 +01:00
|
|
|
CoreAPIsTest.cpp
|
2021-07-27 05:50:19 +02:00
|
|
|
ExecutionSessionWrapperFunctionCallsTest.cpp
|
2015-04-20 22:41:45 +02:00
|
|
|
IndirectionUtilsTest.cpp
|
2018-09-30 21:12:23 +02:00
|
|
|
JITTargetMachineBuilderTest.cpp
|
2018-09-26 06:18:30 +02:00
|
|
|
LazyCallThroughAndReexportsTest.cpp
|
2021-05-14 06:35:34 +02:00
|
|
|
ObjectLinkingLayerTest.cpp
|
2021-04-28 20:21:59 +02:00
|
|
|
OrcCAPITest.cpp
|
2015-04-20 22:41:45 +02:00
|
|
|
OrcTestCommon.cpp
|
2017-04-06 03:49:21 +02:00
|
|
|
QueueChannel.cpp
|
[ORC] Add support for resource tracking/removal (removable code).
This patch introduces new APIs to support resource tracking and removal in Orc.
It is intended as a thread-safe generalization of the removeModule concept from
OrcV1.
Clients can now create ResourceTracker objects (using
JITDylib::createResourceTracker) to track resources for each MaterializationUnit
(code, data, aliases, absolute symbols, etc.) added to the JIT. Every
MaterializationUnit will be associated with a ResourceTracker, and
ResourceTrackers can be re-used for multiple MaterializationUnits. Each JITDylib
has a default ResourceTracker that will be used for MaterializationUnits added
to that JITDylib if no ResourceTracker is explicitly specified.
Two operations can be performed on ResourceTrackers: transferTo and remove. The
transferTo operation transfers tracking of the resources to a different
ResourceTracker object, allowing ResourceTrackers to be merged to reduce
administrative overhead (the source tracker is invalidated in the process). The
remove operation removes all resources associated with a ResourceTracker,
including any symbols defined by MaterializationUnits associated with the
tracker, and also invalidates the tracker. These operations are thread safe, and
should work regardless of the the state of the MaterializationUnits. In the case
of resource transfer any existing resources associated with the source tracker
will be transferred to the destination tracker, and all future resources for
those units will be automatically associated with the destination tracker. In
the case of resource removal all already-allocated resources will be
deallocated, any if any program representations associated with the tracker have
not been compiled yet they will be destroyed. If any program representations are
currently being compiled then they will be prevented from completing: their
MaterializationResponsibility will return errors on any attempt to update the
JIT state.
Clients (usually Layer writers) wishing to track resources can implement the
ResourceManager API to receive notifications when ResourceTrackers are
transferred or removed. The MaterializationResponsibility::withResourceKeyDo
method can be used to create associations between the key for a ResourceTracker
and an allocated resource in a thread-safe way.
RTDyldObjectLinkingLayer and ObjectLinkingLayer are updated to use the
ResourceManager API to enable tracking and removal of memory allocated by the
JIT linker.
The new JITDylib::clear method can be used to trigger removal of every
ResourceTracker associated with the JITDylib (note that this will only
remove resources for the JITDylib, it does not run static destructors).
This patch includes unit tests showing basic usage. A follow-up patch will
update the Kaleidoscope and BuildingAJIT tutorial series to OrcV2 and will
use this API to release code associated with anonymous expressions.
2020-09-11 18:50:41 +02:00
|
|
|
ResourceTrackerTest.cpp
|
[Orc] Add support for remote JITing to the ORC API.
This patch adds utilities to ORC for managing a remote JIT target. It consists
of:
1. A very primitive RPC system for making calls over a byte-stream. See
RPCChannel.h, RPCUtils.h.
2. An RPC API defined in the above system for managing memory, looking up
symbols, creating stubs, etc. on a remote target. See OrcRemoteTargetRPCAPI.h.
3. An interface for creating high-level JIT components (memory managers,
callback managers, stub managers, etc.) that operate over the RPC API. See
OrcRemoteTargetClient.h.
4. A helper class for building servers that can handle the RPC calls. See
OrcRemoteTargetServer.h.
The system is designed to work neatly with the existing ORC components and
functionality. In particular, the ORC callback API (and consequently the
CompileOnDemandLayer) is supported, enabling lazy compilation of remote code.
Assuming this doesn't trigger any builder failures, a follow-up patch will be
committed which tests these utilities by using them to replace LLI's existing
remote-JITing demo code.
llvm-svn: 257305
2016-01-11 02:40:11 +01:00
|
|
|
RPCUtilsTest.cpp
|
2017-04-06 03:49:21 +02:00
|
|
|
RTDyldObjectLinkingLayerTest.cpp
|
2021-06-15 12:26:51 +02:00
|
|
|
SimplePackedSerializationTest.cpp
|
2017-12-05 22:44:56 +01:00
|
|
|
SymbolStringPoolTest.cpp
|
2018-09-27 04:09:36 +02:00
|
|
|
ThreadSafeModuleTest.cpp
|
2021-06-15 12:26:51 +02:00
|
|
|
WrapperFunctionUtilsTest.cpp
|
2015-02-23 01:36:25 +01:00
|
|
|
)
|
2016-04-19 19:13:52 +02:00
|
|
|
|
2019-04-26 01:31:33 +02:00
|
|
|
target_link_libraries(OrcJITTests PRIVATE
|
|
|
|
LLVMTestingSupport
|
|
|
|
${ORC_JIT_TEST_LIBS})
|