<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/56714>56714</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Define ORC runtime resource management framework, allow JIT to detach from controller
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          lhames
      </td>
    </tr>
</table>

<pre>
    Once https://github.com/llvm/llvm-project/issues/56603 is complete (or even substantially underway) we should aim to define a clear resource management framework for the ORC runtime. The goals and constraints are:

(1) Multiple ORC programs should be able to run concurrently in the one process (so as not to regress clients who are currently doing this kind of thing). One ORC program should be able to be designated as _the_ JIT'd program -- where interoperability with the system dynamic loader is available JIT'd library loads and symbol lookup should forward through to _the_ JIT'd program.

(2) We should aim to make it possible to detach the controller from the JIT'd program. When detached, the ORC runtime should be responsible for clean teardown of JIT'd code.

(3) Whether through the solution to (2) or some other mechanism, it would be nice to reduce the traffic required for a standard "terminate JIT program" -- i.e. we would like to be able to say "throw everything away", rather than "throw away each of these resources individually".
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyllE1vnDAQhn8NXKwgMMt-HDi0iSq1UhWpqtRjNeAB3DX21h9B_PuOvSXbrqJeKkUbbON3npl5h86ItX3WPbLJ-4vL6ncZ_0B_o_RT6IrezLRQ6mX793Cx5gf2npbSuYCOHpr9vqyZdIzevij0yDJ-NJbhC2rmQuc8aC9BqZUFLdAusGb8xBZkbjJBCQZyZt4wgYPUyID1CsEyi84ES2QzaBhxRu3ZYGHGxdgzGyiAn5A9f3lkNpD-jAX7ShujAeUYaEE42nkLUntaW4y5lU9Zuf3yYxUxPgflJWEnJcpupBBuI-sIp6MzoqMgUbEP1hIJ5SJ1AjCETNd6dC7m7QwDx7Tx6Q6ONu73SmKkWCYTSdhNRBipR9Kh6p0lMZshLvRIZAV71n9RvQFFj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