From 91a5848cab499b280bbab58b4896af4a20f826fc Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Sun, 24 Mar 2013 19:36:51 +0000 Subject: 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)>; llvm-svn: 177843 --- llvm/docs/TableGen/LangRef.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/docs') diff --git a/llvm/docs/TableGen/LangRef.rst b/llvm/docs/TableGen/LangRef.rst index c9e1efba03f..bd28a9031d7 100644 --- a/llvm/docs/TableGen/LangRef.rst +++ b/llvm/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. -- cgit v1.2.3