<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16809" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY 
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space" 
bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi Evan,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Providing Nick's Cygwin patch works then I am upto 
doing Cygwin testing.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I ran the GVStub removal patch on Linux X86 and it 
passes 'make check' fine.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>The only thing I was not sure of was JITEmitter.h's 
#includes, they may need some attention.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Also the other thing was should this all be done by 
using a second MachineCodeEmitter in class JIT to provide the GV functionality. 
If you think that would be a better method I could provide a patch to do 
that.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Anyway see what you think.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Cheers,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Aaron</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=echeng@apple.com href="mailto:echeng@apple.com">Evan Cheng</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=llvmdev@cs.uiuc.edu 
  href="mailto:llvmdev@cs.uiuc.edu">LLVM Developers Mailing List</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, March 02, 2009 5:19 
PM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [LLVMdev] Removal of GVStub 
  methods from MachineCodeEmitter,ELFWriter, and MachOWriter</DIV>
  <DIV><BR></DIV>I'll look at these. First scan looks good. Are you able to run 
  some tests?
  <DIV><BR></DIV>
  <DIV>Evan</DIV>
  <DIV><BR>
  <DIV>
  <DIV>On Feb 28, 2009, at 9:36 AM, Aaron Gray wrote:</DIV><BR 
  class=Apple-interchange-newline>
  <BLOCKQUOTE type="cite">
    <DIV class=gmail_quote>
    <DIV>I have done a possible cleanup patch for the MachineCodeEmitter, 
    ELFWriter, and MachOWriter classes. It removes the two 
    startGVStub(), and finishGVStub() JIT specific methods.</DIV>
    <DIV> </DIV>
    <DIV>You may remember the following comments :-</DIV>
    <DIV> </DIV>
    <DIV>    /// JIT SPECIFIC FUNCTIONS - DO NOT IMPLEMENT THESE 
    HERE!</DIV>
    <DIV> </DIV>
    <DIV>To get rid of these easily turned out to be a semicomplex 
    modification because of the JITInfo classes dependance on MachineCodeEmitter 
    and the GVStub methods. Also the fact that JITEmitter is hidden and quite a 
    large class in a .cpp file.</DIV>
    <DIV> </DIV>
    <DIV>At first I did this by introducing a JITCodeEmitter class between 
    MachineCodeEmitter and the (un)hidden JITEmitter. But this lead to more 
    dependancies and they lead on to more.</DIV>
    <DIV> </DIV>
    <DIV>I have now made class header for JITEmitter putting it in the llvm 
    namespace. There were several other header dependancies as a result and 
    lib/ExecutionEngine/JIT/JIT.h and lib/ExecutionEngine/JIT/JITDwarfEmitter.h 
    required moving to the include/llvm/ExecutionEngine/JIT directory as a 
    result to make them visible to JIT.h and dependants.</DIV>
    <DIV> </DIV>
    <DIV>    * create JITEmitter.h and made class JITEmitter 
    visible in llvm namespace</DIV>
    <DIV>    * moved lib/ExecutionEngine/JIT/JIT.h to 
    include/llvm/ExecutionEngine/JIT</DIV>
    <DIV>    * moved lib/ExecutionEngine/JIT/JITDwarfEmitter.h to 
    include/llvm/ExecutionEngine/JIT</DIV>
    <DIV>    * removed JIT specific startGVStub()'s functions and 
    finishGVStub() from MachineCodeEmitter, ELFWriter, and  MachOWriter 
    classes.</DIV>
    <DIV>
    <DIV>    * modified 
    include/llvm/Target/TargetJITInfo.h to use JITEmitter rather than 
    MachineCodeEmitter.</DIV>    * modified :-</DIV>
    <DIV>        - 
    lib/Target/PowerPC/PPCJITInfo.h<BR>        
    - 
    lib/Target/PowerPC/PPCJITInfo.cpp<BR>        
    - lib/Target/ARM/ARMJITInfo.cpp<BR>        
    - lib/Target/ARM/ARMJITInfo.h<BR>        
    - 
    lib/Target/Alpha/AlphaJITInfo.cpp<BR>        
    - 
    lib/Target/Alpha/AlphaJITInfo.h<BR>        
    - lib/Target/X86/X86JITInfo.h<BR>        
    - lib/Target/X86/X86JITInfo.cpp </DIV>
    <DIV>        to use JITEmitter 
    rather than MachineCodeEmitter.</DIV>
    <DIV>    * renamed multiple MCE's to JE's</DIV>
    <DIV>    * removed unneed getCodeEmitter()'s in 
    JITEmitter.cpp class JIT.</DIV>
    <DIV>    * modified lib/ExecutionEngine/JIT/TargetSelect.cpp 
    to use include/llvm/ExecutionEngine/JIT/JIT.h include file </DIV>
    <DIV>
    <DIV>    * modified lib/ExecutionEngine/JIT/Intercept.cpp to 
    use include/llvm/ExecutionEngine/JIT/JIT.h include file </DIV></DIV>
    <DIV> </DIV>
    <DIV>I was wondering whether it would be better to call the JITEmitter 
    class JITCodeEmitter and have JCE's instead of JE's.</DIV>
    <DIV> </DIV>
    <DIV>I dont think there are any other issues I missed or need tidying 
    up either. I removed some getCodeEmitter and accompanying redundant 
    assertions from JITEmitter.cpp JIT class methods, AFAICT this is only 
    cruft.</DIV>
    <DIV> </DIV>
    <DIV>Anyway here's the patch :-</DIV>
    <DIV> </DIV>
    <DIV>    <A 
    href="http://www.aarongray.org/LLVM/patches/llvm-JITEmitter.patch" 
    target=_blank>http://www.aarongray.org/LLVM/patches/llvm-JITEmitter.patch</A></DIV>
    <DIV> </DIV>
    <DIV>There was another way I considered that was having a second MCE for 
    writting global data and stubs to. I believe this would not 
    require making JITEmitter and friend visible, but may introduce more runtime 
    overhead.</DIV>
    <DIV> </DIV>
    <DIV>If you could have a look at this patch and see what you think.</DIV>
    <DIV> </DIV>
    <DIV>If things go well I will be working on patches for the ELFWriter and an 
    accompanying COFFWriter. I know I promised this before but unfortunate 
    circumstances stopped me working on it back then.</DIV>
    <DIV> </DIV>
    <DIV>Hopefully I can do some ground work and incremental patches to get some 
    code generated then look at the ABI issues on Windows.</DIV>
    <DIV> </DIV>
    <DIV>Cheers,</DIV>
    <DIV> </DIV><FONT color=#888888>
    <DIV>Aaron</DIV>
    <DIV> </DIV></FONT></DIV><BR>_______________________________________________<BR>LLVM 
    Developers mailing list<BR>LLVMdev@cs.uiuc.edu 
            <A 
    href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</A><BR><A 
    href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</A><BR></BLOCKQUOTE></DIV><BR></DIV>
  <P>
  <HR>

  <P></P>_______________________________________________<BR>LLVM Developers 
  mailing 
  list<BR>LLVMdev@cs.uiuc.edu         
  http://llvm.cs.uiuc.edu<BR>http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev<BR></BLOCKQUOTE></BODY></HTML>