<div class="gmail_quote">2009/7/16 Daniel Dunbar <span dir="ltr"><<a href="mailto:daniel@zuster.org">daniel@zuster.org</a>></span><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div class="im">On Thu, Jul 16, 2009 at 10:04 AM, Aaron<br>Gray<<a href="mailto:aaronngray.lists@googlemail.com">aaronngray.lists@googlemail.com</a>> wrote:<br>> 2009/7/16 Chris Lattner <<a href="mailto:clattner@apple.com">clattner@apple.com</a>><br>

</div>
<div class="im">>> Whats Daniels approach, does he have any online documentation or code, do<br>>> you have an email address so I may talk to him.<br>>><br>>> Take a look at how asmprinters work<br>

>> in include/llvm/Target/TargetRegistry.h .  If you have specific questions,<br>>> llvmdev is a great place to ask them.<br>><br>><br>><br>> Okay I will take a look.<br><br></div>I don't have any documentation yet other than the doxygen comments<br>

(some will be added at least before 2.6), but the basic idea is that<br>there is one global Target instance per target, and targets register<br>optional components via initialization functions (which can be called<br>via static constructors, or explicitly by the client).<br>

<br>Clients of the targets simple request a Target, which will always be<br>linked in, and look to see if the optional functionality is present<br>(i.e. was linked in).<br></blockquote>
<div> </div>
<div>Okay so features must be linked in rather than availiable from dynamicly linked libraries.</div>
<div> </div>
<div>This does not really help.</div>
<div> </div>
<div>Sorry,</div>
<div> </div>
<div>Aaron</div>
<div> </div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><span id=""></span><br> - Daniel<br>
<div>
<div></div>
<div class="h5"><br>> Aaron<br>><br>>><br>>> -Chris<br>>><br>>><br>>> Aaron<br>>><br>>> 2009/7/16 Chris Lattner <<a href="mailto:clattner@apple.com">clattner@apple.com</a>><br>

>>><br>>>> On Jul 15, 2009, at 9:01 AM, Aaron Gray wrote:<br>>>>><br>>>>> Chris,<br>>>>><br>>>>> If you/we do not like this code, then the alternatives are :-<br>

>>>> 1) Leave as is, which I would not suggest.<br>>>>> 2) Revert to using MachineCodeEmitter like mechanics with virtual<br>>>>> extend() method to allow rebuffering with ObjectCodeEmitter providing the<br>

>>>> memory management.<br>>>>> 3) Don't really know of any other alternatives :)<br>>>>><br>>>>> 2 maybe the best compromise option. Its easy to code, removes templating<br>

>>>> from the CodeEmitters, and is virtually transparent to our other DOE work.<br>>>>> The only thing it does not write via a BinaryObject object, so we loose that<br>>>>> functionality.<br>

>>><br>>>> Hi Aaron,<br>>>><br>>>> I'm sorry for not getting back to you sooner.  I work fairly LIFO and the<br>>>> craziness that has happened since your emails have distracted me.<br>

>>><br>>>> One problem with this patch is that (for example) X86TargetMachine.cpp<br>>>> refers to the "createX86ObjectCodeEmitterPass" symbol, which forces the code<br>>>> emitter to object code emitter to be linked into the X86 target module.<br>

>>>  There is still no way to create a JIT without two copies of the code<br>>>> emitter template.  I believe that aligning this work with Daniels work to<br>>>> make the targets more modular would be straight forward.  Are you willing to<br>

>>> do this?<br>>>><br>>>> This patch keeps around the templates, which I really don't like.<br>>>>  However, this is better than what is in mainline, so it seems like a<br>>>> reasonable step to me if you really really want to do this.  However, I<br>

>>> still don't understand why you're unwilling to make the CodeEmitter be a<br>>>> virtual base class instead of a template!<br>>>><br>>>> -Chris<br>>><br>>><br>><br>

><br></div></div>> _______________________________________________<br>> LLVM Developers mailing list<br>> <a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu/" target="_blank">http://llvm.cs.uiuc.edu</a><br>

> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>><br>><br><br>_______________________________________________<br>LLVM Developers mailing list<br>

<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu/" target="_blank">http://llvm.cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>

</blockquote></div><br>