diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2013-03-24 19:36:51 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2013-03-24 19:36:51 +0000 |
commit | 4717fd4c0faf454ff37f133709320d0cfec0da89 (patch) | |
tree | a0db547668fddbb2736d85d9cb0fc3fe2cacbc96 /docs/TableGen | |
parent | 9c22886a0105241b7bdc0f77a61bcae36e586a41 (diff) | |
download | external_llvm-4717fd4c0faf454ff37f133709320d0cfec0da89.zip external_llvm-4717fd4c0faf454ff37f133709320d0cfec0da89.tar.gz external_llvm-4717fd4c0faf454ff37f133709320d0cfec0da89.tar.bz2 |
Allow TableGen DAG arguments to be just a name.
DAG arguments can optionally be named:
(dag node, node:$name)
With this change, the node is also optional:
(dag node, node:$name, $name)
The missing node is treated as an UnsetInit, so the above is equivalent
to:
(dag node, node:$name, ?:$name)
This syntax is useful in output patterns where we currently require the
types of variables to be repeated:
def : Pat<(subc i32:$b, i32:$c), (SUBCCrr i32:$b, i32:$c)>;
This is preferable:
def : Pat<(subc i32:$b, i32:$c), (SUBCCrr $b, $c)>;
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177843 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/TableGen')
-rw-r--r-- | docs/TableGen/LangRef.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/TableGen/LangRef.rst b/docs/TableGen/LangRef.rst index c9e1efb..bd28a90 100644 --- a/docs/TableGen/LangRef.rst +++ b/docs/TableGen/LangRef.rst @@ -286,7 +286,7 @@ given values. .. productionlist:: SimpleValue: "(" `DagArg` `DagArgList` ")" DagArgList: `DagArg` ("," `DagArg`)* - DagArg: `Value` [":" `TokVarName`] + DagArg: `Value` [":" `TokVarName`] | `TokVarName` The initial :token:`DagArg` is called the "operator" of the dag. |