llvm-project
d2a8e008 - [orc-rt][ORC] Let controllers create SimpleNativeMemoryMaps (#245113)

Commit
10 hours ago
[orc-rt][ORC] Let controllers create SimpleNativeMemoryMaps (#245113) Executors previously had to create a SimpleNativeMemoryMap up front and publish it under an instance symbol. This commit adds a create entrypoint, orc_rt_ci_sps_SimpleNativeMemoryMap_create, that constructs a new instance, adds it to the calling Session as a Service, and returns its address. Executors still decide whether SimpleNativeMemoryMap is available, but controllers now decide whether to create instances, and how many. orc-rt changes: * SimpleNativeMemoryMap's Create methods are replaced with a public constructor, and its header no longer depends on the SPS controller interface. * sps::ci::addSimpleNativeMemoryMap adds the create entrypoint along with the memory operations. It is still called from sps::ci::addAll. * ogre no longer creates an instance, since sps::ci::addAll now publishes the create entrypoint. LLVM changes: * Adds the rt::sps_ci::MemMgrCreate descriptor and sps::MemMgrCreateProxySpec. * sps::createSimpleMemoryMapBindings calls the create entrypoint if the executor provides one, and otherwise falls back to the SimpleNativeMemoryMapInstanceName data symbol. The fallback is needed for OrcTargetProcess, whose wrapper functions have no context through which a new instance could be registered. It can be removed once OrcTargetProcess is retired. * EPCGenericRTDyldMemoryManager uses createSimpleMemoryMapBindings rather than looking up the memory manager symbols itself. Assisted-by: Claude
Author
Parents
Loading