<div dir="ltr">Hi Andy,<div><br></div><div>Sounds good in general. One question below:<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Sep 17, 2013 at 4:01 PM, Kaylor, Andrew <span dir="ltr"><<a href="mailto:andrew.kaylor@intel.com" target="_blank">andrew.kaylor@intel.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'm about to start working on multiple module support in MCJIT.  I know a lot of people are interested in this so it seemed like a good idea to begin by soliciting input.<br>


<br>
My immediate plan involves the following:<br>
<br>
- Add something to the MCJIT interface to explicitly request module compilation<br>
- Isolate module-specific state variables into a structure so that the state of each module can be tracked independently<br>
- Identify intermediate objects (such as Target Machine) which have module-specific states and duplicate them as necessary<br>
- Implement a mechanism to automatically attempt to resolve external symbols from a module being loaded against any modules that are associated with the same instance of MCJIT.<br>
<br>
I do not intend (at this time) to address the case where modules have mutual dependencies on one another, though I imagine that will be a case that we'll want to handle in the future.<br></blockquote><div><br></div><div>

Would it be difficult to support it from the start? </div><div> </div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
There's a bit of ugliness that has crept in where RuntimeDyld maintains a module-related state.  That wasn't supposed to happen and now that it has I'll have to do something about it.  I'll need to do a bit of experimenting to determine the best/easiest approach to take at this time.<br>


<br>
I expect that what I'm going to do will more or less follow the shape of what I wrote about in the MCJIT/Kaleidoscope blog posts a couple of months ago, moving whatever I can inside MCJIT.<br>
<br>
If anyone has any work in progress in this area or requirements that you want to make sure get addressed, please let me know very soon.<br></blockquote><div><br></div><div> Eli</div></div></div></div></div>