summaryrefslogtreecommitdiffstats
path: root/llvm/docs/CommandGuide/tblgen.rst
Commit message (Collapse)AuthorAgeFilesLines
* [TableGen] Add a general-purpose JSON backend.Simon Tatham2018-07-111-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The aim of this backend is to output everything TableGen knows about the record set, similarly to the default -print-records backend. But where -print-records produces output in TableGen's input syntax (convenient for humans to read), this backend produces it as structured JSON data, which is convenient for loading into standard scripting languages such as Python, in order to extract information from the data set in an automated way. The output data contains a JSON representation of the variable definitions in output 'def' records, and a few pieces of metadata such as which of those definitions are tagged with the 'field' prefix and which defs are derived from which classes. It doesn't dump out absolutely every piece of knowledge it _could_ produce, such as type information and complicated arithmetic operator nodes in abstract superclasses; the main aim is to allow consumers of this JSON dump to essentially act as new backends, and backends don't generally need to depend on that kind of data. The new backend is implemented as an EmitJSON() function similar to all of llvm-tblgen's other EmitFoo functions, except that it lives in lib/TableGen instead of utils/TableGen on the basis that I'm expecting to add it to clang-tblgen too in a future patch. To test it, I've written a Python script that loads the JSON output and tests properties of it based on comments in the .td source - more or less like FileCheck, except that the CHECK: lines have Python expressions after them instead of textual pattern matches. Reviewers: nhaehnle Reviewed By: nhaehnle Subscribers: arichardson, labath, mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D46054 llvm-svn: 336771
* [docs] Update doc after split of -gen-intrinsic in r335407Fangrui Song2018-06-251-2/+6
| | | | llvm-svn: 335515
* [docs] Fix some linksSean Silva2014-04-071-1/+2
| | | | | | | | The TableGen docs have changed structure Patch by Tay Ray Chuan! llvm-svn: 205744
* Documentation: end option description with a periodDmitri Gribenko2013-04-271-1/+3
| | | | | | Patch by Dimitry Andric. llvm-svn: 180675
* Documentation for tblgen: formattingDmitri Gribenko2012-11-291-98/+41
| | | | llvm-svn: 168904
* [docs] Add ReST version of all the man pages.Daniel Dunbar2012-05-081-0/+186
- The POD versions are slated for execution, but are still around until llvm.org machinery is in place. llvm-svn: 156384
OpenPOWER on IntegriCloud