<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp, branch users/nico/python-2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>Pass memory buffer to RuntimeDyld::MemoryManager factory (#142930)</title>
<updated>2025-06-05T23:44:39+00:00</updated>
<author>
<name>Karlo Basioli</name>
<email>k.basioli@gmail.com</email>
</author>
<published>2025-06-05T23:44:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=cd585864c0bbbd74ed2a2b1ccc191eed4d1c8f90'/>
<id>cd585864c0bbbd74ed2a2b1ccc191eed4d1c8f90</id>
<content type='text'>
`RTDyldObjectLinkingLayer` is currently creating a memory manager
without any parameters.

In this PR I am passing the MemoryBuffer that will be emitted to the
MemoryManager so that the user can use it to configure the behaviour of
the MemoryManager.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`RTDyldObjectLinkingLayer` is currently creating a memory manager
without any parameters.

In this PR I am passing the MemoryBuffer that will be emitted to the
MemoryManager so that the user can use it to configure the behaviour of
the MemoryManager.</pre>
</div>
</content>
</entry>
<entry>
<title>[ORC] Add note to call endSession to assertion messages.</title>
<updated>2025-02-05T00:33:28+00:00</updated>
<author>
<name>Lang Hames</name>
<email>lhames@gmail.com</email>
</author>
<published>2025-02-05T00:29:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c67148d8460c7c106c9137b3d4dfdf989de82a4a'/>
<id>c67148d8460c7c106c9137b3d4dfdf989de82a4a</id>
<content type='text'>
The most likely cause of these assertions is a failure to call endSession. The
new message should clients spot the issue more easily.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The most likely cause of these assertions is a failure to call endSession. The
new message should clients spot the issue more easily.
</pre>
</div>
</content>
</entry>
<entry>
<title>[ORC] Fix transfer to unknown ResourceTrackers (#114063)</title>
<updated>2024-10-30T12:56:27+00:00</updated>
<author>
<name>Jonas Hahnfeld</name>
<email>jonas.hahnfeld@cern.ch</email>
</author>
<published>2024-10-30T12:56:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c4e135ec04a2bef5d5a5a69dfbb069a15dbf2f5e'/>
<id>c4e135ec04a2bef5d5a5a69dfbb069a15dbf2f5e</id>
<content type='text'>
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.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.</pre>
</div>
</content>
</entry>
<entry>
<title>[orc] Fix asan error in RTDyldObjectLinkingLayer.cpp (#106300)</title>
<updated>2024-08-28T01:28:40+00:00</updated>
<author>
<name>Eugene Zhulenev</name>
<email>ezhulenev@google.com</email>
</author>
<published>2024-08-28T01:28:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c0ebc1806a70dc66699f10160e80d1def8a8e3c9'/>
<id>c0ebc1806a70dc66699f10160e80d1def8a8e3c9</id>
<content type='text'>
`JITDylibSearchOrderResolver` local variable can be destroyed before
completion of all callbacks. Capture it together with `Deps` in
`OnEmitted` callback.

Original error:

```
==2035==ERROR: AddressSanitizer: stack-use-after-return on address 0x7bebfa155b70 at pc 0x7ff2a9a88b4a bp 0x7bec08d51980 sp 0x7bec08d51978
READ of size 8 at 0x7bebfa155b70 thread T87 (tf_xla-cpu-llvm)
    #0 0x7ff2a9a88b49 in operator() llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp:55:58
    #1 0x7ff2a9a88b49 in __invoke&lt;(lambda at llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp:55:9) &amp;, const llvm::DenseMap&lt;llvm::orc::JITDylib *, llvm::DenseSet&lt;llvm::orc::SymbolStringPtr, llvm::DenseMapInfo&lt;llvm::orc::SymbolStringPtr, void&gt; &gt;, llvm::DenseMapInfo&lt;llvm::orc::JITDylib *, void&gt;, llvm::detail::DenseMapPair&lt;llvm::orc::JITDylib *, llvm::DenseSet&lt;llvm::orc::SymbolStringPtr, llvm::DenseMapInfo&lt;llvm::orc::SymbolStringPtr, void&gt; &gt; &gt; &gt; &amp;&gt; libcxx/include/__type_traits/invoke.h:149:25
    #2 0x7ff2a9a88b49 in __call&lt;(lambda at llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp:55:9) &amp;, const llvm::DenseMap&lt;llvm::orc::JITDylib *, llvm::DenseSet&lt;llvm::orc::SymbolStringPtr, llvm::DenseMapInfo&lt;llvm::orc::SymbolStringPtr, void&gt; &gt;, llvm::DenseMapInfo&lt;llvm::orc::JITDylib *, void&gt;, llvm::detail::DenseMapPair&lt;llvm::orc::JITDylib *, llvm::DenseSet&lt;llvm::orc::SymbolStringPtr, llvm::DenseMapInfo&lt;llvm::orc::SymbolStringPtr, void&gt; &gt; &gt; &gt; &amp;&gt; libcxx/include/__type_traits/invoke.h:224:5
    #3 0x7ff2a9a88b49 in operator() libcxx/include/__functional/function.h:210:12
    #4 0x7ff2a9a88b49 in void std::__u::__function::__policy_invoker&lt;void (llvm::DenseMap&lt;llvm::orc::JITDylib*, llvm::DenseSet&lt;llvm::orc::SymbolStringPtr,
```</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`JITDylibSearchOrderResolver` local variable can be destroyed before
completion of all callbacks. Capture it together with `Deps` in
`OnEmitted` callback.

Original error:

```
==2035==ERROR: AddressSanitizer: stack-use-after-return on address 0x7bebfa155b70 at pc 0x7ff2a9a88b4a bp 0x7bec08d51980 sp 0x7bec08d51978
READ of size 8 at 0x7bebfa155b70 thread T87 (tf_xla-cpu-llvm)
    #0 0x7ff2a9a88b49 in operator() llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp:55:58
    #1 0x7ff2a9a88b49 in __invoke&lt;(lambda at llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp:55:9) &amp;, const llvm::DenseMap&lt;llvm::orc::JITDylib *, llvm::DenseSet&lt;llvm::orc::SymbolStringPtr, llvm::DenseMapInfo&lt;llvm::orc::SymbolStringPtr, void&gt; &gt;, llvm::DenseMapInfo&lt;llvm::orc::JITDylib *, void&gt;, llvm::detail::DenseMapPair&lt;llvm::orc::JITDylib *, llvm::DenseSet&lt;llvm::orc::SymbolStringPtr, llvm::DenseMapInfo&lt;llvm::orc::SymbolStringPtr, void&gt; &gt; &gt; &gt; &amp;&gt; libcxx/include/__type_traits/invoke.h:149:25
    #2 0x7ff2a9a88b49 in __call&lt;(lambda at llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp:55:9) &amp;, const llvm::DenseMap&lt;llvm::orc::JITDylib *, llvm::DenseSet&lt;llvm::orc::SymbolStringPtr, llvm::DenseMapInfo&lt;llvm::orc::SymbolStringPtr, void&gt; &gt;, llvm::DenseMapInfo&lt;llvm::orc::JITDylib *, void&gt;, llvm::detail::DenseMapPair&lt;llvm::orc::JITDylib *, llvm::DenseSet&lt;llvm::orc::SymbolStringPtr, llvm::DenseMapInfo&lt;llvm::orc::SymbolStringPtr, void&gt; &gt; &gt; &gt; &amp;&gt; libcxx/include/__type_traits/invoke.h:224:5
    #3 0x7ff2a9a88b49 in operator() libcxx/include/__functional/function.h:210:12
    #4 0x7ff2a9a88b49 in void std::__u::__function::__policy_invoker&lt;void (llvm::DenseMap&lt;llvm::orc::JITDylib*, llvm::DenseSet&lt;llvm::orc::SymbolStringPtr,
```</pre>
</div>
</content>
</entry>
<entry>
<title>[ORC] Merge MaterializationResponsibility notifyEmitted and addDependencies</title>
<updated>2024-01-31T21:06:09+00:00</updated>
<author>
<name>lhames</name>
<email>lhames@gmail.com</email>
</author>
<published>2024-01-31T21:06:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ebe8733a11e735bb9f5ca45ec752c2a416380c8d'/>
<id>ebe8733a11e735bb9f5ca45ec752c2a416380c8d</id>
<content type='text'>
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.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.</pre>
</div>
</content>
</entry>
<entry>
<title>Fix typos in comments of ExecutionEngine (NFC)</title>
<updated>2023-08-14T05:58:25+00:00</updated>
<author>
<name>Eymen Ünay</name>
<email>eymenunay@outlook.com</email>
</author>
<published>2023-08-14T05:52:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=94239712eb17989bf23f73f790dc5a18f42dd33b'/>
<id>94239712eb17989bf23f73f790dc5a18f42dd33b</id>
<content type='text'>
Reviewed By: sgraenitz

Differential Revision: https://reviews.llvm.org/D157226
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reviewed By: sgraenitz

Differential Revision: https://reviews.llvm.org/D157226
</pre>
</div>
</content>
</entry>
<entry>
<title>[ORC] Move most ORC APIs to ExecutorAddr, introduce ExecutorSymbolDef.</title>
<updated>2023-03-28T00:37:58+00:00</updated>
<author>
<name>Lang Hames</name>
<email>lhames@gmail.com</email>
</author>
<published>2023-03-22T18:45:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8b1771bd9f304be39d4dcbdcccedb6d3bcd18200'/>
<id>8b1771bd9f304be39d4dcbdcccedb6d3bcd18200</id>
<content type='text'>
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).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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).
</pre>
</div>
</content>
</entry>
<entry>
<title>Teach RuntimeDyld about COFF weak references and to consider comdat symbols weak.</title>
<updated>2023-01-24T18:25:49+00:00</updated>
<author>
<name>Vassil Vassilev</name>
<email>v.g.vassilev@gmail.com</email>
</author>
<published>2023-01-24T18:24:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=38ef56880a99e6382f4a1f9113646295953c0b16'/>
<id>38ef56880a99e6382f4a1f9113646295953c0b16</id>
<content type='text'>
Patch by Lang Hames and Sunho Kim!

Differential revision: https://reviews.llvm.org/D138264
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Patch by Lang Hames and Sunho Kim!

Differential revision: https://reviews.llvm.org/D138264
</pre>
</div>
</content>
</entry>
<entry>
<title>[ORC] Add JITDylib argument to ResourceManager notify-removing/transferring ops.</title>
<updated>2022-12-19T22:56:08+00:00</updated>
<author>
<name>Lang Hames</name>
<email>lhames@gmail.com</email>
</author>
<published>2022-11-14T06:12:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=bf6d7ca9870beb66766e2c087f5109eeb538f530'/>
<id>bf6d7ca9870beb66766e2c087f5109eeb538f530</id>
<content type='text'>
In some cases it's helpful to group trackers by JITDylib. E.g. Platform classes
may want to track initializer symbols with a `JITDylib -&gt; Tracker -&gt; [ 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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In some cases it's helpful to group trackers by JITDylib. E.g. Platform classes
may want to track initializer symbols with a `JITDylib -&gt; Tracker -&gt; [ 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.
</pre>
</div>
</content>
</entry>
<entry>
<title>[C-API] LLVMOrcCreateRTDyldObjectLinkingLayerWithMCJITMemoryManagerLikeCallbacks</title>
<updated>2022-12-17T03:15:07+00:00</updated>
<author>
<name>Lang Hames</name>
<email>lhames@gmail.com</email>
</author>
<published>2022-12-17T02:01:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=916ef9b0249f41886fba31168d8cadad8c5f8fbb'/>
<id>916ef9b0249f41886fba31168d8cadad8c5f8fbb</id>
<content type='text'>
Adds a LLVMOrcCreateRTDyldObjectLinkingLayerWithMCJITMemoryManagerLikeCallbacks
function that can be used to create an RTDyldObjectLinkingLayer using callbacks
that are similar (but not identical) to those used in
LLVMCreateSimpleMCJITMemoryManager. This is intended to ease the transition to
ORC for MCJIT C-API clients.

Differential Revision: https://reviews.llvm.org/D139393
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adds a LLVMOrcCreateRTDyldObjectLinkingLayerWithMCJITMemoryManagerLikeCallbacks
function that can be used to create an RTDyldObjectLinkingLayer using callbacks
that are similar (but not identical) to those used in
LLVMCreateSimpleMCJITMemoryManager. This is intended to ease the transition to
ORC for MCJIT C-API clients.

Differential Revision: https://reviews.llvm.org/D139393
</pre>
</div>
</content>
</entry>
</feed>
