[llvm-dev] TableGen trace facility

Paul C. Anagnostopoulos via llvm-dev llvm-dev at lists.llvm.org
Tue Aug 4 18:13:22 PDT 2020


I wasn't sure how to respond to John Byrd's post, since it wasn't addressed to me. So I've responded to Nicolai's.

I'm reasonably far along in the process of writing a new Programmer's Guide for TableGen. I will continue working on it and submit it for review. I expect to do some rewriting as a result.

John: Would you like me to respect a copyright on your documents linked below? I wouldn't take any text verbatim, but some of the ways of describing TableGen give me ideas.

----------------------------------------
Similarly, I've just survived writing most of a new backend, and TableGen's
documentation was unfortunate.

Chris's old original documentation was incomplete, but it was clear, and as
such the original sketches were superior to the current state of TableGen
documentation.

TableGen needs a proper programmer's guide, which differs from a
reference.  I actually started such a rewrite here, but I never tried
submitting it to Phabricator, because it wasn't clear to me who was
responsible for review:

https://github.com/johnwbyrd/llvm-mos/blob/master/llvm/docs/TableGen/index.rst

https://github.com/johnwbyrd/llvm-mos/blob/master/llvm/docs/TableGen/Deficiencies.rst


Most of the concepts behind TableGen are simple.  They should be
communicated simply, as per Chris's original documentation.  The things
that are not simple, were developed as special-purpose solutions to
practical problems.

The current documentation should be rewritten almost entirely from scratch,
with a strong focus on organizing the document in a reasonable reading
order, with a target audience of those who are working on LLVM backends.
Patching the documentation has gotten it to its current state of confusion,
and the process should be discontinued.

Likewise, I'll mention that if anyone wants to finance authorship of proper
TableGen and/or backend documentation, I'd be game to research it and write
it.
---

John Byrd



More information about the llvm-dev mailing list