[TableGen] Change Programmer's Reference to use "DAG argument" rather than "operand".

Differential Revision: https://reviews.llvm.org/D89624
This commit is contained in:
Paul C. Anagnostopoulos 2020-10-17 10:42:26 -04:00
parent f9172d3c7b
commit a90f742dd8
1 changed files with 12 additions and 10 deletions

View File

@ -289,7 +289,8 @@ wide range of records conveniently and compactly.
``dag`` ``dag``
This type represents a nestable directed acyclic graph (DAG) of nodes. This type represents a nestable directed acyclic graph (DAG) of nodes.
Each node has an operator and zero or more operands. A operand can be Each node has an *operator* and zero or more *arguments* (or *operands*).
An argument can be
another ``dag`` object, allowing an arbitrary tree of nodes and edges. another ``dag`` object, allowing an arbitrary tree of nodes and edges.
As an example, DAGs are used to represent code patterns for use by As an example, DAGs are used to represent code patterns for use by
the code generator instruction selection algorithms. See `Directed the code generator instruction selection algorithms. See `Directed
@ -1215,29 +1216,30 @@ Directed acyclic graphs (DAGs)
A directed acyclic graph can be represented directly in TableGen using the A directed acyclic graph can be represented directly in TableGen using the
``dag`` datatype. A DAG node consists of an operator and zero or more ``dag`` datatype. A DAG node consists of an operator and zero or more
operands. Each operand can be of any desired type. By using another DAG node arguments (or operands). Each argument can be of any desired type. By using
as an operand, an arbitrary graph of DAG nodes can be built. another DAG node as an argument, an arbitrary graph of DAG nodes can be
built.
The syntax of a ``dag`` instance is: The syntax of a ``dag`` instance is:
``(`` *operator* *operand1*\ ``,`` *operand2*\ ``,`` ... ``)`` ``(`` *operator* *argument1*\ ``,`` *argument2*\ ``,`` ... ``)``
The operator must be present and must be a record. There can be zero or more The operator must be present and must be a record. There can be zero or more
operands, separated by commas. The operator and operands can have three arguments, separated by commas. The operator and arguments can have three
formats. formats.
====================== ============================================= ====================== =============================================
Format Meaning Format Meaning
====================== ============================================= ====================== =============================================
*value* operand value *value* argument value
*value*\ ``:``\ *name* operand value and associated name *value*\ ``:``\ *name* argument value and associated name
*name* operand name with unset (uninitialized) value *name* argument name with unset (uninitialized) value
====================== ============================================= ====================== =============================================
The *value* can be any TableGen value. The *name*, if present, must be a The *value* can be any TableGen value. The *name*, if present, must be a
:token:`TokVarName`, which starts with a dollar sign (``$``). The purpose of :token:`TokVarName`, which starts with a dollar sign (``$``). The purpose of
a name is to tag an operator or operand in a DAG with a particular meaning, a name is to tag an operator or argument in a DAG with a particular meaning,
or to associate an operand in one DAG with a like-named operand in another or to associate an argument in one DAG with a like-named argument in another
DAG. DAG.
The following bang operators manipulate DAGs: ``!con``, ``!dag``, ``!foreach``, The following bang operators manipulate DAGs: ``!con``, ``!dag``, ``!foreach``,