<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Dec 17, 2013 at 2:35 PM, 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:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>These questions are all related to the "Mapping High-Level Constructs to LLVM IR" document:</div>
<div><br></div>1. What are the \01 characters that are prefixed to dllimport Windows symbols for?  I have never seem them before so I am unsure if they are Clang/LLVM-specific?</div></blockquote><div><br></div><div>I expect it's some form of mangling that is recognized by the linker/loader, and I doubt it's LLVM-specific. You'll probably want to look on MSDN. btw, ObjC also uses something like this in its mangling.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>
<br></div><div>2. Anybody interested in explaining the zero cost exception handling mechanism using an existing example from the Mapping document?  This requires coding up a working example in LLVM IR or simplifying a compiler-generated example so that it becomes easy to read.</div>
</div></blockquote><div><br></div><div>Maybe try looking at the C++ abi spec? <<a href="http://mentorembedded.github.io/cxx-abi/abi-eh.html">http://mentorembedded.github.io/cxx-abi/abi-eh.html</a>> Alternatively, try looking at the source code of some existing frontends which use zero cost exception handling. As far as I understand it, there is a nontrivial runtime component needed for doing this.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">
<div><br></div><div>3. Anybody interested in explaining the various forms of constant expressions that exist in LLVM IR?</div></div></blockquote><div><br></div><div>I don't know very much about them, but they basically mirror the regular instructions. I don't think it's the best-thought-out part of the IR.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>4. Do any of you have a simple yet realistic example of an address-space cast?</div>
</div></blockquote><div><br></div><div>addrspacecast is relatively new and serves a pretty specialized purpose. Don't worry about it. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">
<div><br></div><div>5. Anybody interested in documenting the insertvalue and extractvalue instructions?  I haven't figured out how to get a structure into a register yet.</div></div></blockquote><div><br></div><div>I would expect a struct-typed `load` would do the trick.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>6. Anybody interested in documenting closures?</div>
</div></blockquote><div><br></div><div>The first thing you want to do is to survey the different approaches to closures and their respective pros/cons. That's a lot more important than giving a specific example of a particular approach. Again, looking at existing language frontends is probably the right approach.</div>
<div><br></div><div>-- Sean Silva</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">

<div><br></div><div>P.S. I sent off the document to the LLVM-commits list earlier today, but David Blaikie pointed out that the document should be in a state where it can be published before committing it, so that's what I am working on now.</div>

<div><br></div><div>For the time being, the document can be found at:</div><div><br></div><div><a href="https://github.com/archfrog/llvm-doc/blob/master/MappingHighLevelConstructsToLLVMIR.rst" target="_blank">https://github.com/archfrog/llvm-doc/blob/master/MappingHighLevelConstructsToLLVMIR.rst</a><br>

</div><div><br></div><div>As soon as it is ready to be published, it will be moved to the llvm/docs folder.</div><span class=""><font color="#888888"><div><br></div><div><br></div><div>-- Mikael</div><div><br></div></font></span></div>

<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>
<br></blockquote></div><br></div></div>