[PATCH] D146687: [TableGen] Format document
Wang Pengcheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 22 21:13:32 PDT 2023
pcwang-thead created this revision.
pcwang-thead added reviewers: Paul-C-Anagnostopoulos, nhaehnle, craig.topper, tra, jdoerfert.
Herald added a project: All.
pcwang-thead requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Add missing bang operators and reorder them in alphabetical order.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D146687
Files:
llvm/docs/TableGen/ProgRef.rst
Index: llvm/docs/TableGen/ProgRef.rst
===================================================================
--- llvm/docs/TableGen/ProgRef.rst
+++ llvm/docs/TableGen/ProgRef.rst
@@ -219,14 +219,15 @@
.. productionlist::
BangOperator: one of
- : !add !and !cast !con !dag
- : !div !empty !eq !filter !find
- : !foldl !foreach !ge !getdagop !gt
- : !head !if !interleave !isa !le
- : !listconcat !listremove !listsplat !logtwo !lt
- : !mul !ne !not !or !setdagop
- : !shl !size !sra !srl !strconcat
- : !sub !subst !substr !tail !xor
+ : !add !and !cast !con !dag
+ : !div !empty !eq !exists !filter
+ : !find !foldl !foreach !ge !getdagop
+ : !gt !head !if !interleave !isa
+ : !le !listconcat !listremove !listsplat !logtwo
+ : !lt !mul !ne !not !or
+ : !setdagop !shl !size !sra !srl
+ : !strconcat !sub !subst !substr !tail
+ : !tolower !toupper !xor
The ``!cond`` operator has a slightly different
syntax compared to other bang operators, so it is defined separately:
@@ -1630,17 +1631,15 @@
This operator produces 1 if the string, list, or DAG *a* is empty; 0 otherwise.
A dag is empty if it has no arguments; the operator does not count.
-``!tolower(``\ *a*\ ``)``
- This operator converts a string input *a* to lower case.
-
-``!toupper(``\ *a*\ ``)``
- This operator converts a string input *a* to upper case.
-
``!eq(`` *a*\ `,` *b*\ ``)``
This operator produces 1 if *a* is equal to *b*; 0 otherwise.
The arguments must be ``bit``, ``bits``, ``int``, ``string``, or
record values. Use ``!cast<string>`` to compare other types of objects.
+``!exists<``\ *type*\ ``>(``\ *name*\ ``)``
+ This operator produces 1 if a record of the given *type* whose name is *name*
+ exists; 0 otherwise. *name* should be of type *string*.
+
``!filter(``\ *var*\ ``,`` *list*\ ``,`` *predicate*\ ``)``
This operator creates a new ``list`` by filtering the elements in
@@ -1734,10 +1733,6 @@
This operator produces 1 if the type of *a* is a subtype of the given *type*; 0
otherwise.
-``!exists<``\ *type*\ ``>(``\ *name*\ ``)``
- This operator produces 1 if a record of the given *type* whose name is *name*
- exists; 0 otherwise. *name* should be of type *string*.
-
``!le(``\ *a*\ ``,`` *b*\ ``)``
This operator produces 1 if *a* is less than or equal to *b*; 0 otherwise.
The arguments must be ``bit``, ``bits``, ``int``, or ``string`` values.
@@ -1834,6 +1829,12 @@
This operator produces a new list with all the elements
of the list *a* except for the zeroth one. (See also ``!head``.)
+``!tolower(``\ *a*\ ``)``
+ This operator converts a string input *a* to lower case.
+
+``!toupper(``\ *a*\ ``)``
+ This operator converts a string input *a* to upper case.
+
``!xor(``\ *a*\ ``,`` *b*\ ``, ...)``
This operator does a bitwise EXCLUSIVE OR on *a*, *b*, etc., and produces
the result. A logical XOR can be performed if all the arguments are either
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146687.507589.patch
Type: text/x-patch
Size: 3601 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230323/bf552d92/attachment.bin>
More information about the llvm-commits
mailing list