<div dir="ltr">Hi Mike,<div><br>That sounds awesome! I have no experience with implementing garbage collection at all, so I was wondering if I should do a call for writers. I am already overloaded by the prospect of having to learn and document zero-cost exception handling. As I said to Dirkjan at one point: I am probably not the best to write this document, except for the fact that I have all the time in the world.</div>
<div><br></div><div>If it is too much trouble writing up the notes in reST, you can always do it in whichever format you prefer and hand it over to me. I don't mind an occasional manual reformatting task to cool down my brain a bit ;-) This goes for anybody who reads this message and does not like the idea of having to learn reST just to submit notes or chapters to the final document. Submission in every one of these formats are accepted: Word over to PostScript over to PDF to ASCII to reST. And even more, if only I can find a way to read it and/or print it on a Windows box.</div>
<div><br></div><div>I meant to say this earlier on: Anybody with sufficient knowledge and/or experience is more than welcome to submit one or more chapters to be included in the final text. The basic idea is to document all those trivial and difficult things that go into making a front-end using LLVM. The scope of the document is strict LLVM IR, though, so there will be no mention of the C++ or C API. </div>
<div><br></div><div><br></div><div>-- Mikael</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/12/3 Michael Lewis <span dir="ltr"><<a href="mailto:don.apoch@gmail.com" target="_blank">don.apoch@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I have a significant chunk of notes from my experience with garbage collector integration with LLVM that I'd be happy to contribute to this effort.<div>
<br></div><div>The original notes live here: <a href="https://code.google.com/p/epoch-language/wiki/GarbageCollectionScheme" target="_blank">https://code.google.com/p/epoch-language/wiki/GarbageCollectionScheme</a></div>
<div><br></div><div>I imagine it would be preferred if that document was formatted and edited to match the existing efforts; I'll try and start converting it over in the next several days and submit a pull req when I've got a finished chapter.</div>
<div><br></div><div><br></div><div>I also have some miscellaneous notes from my other work on the Epoch language that might be worth including, I'll have to comb through them and see what I have that's not already covered in this writeup.</div>
<div><br></div><div><br></div><div><br></div><div> - Mike</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Dec 3, 2013 at 3:55 AM, Mikael Lyngvig <span dir="ltr"><<a href="mailto:mikael@lyngvig.org" target="_blank">mikael@lyngvig.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Philip,<div><br></div><div>Thanks for your great list of ideas for the document! </div><div><br></div>
<div>I don't really have a scope for the document beyond: If it something that requires mapping from high-level to LLVM IR, I think it should go into the document. I started out using C++ examples because many people know C++. I am personally mostly an advocate of statically checked languages but I don't see that as a reason to not include information of relevance to non-statically checked languages. As for garbage collection, well, more and more languages are making use of that so I think it is highly relevant to the document. I think all of the issues you have mentioned belong in this document, although I am not sure I'll be the best to write all of the document. I sort of hope that everybody will add their pieces so that we get a huge document that addresses nearly all the needs of somebody who is going to start on or be using LLVM IR.</div>
<div><br></div><div>You are all more than welcome to branch the document at GitHub, add your corrections and even entire chapters, and I'll be happy to merge it all back to a single document.</div><span><font color="#888888"><div>
<br></div><div>
<br></div><div>-- Mikael</div></font></span></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/12/2 Philip Reames <span dir="ltr"><<a href="mailto:listmail@philipreames.com" target="_blank">listmail@philipreames.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 11/28/13 6:07 PM, Mikael Lyngvig wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
It will probably take a few weeks or a month before the "Mapping High-Level Constructs to LLVM IR" document is ready for prime time. Until then, you can review and study it at this URL:<br>
<br>
<a href="https://github.com/archfrog/llvm-doc/blob/master/MappingHighLevelConstructsToLLVMIR.rst" target="_blank">https://github.com/archfrog/<u></u>llvm-doc/blob/master/<u></u>MappingHighLevelConstructsToLL<u></u>VMIR.rst</a><br>
<br>
<br>
Please notice that I specifically do not advocate reviewing the document for a week or two. But feel free to give me any feedback, comments, and criticism that you may have to share.<br>
<br>
Once the document has been finalized and comitted to LLVM, I'll delete the repository at Github - or, perhaps even better, simply make a small page that refers to the official copy in LLVM.<br>
</blockquote>
Just want to comment that I strongly approve of your intended goal. Depending on how my time shakes out over the next few weeks, I may even take some time to write up my own experiences. I particularly like how you have chosen to layout various alternative implementations rather than choosing "one true implementation".<br>
<br>
A few areas you haven't covered and might want to consider:<br>
- How to enable debug information? (Line and Function, Variable)<br>
- How to interface with a garbage collector? (link to existing docs)<br>
- How to express a custom calling convention? (link to existing docs)<br>
- Representing constructors, destructors, finalization<br>
- How to examine the stack at runtime? How to modify it? (i.e. reflection, interjection)<br>
- Representing subtyping checks (with full alias info), TBAA, struct-path TBAA<br>
- How to exploit inlining (external, vs within LLVM)?<br>
- How to express array bounds checks for best optimization?<br>
- How to express null pointer checks?<br>
- How to express domain specific optimizations? (i.e. lock elision, or matrix math simplification) (link to existing docs)<br>
- How to optimize call dispatch or field access in dynamic languages? (ref new patchpoint intrinsics for inline call caching and field access caching)<br>
<br>
Out of curiosity, what do you see as the intended scope of this document? I see there being three main categories of languages: pure static compilation, "managed languages" (i.e. compile to bytecode + runtime system), and pure dynamic languages*. I could see different features and focus for a document geared at each of these camps. For example, the first two are going to be interested in static optimization, whereas the last two are going to be interested in speculative optimization. What are your thoughts on this?<br>
<br>
* Note: Let's not get too caught up in the categorization. It's not really important where exactly the lines are drawn.<br>
<br>
Philip<br>
______________________________<u></u>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">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/<u></u>mailman/listinfo/llvmdev</a><br>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">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></blockquote></div><br></div>
</blockquote></div><br></div>