<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Dec 10, 2013 at 6:38 AM, Mihail Popa <span dir="ltr"><<a href="mailto:mihail.popa@gmail.com" target="_blank">mihail.popa@gmail.com</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"><font face="arial, helvetica, sans-serif">Hello everyone.</font><div>
<font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">I apologise for the sizeable delay in sending this.</font></div>
<div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">The BoF was attended by quite a lot of people and there was general agreement that tablegen needs improvement in some shape of form. However there are many divergent ideas as to how to go about this improvement. Of course this is completely natural, tablegen being a versatile tool used by many different people for many different purposes.</font></div>

<div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">Part of the attendees focused on missing features. Feature requests include:</font></div><div><font face="arial, helvetica, sans-serif"><br>

</font></div><div><span><font face="arial, helvetica, sans-serif"><ol style="margin-top:0pt;margin-bottom:0pt"><li dir="ltr" style="vertical-align:baseline;list-style-type:decimal;background-color:transparent">
<p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="background-color:transparent;vertical-align:baseline;white-space:pre-wrap">support for vector literals</span></p></li><li dir="ltr" style="vertical-align:baseline;list-style-type:decimal;background-color:transparent">

<p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="background-color:transparent;vertical-align:baseline;white-space:pre-wrap">support for instruction/patterns with multiple outputs</span></p>

</li><li dir="ltr" style="vertical-align:baseline;list-style-type:decimal;background-color:transparent"><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="background-color:transparent;vertical-align:baseline;white-space:pre-wrap">support complex transforms where types of input and output differ</span></p>

</li><li dir="ltr" style="vertical-align:baseline;list-style-type:decimal;background-color:transparent"><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="background-color:transparent;vertical-align:baseline;white-space:pre-wrap">remove need of magic vars in complex patterns</span></p>

</li><li dir="ltr" style="vertical-align:baseline;list-style-type:decimal;background-color:transparent"><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="background-color:transparent;vertical-align:baseline;white-space:pre-wrap">improve support for permutations of operands</span></p>

</li><li dir="ltr" style="vertical-align:baseline;list-style-type:decimal;background-color:transparent"><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="background-color:transparent;vertical-align:baseline;white-space:pre-wrap">ability to implement DAG combines in tablegen</span></p>

</li><li dir="ltr" style="vertical-align:baseline;list-style-type:decimal;background-color:transparent"><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="background-color:transparent;vertical-align:baseline;white-space:pre-wrap">auto detect/infer constraints</span></p>

</li><li dir="ltr" style="vertical-align:baseline;list-style-type:decimal;background-color:transparent"><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="background-color:transparent;vertical-align:baseline;white-space:pre-wrap">add support or missing patterns and/or selectable insts</span></p>

</li><li dir="ltr" style="vertical-align:baseline;list-style-type:decimal;background-color:transparent"><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="background-color:transparent;vertical-align:baseline;white-space:pre-wrap">extend tablegen unit tests to go beyond simple syntactic constructs</span></p>

</li><li dir="ltr" style="vertical-align:baseline;list-style-type:decimal;background-color:transparent"><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="background-color:transparent;vertical-align:baseline;white-space:pre-wrap">automatically add MCDesc fields</span></p>

</li><li dir="ltr" style="vertical-align:baseline;list-style-type:decimal;background-color:transparent"><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="background-color:transparent;vertical-align:baseline;white-space:pre-wrap">improve debug-ability</span></p>

</li><li dir="ltr" style="vertical-align:baseline;list-style-type:decimal;background-color:transparent"><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="background-color:transparent;vertical-align:baseline;white-space:pre-wrap">improve error reporting</span></p>

</li><li dir="ltr" style="vertical-align:baseline;list-style-type:decimal;background-color:transparent"><span style="background-color:transparent;vertical-align:baseline;white-space:pre-wrap">auto-inversion for predicates </span></li>

</ol><div><font color="#000000"><span style="white-space:pre-wrap"><br></span></font></div><div><font color="#000000"><span style="white-space:pre-wrap">Someone in the room (I forgot the name, I'm sorry) said something which I found quite interesting, namely that he current state of tablegen is due to its quite rapid growth through the past years. Then point was raised that, probably, we will not be fixing anything by simply bolting on top further functionality.</span></font></div>

<div><font color="#000000"><span style="white-space:pre-wrap"><br></span></font></div><div><font color="#000000"><span style="white-space:pre-wrap">My desire was to steer the discussion towards how to design tablegen as a proper domain specific language targeted at compiler construction. I think it was generally agreed that this is a distant goal worth pursuing and that the first steps is to first document what tablegen currently has.</span></font></div>

<div><font color="#000000"><span style="white-space:pre-wrap"><br></span></font></div><div><font color="#000000"><span style="white-space:pre-wrap">The root cause for lack of documentation was identified as:</span></font></div>

<div><font color="#000000"><span style="white-space:pre-wrap"><br></span></font></div><div><i><span style="white-space:pre-wrap;background-color:transparent">"People don't feel </span><span style="line-height:1.15;white-space:pre-wrap;background-color:transparent">authoritative enough to go ahead and writ</span><font color="#000000"><span style="line-height:17px;white-space:pre-wrap">e docs. Many community members are knowledgeable in small pieces, but don’t feel are qualified to author documentation".</span></font></i></div>
</font></span></div></div></blockquote><div><br></div><div>The say I got <a href="http://llvm.org/docs/TableGen/LangRef.html">http://llvm.org/docs/TableGen/LangRef.html</a> up and running is by going through the source code of the parser and lexer line by line. It still has a long way to go, because it only barely talks about the semantics of the constructs; it's mostly just a grammar at the moment.</div>
<div><br></div><div>I was only able to do that line-by-line walkthrough after getting some familiarity with the code. I urge all people who have some familiarity (not even very much) with particular parts of tablegen, in particular the emitters in utils/TableGen, to try to do a "sprint" walking through the code to build up a skeleton description, like I did for docs/TableGen/LangRef.rst. <<a href="http://llvm.org/docs/SphinxQuickstartTemplate.html">http://llvm.org/docs/SphinxQuickstartTemplate.html</a>> has everything you need to get up and running with writing docs.</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><span><font face="arial, helvetica, sans-serif">
<div><br></div><div>It was generally agreed that a way to solve this is to create a shared repository where everyone can commit any pieces of information they might have. We hope it will grow to a proper documentation for tablegen's features. Once gotten there we would be in a much better position to decide how to further develop this tool.</div>
</font></span></div></div></blockquote><div><br></div><div>Once we have some initial "skeletons" for describing various parts, hopefully people will be able to find a place to describe whatever small piece of "local" knowledge of TableGen that that they may have, to help piece together the "global" picture.</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><span><font face="arial, helvetica, sans-serif">
<div><br></div><div>Renato Golin was kind enough to offer to work on the documentation project. I myself intend to get involved too.</div><div><br></div><div>Best regards,</div><div>Mihai</div></font></span></div></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>