<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">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></body></html>