<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Decouple memory management and external symbol resolution."
   href="http://llvm.org/bugs/show_bug.cgi?id=22717">22717</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Decouple memory management and external symbol resolution.
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>OrcJIT
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>lhames@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The RTDyldMemoryManager couples memory allocation and symbol resolution in a
way that I don't think is helpful. Having them coupled hasn't been a blocker so
far, but the LookasideMemoryManager definitely feels like it's working around
something.

Adding a module to an Orc layer should really look like:

addModuleSet(Modules, Lookup, MemoryManagment);

With the MemoryManager being an optional argument (with a sensible default).

We can basically do this now if we thread the lookup argument (I'd make it a
template argument) through the addModuleSet methods down to the
ObjectLinkingLayer. The ObjectLinkingLayer should then construct a
LookasideMemoryManager with the lookup functor that the user has passed in.
Basically take what the user is forced to do now, and do it for them, way down
in the stack where they don't have to look at or think about it.

This approach would avoid affecting any MCJIT clients for now. In the longer
term we could plumb the lookup argument right down into RuntimeDyld to get some
symbol-resolution performance improvements.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>