Hi folks, It took a while, but I finally have some bandwidth to look at this. I've been reading the two existing TableGen documents: http://llvm.org/docs/TableGenFundamentals.html http://llvm.org/docs/TableGen/LangRef.html the first is linked from the index, but LangRef is not (though it has some remains in the metadata). I'm wondering what's the relationship between them two. My plan is to have three docs: 1. What is TableGen; No info about language, back-ends but just a rough idea on when it's used (build-time), why it's used (meta-code), where (a list of back-ends with a simple description) and which additional cases could be covered by the current implementation. 2. TableGen back-ends; a list of all back-ends in use today, what are their purposes, why they differ and some inner secrets of their implementation. This page could also have a tutorial on how to create a new back-end, though this could be in a separate doc. 3. TableGen's language reference; Similar to most of fundamentals' and LangRef's contents, only focusing on syntax. Aditional pages: * Deficiencies and plans to overcome them * How to create a new back-end All pages should be inside the TableGen directory with its own index. I'll create the docs but won't link them from the main index, so that if I get it completely wrong, people won't get the wrong idea. Once it's better than the original, we can switch and continue. Does that sound like a good plan? cheers, --renato
On Tue, Mar 18, 2014 at 8:46 AM, Renato Golin <renato.golin at linaro.org> wrote:> Hi folks, > > It took a while, but I finally have some bandwidth to look at this. > > I've been reading the two existing TableGen documents: > > http://llvm.org/docs/TableGenFundamentals.html > http://llvm.org/docs/TableGen/LangRef.html > > the first is linked from the index, but LangRef is not (though it has > some remains in the metadata). I'm wondering what's the relationship > between them two. > > My plan is to have three docs: > > 1. What is TableGen; No info about language, back-ends but just a > rough idea on when it's used (build-time), why it's used (meta-code), > where (a list of back-ends with a simple description) and which > additional cases could be covered by the current implementation. > > 2. TableGen back-ends; a list of all back-ends in use today, what are > their purposes, why they differ and some inner secrets of their > implementation. This page could also have a tutorial on how to create > a new back-end, though this could be in a separate doc. > > 3. TableGen's language reference; Similar to most of fundamentals' and > LangRef's contents, only focusing on syntax. > > Aditional pages: > > * Deficiencies and plans to overcome them > * How to create a new back-end > > All pages should be inside the TableGen directory with its own index. > > I'll create the docs but won't link them from the main index, so that > if I get it completely wrong, people won't get the wrong idea. Once > it's better than the original, we can switch and continue. > > Does that sound like a good plan?Would it also make sense to include the clang usages of tablegen somewhere in #1, and then perhaps have #2.5 about clang usages (not volunteering you for that work btw)? Diagnostics and attributes make heavy use of tablegen in clang, for instance. ~Aaron
On 18 March 2014 12:54, Aaron Ballman <aaron at aaronballman.com> wrote:> Would it also make sense to include the clang usages of tablegen > somewhere in #1, and then perhaps have #2.5 about clang usages (not > volunteering you for that work btw)? Diagnostics and attributes make > heavy use of tablegen in clang, for instance.I meant to ask about this... Clang has a huge list of back-ends and they seem extremely similar to each other. Is there any reason why this is necessary, is this some deficiency in how the TableGen engine runs, or was it just the simplest way to add functionality? I agree it'd be good to have both LLVM and Clang usages. cheers, --renato
On 18 March 2014 12:54, Aaron Ballman <aaron at aaronballman.com> wrote:> On Tue, Mar 18, 2014 at 8:46 AM, Renato Golin <renato.golin at linaro.org> wrote: > Would it also make sense to include the clang usages of tablegen > somewhere in #1, and then perhaps have #2.5 about clang usages (not > volunteering you for that work btw)? Diagnostics and attributes make > heavy use of tablegen in clang, for instance.Aaron, I've added short descriptions for most LLVM back-ends, with the files they create, what's in them and who uses them. http://llvm.org/docs/TableGen/BackEnds.html I did this by scanning the build logs, inc files and greping them in the cpp/h files in lib/Target. There is no information at all on the intention of each back-end, but not all of them need it. Feel free to add more stuff to the LLVM, and if you know about the Clang part, please complete it. ;) Once that's reasonably complete, we should change the link in the index to TableGen/index.html and remove TableGenFundamentals.html. cheers, --renato
Sorry for the insanely late reply. This all looks great. Thanks for all the hard work! -- Sean Silva On Tue, Mar 18, 2014 at 8:46 AM, Renato Golin <renato.golin at linaro.org>wrote:> Hi folks, > > It took a while, but I finally have some bandwidth to look at this. > > I've been reading the two existing TableGen documents: > > http://llvm.org/docs/TableGenFundamentals.html > http://llvm.org/docs/TableGen/LangRef.html > > the first is linked from the index, but LangRef is not (though it has > some remains in the metadata). I'm wondering what's the relationship > between them two. > > My plan is to have three docs: > > 1. What is TableGen; No info about language, back-ends but just a > rough idea on when it's used (build-time), why it's used (meta-code), > where (a list of back-ends with a simple description) and which > additional cases could be covered by the current implementation. > > 2. TableGen back-ends; a list of all back-ends in use today, what are > their purposes, why they differ and some inner secrets of their > implementation. This page could also have a tutorial on how to create > a new back-end, though this could be in a separate doc. > > 3. TableGen's language reference; Similar to most of fundamentals' and > LangRef's contents, only focusing on syntax. > > Aditional pages: > > * Deficiencies and plans to overcome them > * How to create a new back-end > > All pages should be inside the TableGen directory with its own index. > > I'll create the docs but won't link them from the main index, so that > if I get it completely wrong, people won't get the wrong idea. Once > it's better than the original, we can switch and continue. > > Does that sound like a good plan? > > cheers, > --renato >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140331/ab0d6fa3/attachment.html>