diff options
Diffstat (limited to 'llvm/docs/TableGen')
-rw-r--r-- | llvm/docs/TableGen/LangIntro.rst | 18 | ||||
-rw-r--r-- | llvm/docs/TableGen/LangRef.rst | 2 |
2 files changed, 19 insertions, 1 deletions
diff --git a/llvm/docs/TableGen/LangIntro.rst b/llvm/docs/TableGen/LangIntro.rst index c4a7a34c025..a4b198b8958 100644 --- a/llvm/docs/TableGen/LangIntro.rst +++ b/llvm/docs/TableGen/LangIntro.rst @@ -165,6 +165,24 @@ supported include: remaining elements in the list may be arbitrary other values, including nested ```dag``' values. +``!con(a, b, ...)`` + Concatenate two or more DAG nodes. Their operations must equal. + + Example: !con((op a1:$name1, a2:$name2), (op b1:$name3)) results in + the DAG node (op a1:$name1, a2:$name2, b1:$name3). + +``!dag(op, children, names)`` + Generate a DAG node programmatically. 'children' and 'names' must be lists + of equal length or unset ('?'). 'names' must be a 'list<string>'. + + Due to limitations of the type system, 'children' must be a list of items + of a common type. In practice, this means that they should either have the + same type or be records with a common superclass. Mixing dag and non-dag + items is not possible. + + Example: !dag(op, [a1, a2], ["name1", "name2"]) results in + (op a1:$name1, a2:$name2). + ``!listconcat(a, b, ...)`` A list value that is the result of concatenating the 'a' and 'b' lists. The lists must have the same element type. diff --git a/llvm/docs/TableGen/LangRef.rst b/llvm/docs/TableGen/LangRef.rst index 99bcad757fc..595505001d5 100644 --- a/llvm/docs/TableGen/LangRef.rst +++ b/llvm/docs/TableGen/LangRef.rst @@ -99,7 +99,7 @@ wide variety of meanings: :!add !shl !sra !srl !and :!or !empty !subst !foreach !strconcat :!cast !listconcat !size !foldl - :!isa + :!isa !dag Syntax |