1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/docs/CommandGuide/tblgen.rst
James Henderson f75dcd7d67 [docs][tools] Add missing "program" tags to rst files
Sphinx allows for definitions of command-line options using
`.. option <name>` and references to those options via `:option:<name>`.
However, it looks like there is no scoping of these options by default,
meaning that links can end up pointing to incorrect documents. See for
example the llvm-mca document, which contains references to -o that,
prior to this patch, pointed to a different document. What's worse is
that these links appear to be non-deterministic in which one is picked
(on my machine, some references end up pointing to opt, whereas on the
live docs, they point to llvm-dwarfdump, for example).

The fix is to add the .. program <name> tag. This essentially namespaces
the options (definitions and references) to the named program, ensuring
that the links are kept correct.

Reviwed by: andreadb

Differential Revision: https://reviews.llvm.org/D63873

llvm-svn: 364538
2019-06-27 13:24:46 +00:00

148 lines
3.0 KiB
ReStructuredText

tblgen - Target Description To C++ Code Generator
=================================================
.. program:: tblgen
SYNOPSIS
--------
:program:`tblgen` [*options*] [*filename*]
DESCRIPTION
-----------
:program:`tblgen` translates from target description (``.td``) files into C++
code that can be included in the definition of an LLVM target library. Most
users of LLVM will not need to use this program. It is only for assisting with
writing an LLVM target backend.
The input and output of :program:`tblgen` is beyond the scope of this short
introduction; please see the :doc:`introduction to TableGen
<../TableGen/index>`.
The *filename* argument specifies the name of a Target Description (``.td``)
file to read as input.
OPTIONS
-------
.. program:: tblgen
.. option:: -help
Print a summary of command line options.
.. option:: -o filename
Specify the output file name. If ``filename`` is ``-``, then
:program:`tblgen` sends its output to standard output.
.. option:: -I directory
Specify where to find other target description files for inclusion. The
``directory`` value should be a full or partial path to a directory that
contains target description files.
.. option:: -asmparsernum N
Make -gen-asm-parser emit assembly writer number ``N``.
.. option:: -asmwriternum N
Make -gen-asm-writer emit assembly writer number ``N``.
.. option:: -class className
Print the enumeration list for this class.
.. option:: -print-records
Print all records to standard output (default).
.. option:: -dump-json
Print a JSON representation of all records, suitable for further
automated processing.
.. option:: -print-enums
Print enumeration values for a class.
.. option:: -print-sets
Print expanded sets for testing DAG exprs.
.. option:: -gen-emitter
Generate machine code emitter.
.. option:: -gen-register-info
Generate registers and register classes info.
.. option:: -gen-instr-info
Generate instruction descriptions.
.. option:: -gen-asm-writer
Generate the assembly writer.
.. option:: -gen-disassembler
Generate disassembler.
.. option:: -gen-pseudo-lowering
Generate pseudo instruction lowering.
.. option:: -gen-dag-isel
Generate a DAG (Directed Acycle Graph) instruction selector.
.. option:: -gen-asm-matcher
Generate assembly instruction matcher.
.. option:: -gen-dfa-packetizer
Generate DFA Packetizer for VLIW targets.
.. option:: -gen-fast-isel
Generate a "fast" instruction selector.
.. option:: -gen-subtarget
Generate subtarget enumerations.
.. option:: -gen-intrinsic-enums
Generate intrinsic enums.
.. option:: -gen-intrinsic-impl
Generate intrinsic implementation.
.. option:: -gen-tgt-intrinsic
Generate target intrinsic information.
.. option:: -gen-enhanced-disassembly-info
Generate enhanced disassembly info.
.. option:: -gen-exegesis
Generate llvm-exegesis tables.
.. option:: -version
Show the version number of this program.
EXIT STATUS
-----------
If :program:`tblgen` succeeds, it will exit with 0. Otherwise, if an error
occurs, it will exit with a non-zero value.