Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions llvm/docs/TableGen/ProgRef.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Classes and concrete records have a unique *name*, either chosen by
the programmer or generated by TableGen. Associated with that name
is a list of *fields* with values and an optional list of *parent classes*
(sometimes called base or super classes). The fields are the primary data that
backends will process. Note that TableGen assigns no meanings to fields; the
backends will process. Note that TableGen assigns no meaning to fields; the
meanings are entirely up to the backends and the programs that incorporate
the output of those backends.

Expand Down Expand Up @@ -243,7 +243,7 @@ Include files
-------------

TableGen has an include mechanism. The content of the included file
lexically replaces the ``include`` directive and is then parsed as if it was
lexically replaces the ``include`` directive and is then parsed as if it were
originally in the main file.

.. productionlist::
Expand Down Expand Up @@ -670,17 +670,17 @@ name of a multiclass.
The argument values can be specified in two forms:

* Positional argument (``value``). The value is assigned to the argument in the
corresponding position. For ``Foo<a0, a1>``, ``a0`` will be assigned to first
argument and ``a1`` will be assigned to second argument.
corresponding position. For ``Foo<a0, a1>``, ``a0`` will be assigned to the first
argument and ``a1`` will be assigned to the second argument.
* Named argument (``name=value``). The value is assigned to the argument with
the specified name. For ``Foo<a=a0, b=a1>``, ``a0`` will be assigned to the
argument with name ``a`` and ``a1`` will be assigned to the argument with
name ``b``.

Required arguments can also be specified as named argument.
Required arguments can also be specified as a named argument.

Note that the argument can only be specified once regardless of the way (named
or positional) to specify and positional arguments should be put before named
or positional) to specify and positional arguments should precede named
arguments.

.. productionlist::
Expand Down Expand Up @@ -817,7 +817,7 @@ type. It provides a single field, ``Value``, which holds a 3-bit number. Its
template argument, ``val``, is used to set the ``Value`` field. Each of the
eight records is defined with ``FPFormat`` as its parent class. The
enumeration value is passed in angle brackets as the template argument. Each
record will inherent the ``Value`` field with the appropriate enumeration
record will inherit the ``Value`` field with the appropriate enumeration
value.

Here is a more complex example of classes with template arguments. First, we
Expand Down Expand Up @@ -1308,7 +1308,7 @@ with ``F0``, ``F1``, ``F2``, and ``F3``.
-------------------------------------

A ``dump`` statement prints the input string to standard error
output. It is intended for debugging purpose.
output. It is intended for debugging purposes.

* At top level, the message is printed immediately.

Expand Down Expand Up @@ -1727,7 +1727,7 @@ and non-0 as true.

``!div(``\ *a*\ ``,`` *b*\ ``)``
This operator performs signed division of *a* by *b*, and produces the quotient.
Division by 0 produces an error. Division of INT64_MIN by -1 produces an error.
Division by 0 produces an error. Division of ``INT64_MIN`` by -1 produces an error.

``!empty(``\ *a*\ ``)``
This operator produces 1 if the string, list, or DAG *a* is empty; 0 otherwise.
Expand Down Expand Up @@ -1914,7 +1914,7 @@ and non-0 as true.
``!or(``\ *a*\ ``,`` *b*\ ``, ...)``
This operator does a bitwise OR on *a*, *b*, etc., and produces the
result. A logical OR can be performed if all the arguments are either
0 or 1. This operator is short-circuit to -1 (all ones) the left-most
0 or 1. This operator is short-circuit to -1 (all ones) when the left-most
operand is -1.

``!range([``\ *start*\ ``,]`` *end*\ ``[,``\ *step*\ ``])``
Expand All @@ -1937,7 +1937,7 @@ and non-0 as true.
Equivalent to ``!range(0, !size(list))``.

``!repr(``\ *value*\ ``)``
Represents *value* as a string. String format for the value is not
Represents *value* as a string. The string format for the value is not
guaranteed to be stable. Intended for debugging purposes only.

``!setdagarg(``\ *dag*\ ``,``\ *key*\ ``,``\ *arg*\ ``)``
Expand Down
Loading