[llvm] [TableGen] Add a !listflatten operator to TableGen (PR #109346)

Rahul Joshi via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 20 06:20:47 PDT 2024


================
@@ -1832,6 +1832,11 @@ and non-0 as true.
     This operator concatenates the list arguments *list1*, *list2*, etc., and
     produces the resulting list. The lists must have the same element type.
 
+``!listflatten(``\ *list*\ ``)``
+    This operator flattens a list of lists *list* and produces a list with all
+    elements of the constituent lists concatenated. If *list* is of type
+    ``list<list<X>>`` the resulting list is of type ``list<X>``.
----------------
jurahul wrote:

I need to update this for the no-op case as well.

https://github.com/llvm/llvm-project/pull/109346


More information about the llvm-commits mailing list