1/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2|* *|
3|* Op Declarations *|
4|* *|
5|* Automatically generated file, do not edit! *|
6|* From: ArmSMEOps.td *|
7|* *|
8\*===----------------------------------------------------------------------===*/
9
10namespace mlir::arm_sme {
11
12/// Copies an SME tile value
13/// Copies an SME "virtual tile" value to a new SSA value. This operation is
14/// primarily intended to be used to normalize the IR prior to tile allocation.
15///
16/// Example:
17///
18/// ```mlir
19/// %copy = arm_sme.copy_tile %tile : vector<[4]x[4]xf32>
20/// ```
21class CopyTileOp;
22
23} // namespace mlir::arm_sme
24namespace mlir::arm_sme {
25
26/// Extract 1-D scalable vector from slice of 2-D tile
27/// Extracts a 1-D scalable slice from a 2-D scalable tile at the given index.
28/// A tile slice is a 1-D vector of horizontally or vertically contiguous
29/// elements within a ZA tile.
30///
31/// An optional tile slice layout attribute specifies whether the tile slice is
32/// horizontal (default) or vertical.
33///
34/// Example 1: Extract `vector<[16]xi8>` from tile horizontally at the given index.
35/// ```mlir
36/// %slice = arm_sme.extract_tile_slice %tile[%tile_slice_index] : vector<[16]xi8> from vector<[16]x[16]xi8>
37/// ```
38///
39/// Example 2: Extract `vector<[2]xf64>` from tile vertically at the given index.
40/// ```mlir
41/// %slice = arm_sme.extract_tile_slice %tile[%tile_slice_index] layout<vertical> : vector<[2]xf64> from vector<[2]x[2]xf64>
42/// ```
43class ExtractTileSliceOp;
44
45} // namespace mlir::arm_sme
46namespace mlir::arm_sme {
47
48/// Floating-point sum of 2 outer products and accumulate
49/// This operation represents a sum of 2 widened outer products. It takes 2 1-D
50/// scalable vectors as input and a 2-D scalable vector (ZA tile) as output.
51///
52/// For example (fp16 to fp32):
53///
54/// ```mlir
55/// %result = arm_sme.fmopa_2way %lhs, %rhs :
56/// vector<[8]xf16>, vector<[8]xf16> into vector<[4]x[4]xf32>
57/// ```
58///
59/// The `lhs` encodes a matrix of shape SVLSx2 and the `rhs` a matrix of
60/// 2xSVLS, where SVLS (spec [1], section B2.1) is the number of 32-bit
61/// elements in a vector of SVL bits. To illustrate, below is a breakdown of
62/// this operation for fp16 to fp32, SVL=128 (i.e., vscale=1):
63///
64/// ```
65/// LHS RHS
66/// [A0 A1 A2 A3 A4 A5 A6 A7] [B0 B1 B2 B3 B4 B5 B6 B7]
67///
68/// ----------------------------------------------------------------------------
69///
70/// implicit layout
71///
72/// [A0 A1] |
73/// [A2 A3] | [B0 B2 B4 B6]
74/// [A4 A5] | [B1 B3 B5 B7]
75/// [A6 A7] |
76///
77/// ----------------------------------------------------------------------------
78///
79/// 2 outer products
80///
81/// Acol0 ⊗ Brow0 | Acol1 ⊗ Brow1
82/// ------------- | -------------
83/// |
84/// [B0 B2 B4 B6] | [B1 B3 B5 B7]
85/// |
86/// [A0 [A0B0 A0B2 A0B4 A0B6] | [A1 [A1B1 A1B3 A1B5 A1B7]
87/// A2 [A2B0 A2B2 A2B4 A2B6] | A3 [A3B1 A3B3 A3B5 A3B7]
88/// A4 [A4B0 A4B2 A4B4 A4B6] | A5 [A5B1 A5B3 A5B5 A5B7]
89/// A6] [A6B0 A6B2 A6B4 A6B6] | A7] [A7B1 A7B3 A7B5 A7B7]
90/// |
91///
92/// ----------------------------------------------------------------------------
93///
94/// sum of 2 outer products
95///
96/// Acol0 ⊗ Brow0 + Acol1 ⊗ Brow1
97///
98/// [A0B0 + A1B1 A0B2 + A1B3 A0B4 + A1B5 A0B6 + A1B7]
99/// [A2B0 + A3B1 A2B2 + A3B3 A2B4 + A3B5 A2B6 + A3B7]
100/// [A4B0 + A5B1 A4B2 + A5B3 A4B4 + A5B5 A4B6 + A5B7]
101/// [A6B0 + A7B1 A6B2 + A7B3 A6B4 + A7B5 A6B6 + A7B7]
102///
103/// ----------------------------------------------------------------------------
104/// ```
105///
106/// This operation enables the folding of 2 outer products chained via the
107/// accumulator into a single outer product.
108///
109/// For example:
110///
111/// ```mlir
112/// %a0_ext = arith.extf %a0 : vector<[4]xf16> to vector<[4]xf32>
113/// %b0_ext = arith.extf %b0 : vector<[4]xf16> to vector<[4]xf32>
114/// %a1_ext = arith.extf %a1 : vector<[4]xf16> to vector<[4]xf32>
115/// %b1_ext = arith.extf %b1 : vector<[4]xf16> to vector<[4]xf32>
116///
117/// %0 = arm_sme.outerproduct %a0_ext, %b0_ext : vector<[4]xf32>, vector<[4]xf32>
118/// %1 = arm_sme.outerproduct %a1_ext, %b1_ext acc(%0) : vector<[4]xf32>, vector<[4]xf32>
119/// ```
120///
121/// The 2 outer products in the example above can be fused into a single outer
122/// product as follows:
123///
124/// ```mlir
125/// %a_packed = vector.interleave %a0, %a1 : vector<[4]xf16> -> vector<[8]xf16>
126/// %b_packed = vector.interleave %b0, %b1 : vector<[4]xf16> -> vector<[8]xf16>
127/// %0 = arm_sme.fmopa_2way %a_packed, %b_packed : vector<[8]xf16>, vector<[8]xf16> into vector<[4]x[4]xf32>
128/// ```
129///
130/// This is implemented in the `-arm-sme-outer-product-fusion` pass.
131///
132/// Example: FP16 to FP32
133/// ```mlir
134/// %result = arm_sme.fmopa_2way $lhs, $rhs : vector<[8]xf16>, vector<[8]xf16> into vector<[4]x[4]xf32>
135/// ```
136///
137/// Example: BF16 to FP32
138/// ```mlir
139/// %result = arm_sme.fmopa_2way $lhs, $rhs : vector<[8]xbf16>, vector<[8]xbf16> into vector<[4]x[4]xf32>
140/// ```
141///
142/// | Spec | Features |
143/// | ---- | -------- |
144/// | [FMOPA (widening, 2-way, FP16 to FP32)](https://developer.arm.com/documentation/ddi0602/2023-09/SME-Instructions/FMOPA--widening--2-way--FP16-to-FP32---Half-precision-floating-point-sum-of-outer-products-and-accumulate-) | +sme |
145/// | [BFMOPA (widening, 2-way, BF16 to FP32)](https://developer.arm.com/documentation/ddi0602/2023-09/SME-Instructions/BFMOPA--widening---BFloat16-sum-of-outer-products-and-accumulate-) | +sme |
146///
147/// [1] https://developer.arm.com/documentation/ddi0616
148class FMopa2WayOp;
149
150} // namespace mlir::arm_sme
151namespace mlir::arm_sme {
152
153/// Floating-point sum of 2 outer products and subtract
154/// Equivalent to `fmopa_2way` but outer products are subtracted from
155/// destination `result`.
156///
157/// Example: FP16 to FP32
158/// ```mlir
159/// %result = arm_sme.fmops_2way $lhs, $rhs : vector<[8]xf16>, vector<[8]xf16> into vector<[4]x[4]xf32>
160/// ```
161///
162/// Example: BF16 to FP32
163/// ```mlir
164/// %result = arm_sme.fmops_2way $lhs, $rhs : vector<[8]xbf16>, vector<[8]xbf16> into vector<[4]x[4]xf32>
165/// ```
166///
167/// Refer to
168/// [fmopa_2way](#arm_smefmopa_2way-arm_smefmopa2wayop) for a detailed
169/// description of 2-way outer products.
170///
171/// | Spec | Features |
172/// | ---- | -------- |
173/// | [FMOPS (widening, 2-way, FP16 to FP32)](https://developer.arm.com/documentation/ddi0602/2023-09/SME-Instructions/FMOPS--widening---Half-precision-floating-point-sum-of-outer-products-and-subtract-) | +sme |
174/// | [BFMOPS (widening, 2-way, BF16 to FP32)](https://developer.arm.com/documentation/ddi0602/2023-09/SME-Instructions/BMOPS--Bitwise-exclusive-NOR-population-count-outer-product-and-subtract-) | +sme |
175class FMops2WayOp;
176
177} // namespace mlir::arm_sme
178namespace mlir::arm_sme {
179
180/// Creates an undefined value of SME virtual tile type
181/// Creates a new SME "virtual tile" value within a function. The contents of
182/// the tile returned from this operation are undefined.
183///
184/// Example 1:
185///
186/// ```mlir
187/// // Create an 8-bit element "virtual tile" value:
188/// %za0_b = arm_sme.get_tile: vector<[16]x[16]xi8>
189/// ```
190///
191/// Example 2:
192///
193/// ```mlir
194/// // Create two 16-bit element "virtual tiles" values:
195/// %za0_h = arm_sme.get_tile : vector<[8]x[8]xi16>
196/// %za1_h = arm_sme.get_tile : vector<[8]x[8]xi16>
197/// ```
198///
199/// Example 3:
200/// ```mlir
201/// // Create an 128-bit element "virtual tile" value:
202/// %za0_q = arm_sme.get_tile : vector<[1]x[1]xi128>
203/// ```
204class GetTileOp;
205
206} // namespace mlir::arm_sme
207namespace mlir::arm_sme {
208
209/// Insert 1-D scalable vector into slice of 2-D tile
210/// Inserts a 1-D scalable vector into a slice of a 2-D scalable vector tile at
211/// the given index. The type of the 1-D scalable vector to be inserted must
212/// match the type of the tile slice. A tile slice is a 1-D vector of
213/// horizontally or vertically contiguous elements within a ZA tile. The updated
214/// tile is returned as the result.
215///
216/// An optional tile slice layout attribute specifies whether the tile slice is
217/// horizontal (default) or vertical.
218///
219/// Example 1: Insert `vector<[16]xi8>` into tile horizontally at the given index.
220/// ```mlir
221/// %tile_update = arm_sme.insert_tile_slice %vector, %tile[%tile_slice_index] : vector<[16]xi8> into vector<[16]x[16]xi8>
222/// ```
223///
224/// Example 2: Insert `vector<[2]xf64>` into tile vertically at the given index.
225/// ```mlir
226/// %tile_update = arm_sme.insert_tile_slice %vector, %tile[%tile_slice_index] layout<vertical> : vector<[2]xf64> into vector<[2]x[2]xf64>
227/// ```
228class InsertTileSliceOp;
229
230} // namespace mlir::arm_sme
231namespace mlir::arm_sme {
232
233/// Tile slice load and update operation
234/// Loads a 1D tile slice from memory into a 2D SME "virtual tile". The tile
235/// slice is defined by the dimension of the 2D scalable vector type pointed by
236/// the index. A tile slice index describes where in the input tile the tile
237/// slice is loaded to. An optional tile slice layout attribute specifies
238/// whether the tile slice being loaded at the given index is horizontal
239/// (default) or vertical. The updated tile is returned as the result.
240///
241/// The slice of memory read is defined by a base and indices and must be
242/// contiguous. The memref must be either rank 1 or rank 2, have dynamic
243/// dimensions since the operation is scalable, and the element type must be a
244/// scalar that matches the element type of the result.
245///
246/// The provided `mask` is used to specify which elements of the tile slice
247/// will be loaded.
248///
249/// Example 1: Load a vector<[16]xi8> tile slice from memory into tile horizontally (default) at given index.
250/// ```mlir
251/// %tile_update = arm_sme.load_tile_slice %base[%c0], %mask, %tile, %tile_slice_index : memref<?x?xi8>, vector<[16]xi1>, vector<[16]x[16]xi8>
252/// ```
253///
254/// Example 2: Load a vector<[4]xf32> tile slice from memory into tile vertically at given index.
255/// ```mlir
256/// %tile_update = arm_sme.load_tile_slice %base[%c0], %mask, %tile, %tile_slice_index layout<vertical> : memref<?x?xf32>, vector<[4]xi1>, vector<[4]x[4]xf32>
257/// ```
258///
259/// Example 3: Load a vector<[1]xi128> tile slice from memory into tile vertically at given index.
260/// ```mlir
261/// %tile_update = arm_sme.load_tile_slice %base[%c0], %mask, %tile, %tile_slice_index layout<vertical> : memref<?x?xi128>, vector<[1]xi1>, vector<[1]x[1]xi128>
262/// ```
263class LoadTileSliceOp;
264
265} // namespace mlir::arm_sme
266namespace mlir::arm_sme {
267
268/// Outer product with optional fused add/sub
269/// This operation represents an outer product that fits within an SME tile.
270/// All operands must be SVE vectors and the result a SME tile. Unlike
271/// `vector.outerproduct` masking is on the operands (rather than the result),
272/// which mirrors the SME instructions.
273///
274/// Example 1: Unmasked outerproduct (without accumulator)
275/// ```mlir
276/// // Not specifying an accumulator implicitly zeros the destination tile.
277/// %result = arm_sme.outerproduct $lhs, $rhs : vector<[4]xf32>, vector<[4]xf32>
278/// ```
279///
280/// Example 2: Unmasked outerproduct (with accumulator)
281/// ```mlir
282/// %result = arm_sme.outerproduct $lhs, $rhs acc($accumulator)
283/// : vector<[4]xf32>, vector<[4]xf32>
284/// ```
285///
286/// Example 3: Masked outerproduct
287/// ```mlir
288/// %result = arm_sme.outerproduct $lhs, $rhs masks($lhsMask, $rhsMask)
289/// : vector<[4]xf32>, vector<[4]xf32>
290/// ```
291///
292/// Example 4: Masked outerproduct (with accumulator)
293/// ```mlir
294/// %result = arm_sme.outerproduct $lhs, $rhs acc($accumulator) masks($lhsMask, $rhsMask)
295/// : vector<[4]xf32>, vector<[4]xf32>
296/// ```
297class OuterProductOp;
298
299} // namespace mlir::arm_sme
300namespace mlir::arm_sme {
301
302/// Signed integer sum of 2 outer products and accumulate
303/// Example:
304/// ```mlir
305/// %result = arm_sme.smopa_2way $lhs, $rhs : vector<[8]xi16>, vector<[8]xi16> into vector<[4]x[4]xi32>
306/// ```
307///
308/// Refer to
309/// [fmopa_2way](#arm_smefmopa_2way-arm_smefmopa2wayop) for a detailed
310/// description of 2-way outer products.
311///
312/// | Spec | Features |
313/// | ---- | -------- |
314/// | [SMOPA (2-way)](https://developer.arm.com/documentation/ddi0602/2023-09/SME-Instructions/SMOPA--2-way---Signed-integer-sum-of-outer-products-and-accumulate-) | +sme2 |
315class SMopa2WayOp;
316
317} // namespace mlir::arm_sme
318namespace mlir::arm_sme {
319
320/// Signed integer sum of 4 outer products and accumulate
321/// This operation represents a sum of 4 widened outer products. It takes 2 1-D
322/// scalable vectors as input and a 2-D scalable vector (ZA tile) as output.
323///
324/// For example (i8 to i32):
325///
326/// ```mlir
327/// %result = arm_sme.smopa_4way $lhs, $rhs :
328/// vector<[16]xi8>, vector<[16]xi8> into vector<[4]x[4]xi32>
329/// ```
330///
331/// The `lhs` encodes a matrix of shape SVLSx4 and the `rhs` a matrix of
332/// 4xSVLS, where SVLS (spec [1], section B2.1) is the number of 32-bit
333/// elements in a vector of SVL bits. To illustrate, below is a breakdown of
334/// this operation for i8 to i32, SVL=128 (i.e., vscale=1):
335///
336/// ```
337/// LHS
338/// [A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A15 A14 A15]
339///
340/// RHS
341/// [B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 B10 B11 B12 B13 B14 B15]
342///
343/// ----------------------------------------------------------------------------
344///
345/// implicit layout
346///
347/// [A0 A1 A2 A3] | [B0 B4 B8 B12]
348/// [A4 A5 A6 A7] | [B1 B5 B9 B13]
349/// [A8 A9 A10 A11] | [B2 B6 B10 B14]
350/// [A12 A13 A14 A15] | [B3 B7 B11 B15]
351///
352/// ----------------------------------------------------------------------------
353///
354/// 4 outer products
355///
356/// Acol0 ⊗ Brow0 | Acol1 ⊗ Brow1
357/// ------------- | -------------
358/// |
359/// [B0 B4 B8 B12] | [B1 B5 B9 B13]
360/// |
361/// [A0 [ A0B0 A0B4 A0B8 A0B12] | [A1 [ A1B1 A1B5 A1B9 A1B13]
362/// A4 [ A4B0 A4B4 A4B8 A4B12] | A5 [ A5B1 A5B5 A5B9 A5B13]
363/// A8 [ A8B0 A8B4 A8B8 A8B12] | A9 [ A9B1 A9B5 A9B9 A9B13]
364/// A12] [A12B0 A12B4 A12B8 A12B12] | A13] [A13B1 A13B5 A13B9 A13B13]
365/// |
366/// Acol2 ⊗ Brow2 | Acol3 ⊗ Brow3
367/// ------------- | -------------
368/// |
369/// [B2, B6, B10, B14] | [B3 B7 B11 B15]
370/// |
371/// [A2 [ A2B2 A2B6 A2B10 A2B14] | [A3 [ A3B3 A3B7 A3B11 A3B15]
372/// A6 [ A6B2 A6B6 A6B10 A6B14] | A7 [ A7B3 A7B7 A7B11 A7B15]
373/// A10 [A10B2 A10B6 A10B10 A10B14] | A11 [A11B3 A11B7 A11B11 A11B15]
374/// A14] [A14B2 A14B6 A14B10 A14B14] | A15] [A15B3 A15B7 A15B11 A15B15]
375/// |
376///
377/// ----------------------------------------------------------------------------
378///
379/// sum of 4 outer products
380///
381/// Acol0 ⊗ Brow0 + Acol1 ⊗ Brow1 + Acol2 ⊗ Brow2 + Acol3 ⊗ Brow3
382///
383/// [ A0B0 + A1B1 + A2B2 + A3B3 ... ... A0B12 + A1B13 + A2B14 + A3B15]
384/// [ A4B0 + A5B1 + A6B2 + A7B3 ... ... A4B12 + A5B13 + A6B14 + A7B15]
385/// [ A8B0 + A9B1 + A10B2 + A11B3 ... ... A8B12 + A9B13 + A10B14 + A11B15]
386/// [A12B0 + A13B1 + A14B2 + A15B3 ... ... A12B12 + A13B13 + A14B14 + A15B15]
387///
388/// ----------------------------------------------------------------------------
389/// ```
390///
391/// This operation enables the folding of 4 outer products chained via the
392/// accumulator into a single outer product.
393///
394/// For example:
395///
396/// ```mlir
397/// %a0_ext = arith.extsi %a0 : vector<[4]xi8> to vector<[4]xi32>
398/// %b0_ext = arith.extsi %b0 : vector<[4]xi8> to vector<[4]xi32>
399///
400/// %a1_ext = arith.extsi %a1 : vector<[4]xi8> to vector<[4]xi32>
401/// %b1_ext = arith.extsi %b1 : vector<[4]xi8> to vector<[4]xi32>
402///
403/// %a2_ext = arith.extsi %a2 : vector<[4]xi8> to vector<[4]xi32>
404/// %b2_ext = arith.extsi %b2 : vector<[4]xi8> to vector<[4]xi32>
405///
406/// %a3_ext = arith.extsi %a3 : vector<[4]xi8> to vector<[4]xi32>
407/// %b3_ext = arith.extsi %b3 : vector<[4]xi8> to vector<[4]xi32>
408///
409/// %0 = arm_sme.outerproduct %a0_ext, %b0_ext : vector<[4]xi32>, vector<[4]xi32>
410/// %1 = arm_sme.outerproduct %a1_ext, %b1_ext acc(%0) : vector<[4]xi32>, vector<[4]xi32>
411/// %2 = arm_sme.outerproduct %a2_ext, %b2_ext acc(%1) : vector<[4]xi32>, vector<[4]xi32>
412/// %3 = arm_sme.outerproduct %a3_ext, %b3_ext acc(%2) : vector<[4]xi32>, vector<[4]xi32>
413/// ```
414///
415/// The 4 outer products in the example above can be fused into a single outer
416/// product as follows:
417///
418/// ```mlir
419/// %lhs0 = vector.interleave %a0, %a2 : vector<[4]xi8> -> vector<[8]xi8>
420/// %lhs1 = vector.interleave %a1, %a3 : vector<[4]xi8> -> vector<[8]xi8>
421/// %lhs = vector.interleave %lhs0, %lhs1 : vector<[8]xi8> -> vector<[16]xi8>
422///
423/// %rhs0 = vector.interleave %b0, %b2 : vector<[4]xi8> -> vector<[8]xi8>
424/// %rhs1 = vector.interleave %b1, %b3 : vector<[4]xi8> -> vector<[8]xi8>
425/// %rhs = vector.interleave %rhs0, %rhs1 : vector<[8]xi8> -> vector<[16]xi8>
426///
427/// %0 = arm_sme.smopa_4way %lhs, %rhs : vector<[16]xi8>, vector<[16]xi8> into vector<[4]x[4]xi32>
428/// ```
429///
430/// This is implemented in the `-arm-sme-outer-product-fusion` pass.
431///
432/// Example: I8 to I32
433/// ```mlir
434/// %result = arm_sme.smopa_4way $lhs, $rhs : vector<[16]xi8>, vector<[16]xi8> into vector<[4]x[4]xi32>
435/// ```
436///
437/// Example: I16 to I64
438/// ```mlir
439/// %result = arm_sme.smopa_4way $lhs, $rhs : vector<[8]xi16>, vector<[8]xi16> into vector<[2]x[2]xi64>
440/// ```
441///
442/// | Spec | Features |
443/// | ---- | -------- |
444/// | [SMOPA (4-way)](https://developer.arm.com/documentation/ddi0602/2023-09/SME-Instructions/SMOPA--4-way---Signed-integer-sum-of-outer-products-and-accumulate-) | +sme (32-bit), +sme-i16i64 (64-bit)|
445class SMopa4WayOp;
446
447} // namespace mlir::arm_sme
448namespace mlir::arm_sme {
449
450/// Signed integer sum of 2 outer products and subtract
451/// Example:
452/// ```mlir
453/// %result = arm_sme.smops_2way $lhs, $rhs : vector<[8]xi16>, vector<[8]xi16> into vector<[4]x[4]xi32>
454/// ```
455///
456/// Refer to
457/// [fmopa_2way](#arm_smefmopa_2way-arm_smefmopa2wayop) for a detailed
458/// description of 2-way outer products.
459///
460/// | Spec | Features |
461/// | ---- | -------- |
462/// | [SMOPS (2-way)](https://developer.arm.com/documentation/ddi0602/2023-09/SME-Instructions/SMOPS--2-way---Signed-integer-sum-of-outer-products-and-subtract-) | +sme2 |
463class SMops2WayOp;
464
465} // namespace mlir::arm_sme
466namespace mlir::arm_sme {
467
468/// Signed integer sum of 4 outer products and subtract
469/// Equivalent to `smopa_4way` but outer products are subtracted from
470/// destination `result`.
471///
472/// Example: I8 to I32
473/// ```mlir
474/// %result = arm_sme.smops_4way $lhs, $rhs : vector<[16]xi8>, vector<[16]xi8> into vector<[4]x[4]xi32>
475/// ```
476///
477/// Example: I16 to I64
478/// ```mlir
479/// %result = arm_sme.smops_4way $lhs, $rhs : vector<[8]xi16>, vector<[8]xi16> into vector<[2]x[2]xi64>
480/// ```
481///
482/// Refer to [smopa_4way](#arm_smesmopa_4way-arm_smesmopa4wayop) for a
483/// detailed description of 4-way outer products.
484///
485/// | Spec | Features |
486/// | ---- | -------- |
487/// | [SMOPS (4-way)](https://developer.arm.com/documentation/ddi0602/2023-09/SME-Instructions/SMOPS--4-way---Signed-integer-sum-of-outer-products-and-subtract-) | +sme (32-bit), +sme-i16i64 (64-bit)|
488class SMops4WayOp;
489
490} // namespace mlir::arm_sme
491namespace mlir::arm_sme {
492
493/// Tile slice store operation
494/// Stores a 1D tile slice from a 2D SME "virtual tile" into memory. The tile
495/// slice is defined by the dimension of the 2D scalable vector type pointed by
496/// the index. A tile slice index describes where in the input tile the tile
497/// slice is stored from. An optional tile slice layout attribute specifies
498/// whether the tile slice being stored from the given index is horizontal
499/// (default) or vertical.
500///
501/// The slice of memory written is defined by a base and indices and must be
502/// contiguous. The memref must be either rank 1 or rank 2, have dynamic
503/// dimensions since the operation is scalable, and the element type must be a
504/// scalar that matches the element type of the input tile.
505///
506/// The provided `mask` is used to specify which elements of the tile slice
507/// will be stored.
508///
509/// Example 1: Store vector<[16]xi8> horizontal (default) tile slice from tile at given index to memory.
510/// ```mlir
511/// arm_sme.store_tile_slice %tile, %tile_slice_index, %mask, %base[%c0] : vector<[16]x[16]xi8>, vector<[16]xi1>, memref<?x?xi8>
512/// ```
513///
514/// Example 2: Store vector<[4]xf32> vertical tile slice from tile at given index to memory.
515/// ```mlir
516/// arm_sme.store_tile_slice %tile, %tile_slice_index, %mask, %base[%c0] layout<vertical> : vector<[4]x[4]xf32>, vector<[4]xi1>, memref<?x?xf32>
517/// ```
518///
519/// Example 3: Store a vector<[1]xi128> vertical tile slice from tile at given index to memory.
520/// ```mlir
521/// arm_sme.store_tile_slice %tile, %tile_slice_index, %mask, %base[%c0] layout<vertical> : vector<[1]x[1]xi128>, vector<[1]xi1>, memref<?x?xi128>
522/// ```
523class StoreTileSliceOp;
524
525} // namespace mlir::arm_sme
526namespace mlir::arm_sme {
527
528/// Query the streaming vector length
529/// This operation returns the streaming vector length (SVL) for a given type
530/// size. Unlike `vector.vscale` the value returned is invariant to the
531/// streaming mode.
532///
533/// Example:
534/// ```mlir
535/// // Streaming vector length in:
536/// // - bytes (8-bit, SVL.B)
537/// %svl_b = arm_sme.streaming_vl <byte>
538/// // - half words (16-bit, SVL.H)
539/// %svl_h = arm_sme.streaming_vl <half>
540/// // - words (32-bit, SVL.W)
541/// %svl_w = arm_sme.streaming_vl <word>
542/// // - double words (64-bit, SVL.D)
543/// %svl_d = arm_sme.streaming_vl <double>
544/// ```
545class StreamingVLOp;
546
547} // namespace mlir::arm_sme
548namespace mlir::arm_sme {
549
550/// Signed by unsigned integer sum of 4 outer products and accumulate
551/// Example: I8 to I32
552/// ```mlir
553/// %result = arm_sme.sumopa_4way $lhs, $rhs : vector<[16]xi8>, vector<[16]xi8> into vector<[4]x[4]xi32>
554/// ```
555///
556/// Example: I16 to I64
557/// ```mlir
558/// %result = arm_sme.sumopa_4way $lhs, $rhs : vector<[8]xi16>, vector<[8]xi16> into vector<[2]x[2]xi64>
559/// ```
560///
561/// Refer to [smopa_4way](#arm_smesmopa_4way-arm_smesmopa4wayop) for a
562/// detailed description of 4-way outer products.
563///
564/// | Spec | Features |
565/// | ---- | -------- |
566/// | [SUMOPA (4-way)](https://developer.arm.com/documentation/ddi0602/2023-09/SME-Instructions/SUMOPA--Signed-by-unsigned-integer-sum-of-outer-products-and-accumulate-) | +sme (32-bit), +sme-i16i64 (64-bit)|
567class SuMopa4WayOp;
568
569} // namespace mlir::arm_sme
570namespace mlir::arm_sme {
571
572/// Signed by unsigned integer sum of 4 outer products and subtract
573/// Example: I8 to I32
574/// ```mlir
575/// %result = arm_sme.sumops_4way $lhs, $rhs : vector<[16]xi8>, vector<[16]xi8> into vector<[4]x[4]xi32>
576/// ```
577///
578/// Example: I16 to I64
579/// ```mlir
580/// %result = arm_sme.sumops_4way $lhs, $rhs : vector<[8]xi16>, vector<[8]xi16> into vector<[2]x[2]xi64>
581/// ```
582///
583/// Refer to [smopa_4way](#arm_smesmopa_4way-arm_smesmopa4wayop) for a
584/// detailed description of 4-way outer products.
585///
586/// | Spec | Features |
587/// | ---- | -------- |
588/// | [SUMOPS (4-way)](https://developer.arm.com/documentation/ddi0602/2023-09/SME-Instructions/SUMOPS--Signed-by-unsigned-integer-sum-of-outer-products-and-subtract-) | +sme (32-bit), +sme-i16i64 (64-bit)|
589class SuMops4WayOp;
590
591} // namespace mlir::arm_sme
592namespace mlir::arm_sme {
593
594/// Tile load operation
595/// Loads a 2D SME "virtual tile" from memory defined by a base and indices,
596/// with the shape defined by the 2D scalable vector type of the result tile.
597/// An optional tile slice layout attribute specifies whether the slices of the
598/// tile being loaded are horizontal (default) or vertical. The slice of memory
599/// must be contiguous. The memref must be either rank 1 or rank 2 with dynamic
600/// dimensions, since the operation is scalable, and the element type must be a
601/// scalar that matches the element type of the result.
602///
603/// An optional SSA value `padding` of the same elemental type as the MemRef is
604/// provided to specify a fallback value in the case of masking.
605///
606/// An optional SSA value `mask` may be specified to mask out elements read
607/// from the MemRef. The `mask` type is an `i1` vector with a shape that
608/// matches how elements are read from the MemRef. Elements whose corresponding
609/// mask element is `0` are masked out and replaced with `padding`.
610///
611/// If either `padding` or `mask` are specified, both must be specified.
612///
613/// Example 1: Load an 8-bit element ZA tile with horizontal layout (default) from memory (ZA0.B).
614/// ```mlir
615/// %tile = arm_sme.tile_load %base[%c0, %c0] : memref<?x?xi8>, vector<[16]x[16]xi8>
616/// ```
617///
618/// Example 2: Load a FP 32-bit element ZA tile with vertical layout from memory.
619/// ```mlir
620/// %tile = arm_sme.tile_load %base[%c0, %c0] layout<vertical> : memref<?x?xf32>, vector<[4]x[4]xf32>
621/// ```
622///
623/// Example 3: Load a 128-bit element ZA tile with horizontal layout (default) from memory.
624/// ```mlir
625/// %tile = arm_sme.tile_load %base[%c0, %c0] layout<horizontal> : memref<?x?xi128>, vector<[1]x[1]xi128>
626/// ```
627///
628/// Example 4: Masked load of int 32-bit element ZA tile with horizontal layout (default) from memory.
629/// ```mlir
630/// %tile = arm_sme.tile_load %base[%c0, %c0], %pad, %mask : memref<?x?xf32>, vector<[4]x[4]xf32>
631/// ```
632class TileLoadOp;
633
634} // namespace mlir::arm_sme
635namespace mlir::arm_sme {
636
637/// Tile store operation
638/// Stores a 2D SME "virtual tile" to memory defined by a base and indices,
639/// with the shape defined by the 2D scalable vector type of the tile being
640/// stored. An optional tile slice layout attribute specifies whether the
641/// slices of the tile being stored are horizontal (default) or vertical. The
642/// slice of memory must be contiguous. The memref must be either rank 1 or
643/// rank 2 with dynamic dimensions, since the operation is scalable, and the
644/// element type must be a scalar that matches the element type of the result.
645///
646/// An optional `mask` may be provided, the shape of which corresponds to the
647/// `tile`, and selects which elements of the tile will be stored.
648///
649/// Example 1: Store an 8-bit element ZA tile with horizontal (default) layout to memory (ZA0.B).
650/// ```mlir
651/// arm_sme.tile_store %tile, %base[%c0, %c0] : vector<[16]x[16]xi8>, memref<?x?xi8>
652/// ```
653///
654/// Example 2: Store a FP 32-bit element ZA tile with vertical layout to memory.
655/// ```mlir
656/// arm_sme.tile_store %tile, %base[%c0, %c0] layout<vertical> : vector<[4]x[4]xf32>, memref<?x?xf32>
657/// ```
658///
659/// Example 3: Store a 128-bit element ZA tile with horizontal (default) layout to memory.
660/// ```mlir
661/// arm_sme.tile_store %tile, %base[%c0, %c0] layout<horizontal> : vector<[1]x[1]xi128>, memref<?x?xi128>
662/// ```
663///
664/// Example 4: Masked store a int 32-bit element ZA tile with vertical layout to memory.
665/// ```mlir
666/// arm_sme.tile_store %tile, %base[%c0, %c0], %mask layout<vertical> : vector<[4]x[4]xf32>, memref<?x?xf32>
667/// ```
668class TileStoreOp;
669
670} // namespace mlir::arm_sme
671namespace mlir::arm_sme {
672
673/// Unsiged integer sum of 2 outer products and accumulate
674/// Example:
675/// ```mlir
676/// %result = arm_sme.umopa_2way $lhs, $rhs : vector<[8]xi16>, vector<[8]xi16> into vector<[4]x[4]xi32>
677/// ```
678///
679/// Refer to
680/// [fmopa_2way](#arm_smefmopa_2way-arm_smefmopa2wayop) for a detailed
681/// description of 2-way outer products.
682///
683/// | Spec | Features |
684/// | ---- | -------- |
685/// | [UMOPA (2-way)](https://developer.arm.com/documentation/ddi0602/2023-09/SME-Instructions/UMOPA--2-way---Unsigned-integer-sum-of-outer-products-and-accumulate-) | +sme2 |
686class UMopa2WayOp;
687
688} // namespace mlir::arm_sme
689namespace mlir::arm_sme {
690
691/// Unsigned integer sum of 4 outer products and accumulate
692/// Example: I8 to I32
693/// ```mlir
694/// %result = arm_sme.umopa_4way $lhs, $rhs : vector<[16]xi8>, vector<[16]xi8> into vector<[4]x[4]xi32>
695/// ```
696///
697/// Example: I16 to I64
698/// ```mlir
699/// %result = arm_sme.umopa_4way $lhs, $rhs : vector<[8]xi16>, vector<[8]xi16> into vector<[2]x[2]xi64>
700/// ```
701///
702/// Refer to [smopa_4way](#arm_smesmopa_4way-arm_smesmopa4wayop) for a
703/// detailed description of 4-way outer products.
704///
705/// | Spec | Features |
706/// | ---- | -------- |
707/// | [UMOPA (4-way)](https://developer.arm.com/documentation/ddi0602/2023-09/SME-Instructions/UMOPA--4-way---Unsigned-integer-sum-of-outer-products-and-accumulate-) | +sme (32-bit), +sme-i16i64 (64-bit)|
708class UMopa4WayOp;
709
710} // namespace mlir::arm_sme
711namespace mlir::arm_sme {
712
713/// Unsiged integer sum of 2 outer products and subtract
714/// Example:
715/// ```mlir
716/// %result = arm_sme.umops_2way $lhs, $rhs : vector<[8]xi16>, vector<[8]xi16> into vector<[4]x[4]xi32>
717/// ```
718///
719/// Refer to
720/// [fmopa_2way](#arm_smefmopa_2way-arm_smefmopa2wayop) for a detailed
721/// description of 2-way outer products.
722///
723/// | Spec | Features |
724/// | ---- | -------- |
725/// | [UMOPS (2-way)](https://developer.arm.com/documentation/ddi0602/2023-09/SME-Instructions/UMOPS--2-way---Unsigned-integer-sum-of-outer-products-and-subtract-) | +sme2 |
726class UMops2WayOp;
727
728} // namespace mlir::arm_sme
729namespace mlir::arm_sme {
730
731/// Unsigned integer sum of 4 outer products and subtract
732/// Example: I8 to I32
733/// ```mlir
734/// %result = arm_sme.umops_4way $lhs, $rhs : vector<[16]xi8>, vector<[16]xi8> into vector<[4]x[4]xi32>
735/// ```
736///
737/// Example: I16 to I64
738/// ```mlir
739/// %result = arm_sme.umops_4way $lhs, $rhs : vector<[8]xi16>, vector<[8]xi16> into vector<[2]x[2]xi64>
740/// ```
741///
742/// Refer to [smopa_4way](#arm_smesmopa_4way-arm_smesmopa4wayop) for a
743/// detailed description of 4-way outer products.
744///
745/// | Spec | Features |
746/// | ---- | -------- |
747/// | [UMOPS (4-way)](https://developer.arm.com/documentation/ddi0602/2023-09/SME-Instructions/UMOPS--4-way---Unsigned-integer-sum-of-outer-products-and-subtract-) | +sme (32-bit), +sme-i16i64 (64-bit)|
748class UMops4WayOp;
749
750} // namespace mlir::arm_sme
751namespace mlir::arm_sme {
752
753/// Unsigned by signed integer sum of 4 outer products and accumulate
754/// Example: I8 to I32
755/// ```mlir
756/// %result = arm_sme.usmopa_4way $lhs, $rhs : vector<[16]xi8>, vector<[16]xi8> into vector<[4]x[4]xi32>
757/// ```
758///
759/// Example: I16 to I64
760/// ```mlir
761/// %result = arm_sme.usmopa_4way $lhs, $rhs : vector<[8]xi16>, vector<[8]xi16> into vector<[2]x[2]xi64>
762/// ```
763///
764/// Refer to [smopa_4way](#arm_smesmopa_4way-arm_smesmopa4wayop) for a
765/// detailed description of 4-way outer products.
766///
767/// | Spec | Features |
768/// | ---- | -------- |
769/// | [USMOPA (4-way)](https://developer.arm.com/documentation/ddi0602/2023-09/SME-Instructions/USMOPA--Unsigned-by-signed-integer-sum-of-outer-products-and-accumulate-) | +sme (32-bit), +sme-i16i64 (64-bit)|
770class UsMopa4WayOp;
771
772} // namespace mlir::arm_sme
773namespace mlir::arm_sme {
774
775/// Unsigned by signed integer sum of 4 outer products and subtract
776/// Example: I8 to I32
777/// ```mlir
778/// %result = arm_sme.usmops_4way $lhs, $rhs : vector<[16]xi8>, vector<[16]xi8> into vector<[4]x[4]xi32>
779/// ```
780///
781/// Example: I16 to I64
782/// ```mlir
783/// %result = arm_sme.usmops_4way $lhs, $rhs : vector<[8]xi16>, vector<[8]xi16> into vector<[2]x[2]xi64>
784/// ```
785///
786/// Refer to [smopa_4way](#arm_smesmopa_4way-arm_smesmopa4wayop) for a
787/// detailed description of 4-way outer products.
788///
789/// | Spec | Features |
790/// | ---- | -------- |
791/// | [USMOPS (4-way)](https://developer.arm.com/documentation/ddi0602/2023-09/SME-Instructions/USMOPS--Unsigned-by-signed-integer-sum-of-outer-products-and-subtract-) | +sme (32-bit), +sme-i16i64 (64-bit)|
792class UsMops4WayOp;
793
794} // namespace mlir::arm_sme
795namespace mlir::arm_sme {
796
797/// Creates a zero-initialized value of SME virtual tile type
798/// Creates a new SME "virtual tile" value within a function. The contents of
799/// the tile returned from this operation are zero-initialized.
800///
801/// Example 1: Zero an 8-bit element ZA tile.
802///
803/// ```mlir
804/// %0 = arm_sme.zero : vector<[16]x[16]xi8>
805/// ```
806///
807/// Example 2: Zero a 64-bit element ZA tile.
808///
809/// ```mlir
810/// %0 = arm_sme.zero : vector<[2]x[2]xi64>
811/// ```
812class ZeroOp;
813
814} // namespace mlir::arm_sme
815#ifdef GET_OP_CLASSES
816#undef GET_OP_CLASSES
817
818#include "mlir/Bytecode/BytecodeOpInterface.h"
819#include "mlir/IR/Attributes.h"
820#include "mlir/IR/BuiltinTypes.h"
821#include "mlir/IR/OpDefinition.h"
822#include "mlir/IR/Types.h"
823#include "mlir/Interfaces/InferTypeOpInterface.h"
824#include "mlir/Interfaces/SideEffectInterfaces.h"
825
826namespace mlir::arm_sme {
827
828
829//===----------------------------------------------------------------------===//
830// ::mlir::arm_sme::CopyTileOp declarations
831//===----------------------------------------------------------------------===//
832
833namespace detail {
834
835class CopyTileOpGenericAdaptorBase {
836public:
837 using Properties = ::mlir::EmptyProperties;
838protected:
839 ::mlir::DictionaryAttr odsAttrs;
840 ::std::optional<::mlir::OperationName> odsOpName;
841 Properties properties;
842 ::mlir::RegionRange odsRegions;
843public:
844 CopyTileOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
845 odsOpName.emplace(args: "arm_sme.copy_tile", args: odsAttrs.getContext());
846 }
847
848 CopyTileOpGenericAdaptorBase(CopyTileOp op);
849
850 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
851 return {index, 1};
852 }
853
854 const Properties &getProperties() {
855 return properties;
856 }
857
858 ::mlir::DictionaryAttr getAttributes() {
859 return odsAttrs;
860 }
861
862};
863
864} // namespace detail
865template <typename RangeT>
866class CopyTileOpGenericAdaptor : public detail::CopyTileOpGenericAdaptorBase {
867 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
868 using Base = detail::CopyTileOpGenericAdaptorBase;
869 static constexpr int odsIndex_tile = 0;
870public:
871 CopyTileOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
872
873 CopyTileOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : CopyTileOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
874
875 CopyTileOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : CopyTileOpGenericAdaptor(values, attrs, Properties{}, {}) {}
876
877 CopyTileOpGenericAdaptor(RangeT values, const CopyTileOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
878
879 template <typename LateInst = CopyTileOp, typename = std::enable_if_t<std::is_same_v<LateInst, CopyTileOp>>>
880 CopyTileOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
881
882 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
883 return Base::getODSOperandIndexAndLength(index, odsOperandsSize: odsOperands.size());
884 }
885
886 RangeT getODSOperands(unsigned index) {
887 auto valueRange = getODSOperandIndexAndLength(index);
888 return {std::next(odsOperands.begin(), valueRange.first),
889 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
890 }
891
892 ValueT getTile() {
893 return (*getODSOperands(index: 0).begin());
894 }
895
896 RangeT getOperands() {
897 return odsOperands;
898 }
899
900private:
901 RangeT odsOperands;
902};
903class CopyTileOpAdaptor : public CopyTileOpGenericAdaptor<::mlir::ValueRange> {
904public:
905 using CopyTileOpGenericAdaptor::CopyTileOpGenericAdaptor;
906 CopyTileOpAdaptor(CopyTileOp op);
907
908 ::llvm::LogicalResult verify(::mlir::Location loc);
909};
910class CopyTileOp : public ::mlir::Op<CopyTileOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<VectorType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::arm_sme::ArmSMETileOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
911public:
912 using Op::Op;
913 using Op::print;
914 using Adaptor = CopyTileOpAdaptor;
915 template <typename RangeT>
916 using GenericAdaptor = CopyTileOpGenericAdaptor<RangeT>;
917 using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
918 static constexpr int odsIndex_tile = 0;
919 static constexpr int odsIndex_result = 0;
920 using Properties = FoldAdaptor::Properties;
921 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
922 return {};
923 }
924
925 static constexpr ::llvm::StringLiteral getOperationName() {
926 return ::llvm::StringLiteral("arm_sme.copy_tile");
927 }
928
929 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
930 return {index, 1};
931 }
932
933 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
934 auto [start, length] = getODSOperandIndexAndLength(index);
935 return getOperation()->getOperands().slice(n: start, m: length);
936 }
937
938 ::mlir::TypedValue<VectorType> getTile() {
939 return ::llvm::cast<::mlir::TypedValue<VectorType>>(Val: *getODSOperands(index: 0).begin());
940 }
941
942 ::mlir::OpOperand &getTileMutable() {
943 auto range = getODSOperandIndexAndLength(index: 0);
944 return getOperation()->getOpOperand(idx: range.first);
945 }
946
947 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
948 return {index, 1};
949 }
950
951 ::mlir::Operation::result_range getODSResults(unsigned index) {
952 auto valueRange = getODSResultIndexAndLength(index);
953 return {std::next(x: getOperation()->result_begin(), n: valueRange.first),
954 std::next(x: getOperation()->result_begin(), n: valueRange.first + valueRange.second)};
955 }
956
957 ::mlir::TypedValue<VectorType> getResult() {
958 return ::llvm::cast<::mlir::TypedValue<VectorType>>(Val: *getODSResults(index: 0).begin());
959 }
960
961 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
962 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
963 static llvm::hash_code computePropertiesHash(const Properties &prop);
964 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
965 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
966 static void walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor);
967 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
968 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value tile);
969 static CopyTileOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value tile);
970 static CopyTileOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value tile);
971 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value tile);
972 static CopyTileOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value tile);
973 static CopyTileOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value tile);
974 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value tile);
975 static CopyTileOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value tile);
976 static CopyTileOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value tile);
977 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
978 static CopyTileOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
979 static CopyTileOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
980 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
981 static CopyTileOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
982 static CopyTileOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
983 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
984 static CopyTileOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
985 static CopyTileOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
986 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
987 static CopyTileOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
988 static CopyTileOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
989 ::llvm::LogicalResult verifyInvariantsImpl();
990 ::llvm::LogicalResult verifyInvariants();
991 static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
992 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
993 LLVM_ATTRIBUTE_MINSIZE void print(::mlir::OpAsmPrinter &_odsPrinter);
994 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
995public:
996 VectorType getTileType() {
997 return ::llvm::cast<VectorType>(Val: getResult().getType());
998 }
999};
1000
1001} // namespace mlir::arm_sme
1002MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::CopyTileOp)
1003
1004namespace mlir::arm_sme {
1005
1006
1007//===----------------------------------------------------------------------===//
1008// ::mlir::arm_sme::ExtractTileSliceOp declarations
1009//===----------------------------------------------------------------------===//
1010
1011namespace detail {
1012
1013class ExtractTileSliceOpGenericAdaptorBase {
1014public:
1015 struct Properties {
1016 using layoutTy = ::mlir::arm_sme::TileSliceLayoutAttr;
1017 layoutTy layout;
1018
1019 auto getLayout() const {
1020 auto &propStorage = this->layout;
1021 return ::llvm::dyn_cast_or_null<::mlir::arm_sme::TileSliceLayoutAttr>(Val: propStorage);
1022 }
1023 void setLayout(const ::mlir::arm_sme::TileSliceLayoutAttr &propValue) {
1024 this->layout = propValue;
1025 }
1026 bool operator==(const Properties &rhs) const {
1027 return
1028 rhs.layout == this->layout &&
1029 true;
1030 }
1031 bool operator!=(const Properties &rhs) const {
1032 return !(*this == rhs);
1033 }
1034 };
1035protected:
1036 ::mlir::DictionaryAttr odsAttrs;
1037 ::std::optional<::mlir::OperationName> odsOpName;
1038 Properties properties;
1039 ::mlir::RegionRange odsRegions;
1040public:
1041 ExtractTileSliceOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
1042 odsOpName.emplace(args: "arm_sme.extract_tile_slice", args: odsAttrs.getContext());
1043 }
1044
1045 ExtractTileSliceOpGenericAdaptorBase(ExtractTileSliceOp op);
1046
1047 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
1048 return {index, 1};
1049 }
1050
1051 const Properties &getProperties() {
1052 return properties;
1053 }
1054
1055 ::mlir::DictionaryAttr getAttributes() {
1056 return odsAttrs;
1057 }
1058
1059 ::mlir::arm_sme::TileSliceLayoutAttr getLayoutAttr();
1060 ::mlir::arm_sme::TileSliceLayout getLayout();
1061};
1062
1063} // namespace detail
1064template <typename RangeT>
1065class ExtractTileSliceOpGenericAdaptor : public detail::ExtractTileSliceOpGenericAdaptorBase {
1066 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
1067 using Base = detail::ExtractTileSliceOpGenericAdaptorBase;
1068 static constexpr int odsIndex_tile = 0;
1069 static constexpr int odsIndex_tile_slice_index = 1;
1070public:
1071 ExtractTileSliceOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
1072
1073 ExtractTileSliceOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ExtractTileSliceOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
1074
1075 ExtractTileSliceOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ExtractTileSliceOpGenericAdaptor(values, attrs, Properties{}, {}) {}
1076
1077 ExtractTileSliceOpGenericAdaptor(RangeT values, const ExtractTileSliceOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
1078
1079 template <typename LateInst = ExtractTileSliceOp, typename = std::enable_if_t<std::is_same_v<LateInst, ExtractTileSliceOp>>>
1080 ExtractTileSliceOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
1081
1082 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
1083 return Base::getODSOperandIndexAndLength(index, odsOperandsSize: odsOperands.size());
1084 }
1085
1086 RangeT getODSOperands(unsigned index) {
1087 auto valueRange = getODSOperandIndexAndLength(index);
1088 return {std::next(odsOperands.begin(), valueRange.first),
1089 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
1090 }
1091
1092 ValueT getTile() {
1093 return (*getODSOperands(index: 0).begin());
1094 }
1095
1096 ValueT getTileSliceIndex() {
1097 return (*getODSOperands(index: 1).begin());
1098 }
1099
1100 RangeT getOperands() {
1101 return odsOperands;
1102 }
1103
1104private:
1105 RangeT odsOperands;
1106};
1107class ExtractTileSliceOpAdaptor : public ExtractTileSliceOpGenericAdaptor<::mlir::ValueRange> {
1108public:
1109 using ExtractTileSliceOpGenericAdaptor::ExtractTileSliceOpGenericAdaptor;
1110 ExtractTileSliceOpAdaptor(ExtractTileSliceOp op);
1111
1112 ::llvm::LogicalResult verify(::mlir::Location loc);
1113};
1114class ExtractTileSliceOp : public ::mlir::Op<ExtractTileSliceOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::VectorType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::arm_sme::ArmSMETileOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
1115public:
1116 using Op::Op;
1117 using Op::print;
1118 using Adaptor = ExtractTileSliceOpAdaptor;
1119 template <typename RangeT>
1120 using GenericAdaptor = ExtractTileSliceOpGenericAdaptor<RangeT>;
1121 using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
1122 static constexpr int odsIndex_tile = 0;
1123 static constexpr int odsIndex_tile_slice_index = 1;
1124 static constexpr int odsIndex_result = 0;
1125 using Properties = FoldAdaptor::Properties;
1126 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
1127 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("layout")};
1128 return ::llvm::ArrayRef(attrNames);
1129 }
1130
1131 ::mlir::StringAttr getLayoutAttrName() {
1132 return getAttributeNameForIndex(index: 0);
1133 }
1134
1135 static ::mlir::StringAttr getLayoutAttrName(::mlir::OperationName name) {
1136 return getAttributeNameForIndex(name, index: 0);
1137 }
1138
1139 static constexpr ::llvm::StringLiteral getOperationName() {
1140 return ::llvm::StringLiteral("arm_sme.extract_tile_slice");
1141 }
1142
1143 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
1144 return {index, 1};
1145 }
1146
1147 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
1148 auto [start, length] = getODSOperandIndexAndLength(index);
1149 return getOperation()->getOperands().slice(n: start, m: length);
1150 }
1151
1152 ::mlir::TypedValue<VectorType> getTile() {
1153 return ::llvm::cast<::mlir::TypedValue<VectorType>>(Val: *getODSOperands(index: 0).begin());
1154 }
1155
1156 ::mlir::TypedValue<::mlir::IndexType> getTileSliceIndex() {
1157 return ::llvm::cast<::mlir::TypedValue<::mlir::IndexType>>(Val: *getODSOperands(index: 1).begin());
1158 }
1159
1160 ::mlir::OpOperand &getTileMutable() {
1161 auto range = getODSOperandIndexAndLength(index: 0);
1162 return getOperation()->getOpOperand(idx: range.first);
1163 }
1164
1165 ::mlir::OpOperand &getTileSliceIndexMutable() {
1166 auto range = getODSOperandIndexAndLength(index: 1);
1167 return getOperation()->getOpOperand(idx: range.first);
1168 }
1169
1170 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
1171 return {index, 1};
1172 }
1173
1174 ::mlir::Operation::result_range getODSResults(unsigned index) {
1175 auto valueRange = getODSResultIndexAndLength(index);
1176 return {std::next(x: getOperation()->result_begin(), n: valueRange.first),
1177 std::next(x: getOperation()->result_begin(), n: valueRange.first + valueRange.second)};
1178 }
1179
1180 ::mlir::TypedValue<::mlir::VectorType> getResult() {
1181 return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *getODSResults(index: 0).begin());
1182 }
1183
1184 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1185 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
1186 static llvm::hash_code computePropertiesHash(const Properties &prop);
1187 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
1188 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
1189 static void walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor);
1190 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1191 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
1192 void writeProperties(::mlir::DialectBytecodeWriter &writer);
1193 ::mlir::arm_sme::TileSliceLayoutAttr getLayoutAttr() {
1194 return ::llvm::dyn_cast_or_null<::mlir::arm_sme::TileSliceLayoutAttr>(Val&: getProperties().layout);
1195 }
1196
1197 ::mlir::arm_sme::TileSliceLayout getLayout();
1198 void setLayoutAttr(::mlir::arm_sme::TileSliceLayoutAttr attr) {
1199 getProperties().layout = attr;
1200 }
1201
1202 void setLayout(::mlir::arm_sme::TileSliceLayout attrValue);
1203 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayoutAttr layout);
1204 static ExtractTileSliceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayoutAttr layout);
1205 static ExtractTileSliceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayoutAttr layout);
1206 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayoutAttr layout);
1207 static ExtractTileSliceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayoutAttr layout);
1208 static ExtractTileSliceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayoutAttr layout);
1209 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayoutAttr layout);
1210 static ExtractTileSliceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayoutAttr layout);
1211 static ExtractTileSliceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayoutAttr layout);
1212 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayout layout = TileSliceLayout::Horizontal);
1213 static ExtractTileSliceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayout layout = TileSliceLayout::Horizontal);
1214 static ExtractTileSliceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayout layout = TileSliceLayout::Horizontal);
1215 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayout layout = TileSliceLayout::Horizontal);
1216 static ExtractTileSliceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayout layout = TileSliceLayout::Horizontal);
1217 static ExtractTileSliceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayout layout = TileSliceLayout::Horizontal);
1218 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayout layout = TileSliceLayout::Horizontal);
1219 static ExtractTileSliceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayout layout = TileSliceLayout::Horizontal);
1220 static ExtractTileSliceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayout layout = TileSliceLayout::Horizontal);
1221 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
1222 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1223 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
1224 static ExtractTileSliceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1225 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
1226 static ExtractTileSliceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1227 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
1228 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1229 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
1230 static ExtractTileSliceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1231 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
1232 static ExtractTileSliceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1233 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1234 static ExtractTileSliceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1235 static ExtractTileSliceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1236 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1237 static ExtractTileSliceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1238 static ExtractTileSliceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1239 static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
1240 ::llvm::LogicalResult verifyInvariantsImpl();
1241 ::llvm::LogicalResult verifyInvariants();
1242 static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
1243 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
1244 LLVM_ATTRIBUTE_MINSIZE void print(::mlir::OpAsmPrinter &_odsPrinter);
1245 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
1246private:
1247 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
1248 return getAttributeNameForIndex(name: (*this)->getName(), index);
1249 }
1250
1251 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
1252 assert(index < 1 && "invalid attribute index");
1253 assert(name.getStringRef() == getOperationName() && "invalid operation name");
1254 assert(name.isRegistered() && "Operation isn't registered, missing a "
1255 "dependent dialect loading?");
1256 return name.getAttributeNames()[index];
1257 }
1258
1259 static void buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes);
1260public:
1261 VectorType getSliceType() { return getResult().getType(); }
1262 VectorType getTileType() {
1263 return ::llvm::cast<VectorType>(Val: getTile().getType());
1264 }
1265};
1266
1267} // namespace mlir::arm_sme
1268MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::ExtractTileSliceOp)
1269MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::ExtractTileSliceOpGenericAdaptorBase::Properties)
1270
1271namespace mlir::arm_sme {
1272
1273
1274//===----------------------------------------------------------------------===//
1275// ::mlir::arm_sme::FMopa2WayOp declarations
1276//===----------------------------------------------------------------------===//
1277
1278namespace detail {
1279
1280class FMopa2WayOpGenericAdaptorBase {
1281public:
1282 struct Properties {
1283 using operandSegmentSizesTy = std::array<int32_t, 5>;
1284 operandSegmentSizesTy operandSegmentSizes;
1285 ::llvm::ArrayRef<int32_t> getOperandSegmentSizes() const {
1286 auto &propStorage = this->operandSegmentSizes;
1287 return propStorage;
1288 }
1289 void setOperandSegmentSizes(::llvm::ArrayRef<int32_t> propValue) {
1290 auto &propStorage = this->operandSegmentSizes;
1291 ::llvm::copy(Range&: propValue, Out: propStorage.begin());
1292 }
1293 bool operator==(const Properties &rhs) const {
1294 return
1295 rhs.operandSegmentSizes == this->operandSegmentSizes &&
1296 true;
1297 }
1298 bool operator!=(const Properties &rhs) const {
1299 return !(*this == rhs);
1300 }
1301 };
1302protected:
1303 ::mlir::DictionaryAttr odsAttrs;
1304 ::std::optional<::mlir::OperationName> odsOpName;
1305 Properties properties;
1306 ::mlir::RegionRange odsRegions;
1307public:
1308 FMopa2WayOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
1309 odsOpName.emplace(args: "arm_sme.fmopa_2way", args: odsAttrs.getContext());
1310 }
1311
1312 FMopa2WayOpGenericAdaptorBase(FMopa2WayOp op);
1313
1314 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
1315 const Properties &getProperties() {
1316 return properties;
1317 }
1318
1319 ::mlir::DictionaryAttr getAttributes() {
1320 return odsAttrs;
1321 }
1322
1323};
1324
1325} // namespace detail
1326template <typename RangeT>
1327class FMopa2WayOpGenericAdaptor : public detail::FMopa2WayOpGenericAdaptorBase {
1328 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
1329 using Base = detail::FMopa2WayOpGenericAdaptorBase;
1330 static constexpr int odsIndex_lhs = 0;
1331 static constexpr int odsIndex_rhs = 1;
1332 static constexpr int odsIndex_lhsMask = 2;
1333 static constexpr int odsIndex_rhsMask = 3;
1334 static constexpr int odsIndex_acc = 4;
1335public:
1336 FMopa2WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
1337
1338 FMopa2WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : FMopa2WayOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
1339
1340 FMopa2WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs) : FMopa2WayOpGenericAdaptor(values, attrs, Properties{}, {}) {}
1341
1342 FMopa2WayOpGenericAdaptor(RangeT values, const FMopa2WayOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
1343
1344 template <typename LateInst = FMopa2WayOp, typename = std::enable_if_t<std::is_same_v<LateInst, FMopa2WayOp>>>
1345 FMopa2WayOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
1346
1347 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
1348 return Base::getODSOperandIndexAndLength(index, odsOperandsSize: odsOperands.size());
1349 }
1350
1351 RangeT getODSOperands(unsigned index) {
1352 auto valueRange = getODSOperandIndexAndLength(index);
1353 return {std::next(odsOperands.begin(), valueRange.first),
1354 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
1355 }
1356
1357 ValueT getLhs() {
1358 return (*getODSOperands(index: 0).begin());
1359 }
1360
1361 ValueT getRhs() {
1362 return (*getODSOperands(index: 1).begin());
1363 }
1364
1365 ValueT getLhsMask() {
1366 auto operands = getODSOperands(index: 2);
1367 return operands.empty() ? ValueT{} : (*operands.begin());
1368 }
1369
1370 ValueT getRhsMask() {
1371 auto operands = getODSOperands(index: 3);
1372 return operands.empty() ? ValueT{} : (*operands.begin());
1373 }
1374
1375 ValueT getAcc() {
1376 auto operands = getODSOperands(index: 4);
1377 return operands.empty() ? ValueT{} : (*operands.begin());
1378 }
1379
1380 RangeT getOperands() {
1381 return odsOperands;
1382 }
1383
1384private:
1385 RangeT odsOperands;
1386};
1387class FMopa2WayOpAdaptor : public FMopa2WayOpGenericAdaptor<::mlir::ValueRange> {
1388public:
1389 using FMopa2WayOpGenericAdaptor::FMopa2WayOpGenericAdaptor;
1390 FMopa2WayOpAdaptor(FMopa2WayOp op);
1391
1392 ::llvm::LogicalResult verify(::mlir::Location loc);
1393};
1394class FMopa2WayOp : public ::mlir::Op<FMopa2WayOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<2>::Impl, ::mlir::OpTrait::AttrSizedOperandSegments, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::arm_sme::ArmSMETileOpInterface::Trait> {
1395public:
1396 using Op::Op;
1397 using Op::print;
1398 using Adaptor = FMopa2WayOpAdaptor;
1399 template <typename RangeT>
1400 using GenericAdaptor = FMopa2WayOpGenericAdaptor<RangeT>;
1401 using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
1402 static constexpr int odsIndex_lhs = 0;
1403 static constexpr int odsIndex_rhs = 1;
1404 static constexpr int odsIndex_lhsMask = 2;
1405 static constexpr int odsIndex_rhsMask = 3;
1406 static constexpr int odsIndex_acc = 4;
1407 static constexpr int odsIndex_result = 0;
1408 using Properties = FoldAdaptor::Properties;
1409 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
1410 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("operandSegmentSizes")};
1411 return ::llvm::ArrayRef(attrNames);
1412 }
1413
1414 ::mlir::StringAttr getOperandSegmentSizesAttrName() {
1415 return (*this)->getName().getAttributeNames().back();
1416 }
1417
1418 static ::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name) {
1419 return name.getAttributeNames().back();
1420 }
1421
1422 static constexpr ::llvm::StringLiteral getOperationName() {
1423 return ::llvm::StringLiteral("arm_sme.fmopa_2way");
1424 }
1425
1426 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
1427 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
1428 auto [start, length] = getODSOperandIndexAndLength(index);
1429 return getOperation()->getOperands().slice(n: start, m: length);
1430 }
1431
1432 ::mlir::TypedValue<::mlir::Type> getLhs() {
1433 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(Val: *getODSOperands(index: 0).begin());
1434 }
1435
1436 ::mlir::TypedValue<::mlir::VectorType> getRhs() {
1437 return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *getODSOperands(index: 1).begin());
1438 }
1439
1440 ::mlir::TypedValue<::mlir::VectorType> getLhsMask() {
1441 auto operands = getODSOperands(index: 2);
1442 return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *operands.begin());
1443 }
1444
1445 ::mlir::TypedValue<::mlir::VectorType> getRhsMask() {
1446 auto operands = getODSOperands(index: 3);
1447 return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *operands.begin());
1448 }
1449
1450 ::mlir::TypedValue<::mlir::VectorType> getAcc() {
1451 auto operands = getODSOperands(index: 4);
1452 return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *operands.begin());
1453 }
1454
1455 ::mlir::OpOperand &getLhsMutable() {
1456 auto range = getODSOperandIndexAndLength(index: 0);
1457 return getOperation()->getOpOperand(idx: range.first);
1458 }
1459
1460 ::mlir::OpOperand &getRhsMutable() {
1461 auto range = getODSOperandIndexAndLength(index: 1);
1462 return getOperation()->getOpOperand(idx: range.first);
1463 }
1464
1465 ::mlir::MutableOperandRange getLhsMaskMutable();
1466 ::mlir::MutableOperandRange getRhsMaskMutable();
1467 ::mlir::MutableOperandRange getAccMutable();
1468 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
1469 return {index, 1};
1470 }
1471
1472 ::mlir::Operation::result_range getODSResults(unsigned index) {
1473 auto valueRange = getODSResultIndexAndLength(index);
1474 return {std::next(x: getOperation()->result_begin(), n: valueRange.first),
1475 std::next(x: getOperation()->result_begin(), n: valueRange.first + valueRange.second)};
1476 }
1477
1478 ::mlir::TypedValue<::mlir::Type> getResult() {
1479 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(Val: *getODSResults(index: 0).begin());
1480 }
1481
1482 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1483 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
1484 static llvm::hash_code computePropertiesHash(const Properties &prop);
1485 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
1486 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
1487 static void walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor);
1488 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1489 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
1490 void writeProperties(::mlir::DialectBytecodeWriter &writer);
1491 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
1492 static FMopa2WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
1493 static FMopa2WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
1494 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
1495 static FMopa2WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
1496 static FMopa2WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
1497 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
1498 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1499 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
1500 static FMopa2WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1501 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
1502 static FMopa2WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1503 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1504 static FMopa2WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1505 static FMopa2WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1506 ::llvm::LogicalResult verifyInvariantsImpl();
1507 ::llvm::LogicalResult verifyInvariants();
1508 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
1509 LLVM_ATTRIBUTE_MINSIZE void print(::mlir::OpAsmPrinter &_odsPrinter);
1510 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
1511private:
1512 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
1513 return getAttributeNameForIndex(name: (*this)->getName(), index);
1514 }
1515
1516 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
1517 return {};
1518 }
1519
1520 static void buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes);
1521public:
1522 VectorType getLhsType() { return llvm::cast<VectorType>(Val: getLhs().getType()); }
1523 VectorType getRhsType() { return llvm::cast<VectorType>(Val: getRhs().getType()); }
1524 VectorType getResultType() { return llvm::cast<VectorType>(Val: getResult().getType()); }
1525 VectorType getTileType() {
1526 return getResultType();
1527 }
1528};
1529
1530} // namespace mlir::arm_sme
1531MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::FMopa2WayOp)
1532MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::FMopa2WayOpGenericAdaptorBase::Properties)
1533
1534namespace mlir::arm_sme {
1535
1536
1537//===----------------------------------------------------------------------===//
1538// ::mlir::arm_sme::FMops2WayOp declarations
1539//===----------------------------------------------------------------------===//
1540
1541namespace detail {
1542
1543class FMops2WayOpGenericAdaptorBase {
1544public:
1545 struct Properties {
1546 using operandSegmentSizesTy = std::array<int32_t, 5>;
1547 operandSegmentSizesTy operandSegmentSizes;
1548 ::llvm::ArrayRef<int32_t> getOperandSegmentSizes() const {
1549 auto &propStorage = this->operandSegmentSizes;
1550 return propStorage;
1551 }
1552 void setOperandSegmentSizes(::llvm::ArrayRef<int32_t> propValue) {
1553 auto &propStorage = this->operandSegmentSizes;
1554 ::llvm::copy(Range&: propValue, Out: propStorage.begin());
1555 }
1556 bool operator==(const Properties &rhs) const {
1557 return
1558 rhs.operandSegmentSizes == this->operandSegmentSizes &&
1559 true;
1560 }
1561 bool operator!=(const Properties &rhs) const {
1562 return !(*this == rhs);
1563 }
1564 };
1565protected:
1566 ::mlir::DictionaryAttr odsAttrs;
1567 ::std::optional<::mlir::OperationName> odsOpName;
1568 Properties properties;
1569 ::mlir::RegionRange odsRegions;
1570public:
1571 FMops2WayOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
1572 odsOpName.emplace(args: "arm_sme.fmops_2way", args: odsAttrs.getContext());
1573 }
1574
1575 FMops2WayOpGenericAdaptorBase(FMops2WayOp op);
1576
1577 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
1578 const Properties &getProperties() {
1579 return properties;
1580 }
1581
1582 ::mlir::DictionaryAttr getAttributes() {
1583 return odsAttrs;
1584 }
1585
1586};
1587
1588} // namespace detail
1589template <typename RangeT>
1590class FMops2WayOpGenericAdaptor : public detail::FMops2WayOpGenericAdaptorBase {
1591 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
1592 using Base = detail::FMops2WayOpGenericAdaptorBase;
1593 static constexpr int odsIndex_lhs = 0;
1594 static constexpr int odsIndex_rhs = 1;
1595 static constexpr int odsIndex_lhsMask = 2;
1596 static constexpr int odsIndex_rhsMask = 3;
1597 static constexpr int odsIndex_acc = 4;
1598public:
1599 FMops2WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
1600
1601 FMops2WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : FMops2WayOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
1602
1603 FMops2WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs) : FMops2WayOpGenericAdaptor(values, attrs, Properties{}, {}) {}
1604
1605 FMops2WayOpGenericAdaptor(RangeT values, const FMops2WayOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
1606
1607 template <typename LateInst = FMops2WayOp, typename = std::enable_if_t<std::is_same_v<LateInst, FMops2WayOp>>>
1608 FMops2WayOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
1609
1610 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
1611 return Base::getODSOperandIndexAndLength(index, odsOperandsSize: odsOperands.size());
1612 }
1613
1614 RangeT getODSOperands(unsigned index) {
1615 auto valueRange = getODSOperandIndexAndLength(index);
1616 return {std::next(odsOperands.begin(), valueRange.first),
1617 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
1618 }
1619
1620 ValueT getLhs() {
1621 return (*getODSOperands(index: 0).begin());
1622 }
1623
1624 ValueT getRhs() {
1625 return (*getODSOperands(index: 1).begin());
1626 }
1627
1628 ValueT getLhsMask() {
1629 auto operands = getODSOperands(index: 2);
1630 return operands.empty() ? ValueT{} : (*operands.begin());
1631 }
1632
1633 ValueT getRhsMask() {
1634 auto operands = getODSOperands(index: 3);
1635 return operands.empty() ? ValueT{} : (*operands.begin());
1636 }
1637
1638 ValueT getAcc() {
1639 auto operands = getODSOperands(index: 4);
1640 return operands.empty() ? ValueT{} : (*operands.begin());
1641 }
1642
1643 RangeT getOperands() {
1644 return odsOperands;
1645 }
1646
1647private:
1648 RangeT odsOperands;
1649};
1650class FMops2WayOpAdaptor : public FMops2WayOpGenericAdaptor<::mlir::ValueRange> {
1651public:
1652 using FMops2WayOpGenericAdaptor::FMops2WayOpGenericAdaptor;
1653 FMops2WayOpAdaptor(FMops2WayOp op);
1654
1655 ::llvm::LogicalResult verify(::mlir::Location loc);
1656};
1657class FMops2WayOp : public ::mlir::Op<FMops2WayOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<2>::Impl, ::mlir::OpTrait::AttrSizedOperandSegments, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::arm_sme::ArmSMETileOpInterface::Trait> {
1658public:
1659 using Op::Op;
1660 using Op::print;
1661 using Adaptor = FMops2WayOpAdaptor;
1662 template <typename RangeT>
1663 using GenericAdaptor = FMops2WayOpGenericAdaptor<RangeT>;
1664 using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
1665 static constexpr int odsIndex_lhs = 0;
1666 static constexpr int odsIndex_rhs = 1;
1667 static constexpr int odsIndex_lhsMask = 2;
1668 static constexpr int odsIndex_rhsMask = 3;
1669 static constexpr int odsIndex_acc = 4;
1670 static constexpr int odsIndex_result = 0;
1671 using Properties = FoldAdaptor::Properties;
1672 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
1673 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("operandSegmentSizes")};
1674 return ::llvm::ArrayRef(attrNames);
1675 }
1676
1677 ::mlir::StringAttr getOperandSegmentSizesAttrName() {
1678 return (*this)->getName().getAttributeNames().back();
1679 }
1680
1681 static ::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name) {
1682 return name.getAttributeNames().back();
1683 }
1684
1685 static constexpr ::llvm::StringLiteral getOperationName() {
1686 return ::llvm::StringLiteral("arm_sme.fmops_2way");
1687 }
1688
1689 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
1690 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
1691 auto [start, length] = getODSOperandIndexAndLength(index);
1692 return getOperation()->getOperands().slice(n: start, m: length);
1693 }
1694
1695 ::mlir::TypedValue<::mlir::Type> getLhs() {
1696 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(Val: *getODSOperands(index: 0).begin());
1697 }
1698
1699 ::mlir::TypedValue<::mlir::VectorType> getRhs() {
1700 return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *getODSOperands(index: 1).begin());
1701 }
1702
1703 ::mlir::TypedValue<::mlir::VectorType> getLhsMask() {
1704 auto operands = getODSOperands(index: 2);
1705 return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *operands.begin());
1706 }
1707
1708 ::mlir::TypedValue<::mlir::VectorType> getRhsMask() {
1709 auto operands = getODSOperands(index: 3);
1710 return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *operands.begin());
1711 }
1712
1713 ::mlir::TypedValue<::mlir::VectorType> getAcc() {
1714 auto operands = getODSOperands(index: 4);
1715 return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *operands.begin());
1716 }
1717
1718 ::mlir::OpOperand &getLhsMutable() {
1719 auto range = getODSOperandIndexAndLength(index: 0);
1720 return getOperation()->getOpOperand(idx: range.first);
1721 }
1722
1723 ::mlir::OpOperand &getRhsMutable() {
1724 auto range = getODSOperandIndexAndLength(index: 1);
1725 return getOperation()->getOpOperand(idx: range.first);
1726 }
1727
1728 ::mlir::MutableOperandRange getLhsMaskMutable();
1729 ::mlir::MutableOperandRange getRhsMaskMutable();
1730 ::mlir::MutableOperandRange getAccMutable();
1731 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
1732 return {index, 1};
1733 }
1734
1735 ::mlir::Operation::result_range getODSResults(unsigned index) {
1736 auto valueRange = getODSResultIndexAndLength(index);
1737 return {std::next(x: getOperation()->result_begin(), n: valueRange.first),
1738 std::next(x: getOperation()->result_begin(), n: valueRange.first + valueRange.second)};
1739 }
1740
1741 ::mlir::TypedValue<::mlir::Type> getResult() {
1742 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(Val: *getODSResults(index: 0).begin());
1743 }
1744
1745 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1746 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
1747 static llvm::hash_code computePropertiesHash(const Properties &prop);
1748 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
1749 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
1750 static void walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor);
1751 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1752 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
1753 void writeProperties(::mlir::DialectBytecodeWriter &writer);
1754 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
1755 static FMops2WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
1756 static FMops2WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
1757 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
1758 static FMops2WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
1759 static FMops2WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
1760 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
1761 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1762 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
1763 static FMops2WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1764 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
1765 static FMops2WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1766 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1767 static FMops2WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1768 static FMops2WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1769 ::llvm::LogicalResult verifyInvariantsImpl();
1770 ::llvm::LogicalResult verifyInvariants();
1771 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
1772 LLVM_ATTRIBUTE_MINSIZE void print(::mlir::OpAsmPrinter &_odsPrinter);
1773 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
1774private:
1775 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
1776 return getAttributeNameForIndex(name: (*this)->getName(), index);
1777 }
1778
1779 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
1780 return {};
1781 }
1782
1783 static void buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes);
1784public:
1785 VectorType getLhsType() { return llvm::cast<VectorType>(Val: getLhs().getType()); }
1786 VectorType getRhsType() { return llvm::cast<VectorType>(Val: getRhs().getType()); }
1787 VectorType getResultType() { return llvm::cast<VectorType>(Val: getResult().getType()); }
1788 VectorType getTileType() {
1789 return getResultType();
1790 }
1791};
1792
1793} // namespace mlir::arm_sme
1794MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::FMops2WayOp)
1795MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::FMops2WayOpGenericAdaptorBase::Properties)
1796
1797namespace mlir::arm_sme {
1798
1799
1800//===----------------------------------------------------------------------===//
1801// ::mlir::arm_sme::GetTileOp declarations
1802//===----------------------------------------------------------------------===//
1803
1804namespace detail {
1805
1806class GetTileOpGenericAdaptorBase {
1807public:
1808 using Properties = ::mlir::EmptyProperties;
1809protected:
1810 ::mlir::DictionaryAttr odsAttrs;
1811 ::std::optional<::mlir::OperationName> odsOpName;
1812 Properties properties;
1813 ::mlir::RegionRange odsRegions;
1814public:
1815 GetTileOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
1816 odsOpName.emplace(args: "arm_sme.get_tile", args: odsAttrs.getContext());
1817 }
1818
1819 GetTileOpGenericAdaptorBase(GetTileOp op);
1820
1821 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
1822 return {index, 1};
1823 }
1824
1825 const Properties &getProperties() {
1826 return properties;
1827 }
1828
1829 ::mlir::DictionaryAttr getAttributes() {
1830 return odsAttrs;
1831 }
1832
1833};
1834
1835} // namespace detail
1836template <typename RangeT>
1837class GetTileOpGenericAdaptor : public detail::GetTileOpGenericAdaptorBase {
1838 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
1839 using Base = detail::GetTileOpGenericAdaptorBase;
1840public:
1841 GetTileOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
1842
1843 GetTileOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : GetTileOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
1844
1845 GetTileOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : GetTileOpGenericAdaptor(values, attrs, Properties{}, {}) {}
1846
1847 GetTileOpGenericAdaptor(RangeT values, const GetTileOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
1848
1849 template <typename LateInst = GetTileOp, typename = std::enable_if_t<std::is_same_v<LateInst, GetTileOp>>>
1850 GetTileOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
1851
1852 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
1853 return Base::getODSOperandIndexAndLength(index, odsOperandsSize: odsOperands.size());
1854 }
1855
1856 RangeT getODSOperands(unsigned index) {
1857 auto valueRange = getODSOperandIndexAndLength(index);
1858 return {std::next(odsOperands.begin(), valueRange.first),
1859 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
1860 }
1861
1862 RangeT getOperands() {
1863 return odsOperands;
1864 }
1865
1866private:
1867 RangeT odsOperands;
1868};
1869class GetTileOpAdaptor : public GetTileOpGenericAdaptor<::mlir::ValueRange> {
1870public:
1871 using GetTileOpGenericAdaptor::GetTileOpGenericAdaptor;
1872 GetTileOpAdaptor(GetTileOp op);
1873
1874 ::llvm::LogicalResult verify(::mlir::Location loc);
1875};
1876class GetTileOp : public ::mlir::Op<GetTileOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<VectorType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::arm_sme::ArmSMETileOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> {
1877public:
1878 using Op::Op;
1879 using Op::print;
1880 using Adaptor = GetTileOpAdaptor;
1881 template <typename RangeT>
1882 using GenericAdaptor = GetTileOpGenericAdaptor<RangeT>;
1883 using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
1884 static constexpr int odsIndex_tile = 0;
1885 using Properties = FoldAdaptor::Properties;
1886 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
1887 return {};
1888 }
1889
1890 static constexpr ::llvm::StringLiteral getOperationName() {
1891 return ::llvm::StringLiteral("arm_sme.get_tile");
1892 }
1893
1894 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
1895 return {index, 1};
1896 }
1897
1898 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
1899 auto [start, length] = getODSOperandIndexAndLength(index);
1900 return getOperation()->getOperands().slice(n: start, m: length);
1901 }
1902
1903 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
1904 return {index, 1};
1905 }
1906
1907 ::mlir::Operation::result_range getODSResults(unsigned index) {
1908 auto valueRange = getODSResultIndexAndLength(index);
1909 return {std::next(x: getOperation()->result_begin(), n: valueRange.first),
1910 std::next(x: getOperation()->result_begin(), n: valueRange.first + valueRange.second)};
1911 }
1912
1913 ::mlir::TypedValue<VectorType> getTile() {
1914 return ::llvm::cast<::mlir::TypedValue<VectorType>>(Val: *getODSResults(index: 0).begin());
1915 }
1916
1917 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1918 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
1919 static llvm::hash_code computePropertiesHash(const Properties &prop);
1920 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
1921 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
1922 static void walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor);
1923 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1924 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type tile);
1925 static GetTileOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type tile);
1926 static GetTileOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type tile);
1927 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
1928 static GetTileOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
1929 static GetTileOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
1930 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1931 static GetTileOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1932 static GetTileOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1933 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1934 static GetTileOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1935 static GetTileOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1936 ::llvm::LogicalResult verifyInvariantsImpl();
1937 ::llvm::LogicalResult verifyInvariants();
1938 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
1939 LLVM_ATTRIBUTE_MINSIZE void print(::mlir::OpAsmPrinter &_odsPrinter);
1940 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
1941public:
1942 VectorType getTileType() {
1943 return ::llvm::cast<VectorType>(Val: getTile().getType());
1944 }
1945};
1946
1947} // namespace mlir::arm_sme
1948MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::GetTileOp)
1949
1950namespace mlir::arm_sme {
1951
1952
1953//===----------------------------------------------------------------------===//
1954// ::mlir::arm_sme::InsertTileSliceOp declarations
1955//===----------------------------------------------------------------------===//
1956
1957namespace detail {
1958
1959class InsertTileSliceOpGenericAdaptorBase {
1960public:
1961 struct Properties {
1962 using layoutTy = ::mlir::arm_sme::TileSliceLayoutAttr;
1963 layoutTy layout;
1964
1965 auto getLayout() const {
1966 auto &propStorage = this->layout;
1967 return ::llvm::dyn_cast_or_null<::mlir::arm_sme::TileSliceLayoutAttr>(Val: propStorage);
1968 }
1969 void setLayout(const ::mlir::arm_sme::TileSliceLayoutAttr &propValue) {
1970 this->layout = propValue;
1971 }
1972 bool operator==(const Properties &rhs) const {
1973 return
1974 rhs.layout == this->layout &&
1975 true;
1976 }
1977 bool operator!=(const Properties &rhs) const {
1978 return !(*this == rhs);
1979 }
1980 };
1981protected:
1982 ::mlir::DictionaryAttr odsAttrs;
1983 ::std::optional<::mlir::OperationName> odsOpName;
1984 Properties properties;
1985 ::mlir::RegionRange odsRegions;
1986public:
1987 InsertTileSliceOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
1988 odsOpName.emplace(args: "arm_sme.insert_tile_slice", args: odsAttrs.getContext());
1989 }
1990
1991 InsertTileSliceOpGenericAdaptorBase(InsertTileSliceOp op);
1992
1993 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
1994 return {index, 1};
1995 }
1996
1997 const Properties &getProperties() {
1998 return properties;
1999 }
2000
2001 ::mlir::DictionaryAttr getAttributes() {
2002 return odsAttrs;
2003 }
2004
2005 ::mlir::arm_sme::TileSliceLayoutAttr getLayoutAttr();
2006 ::mlir::arm_sme::TileSliceLayout getLayout();
2007};
2008
2009} // namespace detail
2010template <typename RangeT>
2011class InsertTileSliceOpGenericAdaptor : public detail::InsertTileSliceOpGenericAdaptorBase {
2012 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
2013 using Base = detail::InsertTileSliceOpGenericAdaptorBase;
2014 static constexpr int odsIndex_vector = 0;
2015 static constexpr int odsIndex_tile = 1;
2016 static constexpr int odsIndex_tile_slice_index = 2;
2017public:
2018 InsertTileSliceOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
2019
2020 InsertTileSliceOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : InsertTileSliceOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
2021
2022 InsertTileSliceOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : InsertTileSliceOpGenericAdaptor(values, attrs, Properties{}, {}) {}
2023
2024 InsertTileSliceOpGenericAdaptor(RangeT values, const InsertTileSliceOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
2025
2026 template <typename LateInst = InsertTileSliceOp, typename = std::enable_if_t<std::is_same_v<LateInst, InsertTileSliceOp>>>
2027 InsertTileSliceOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
2028
2029 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
2030 return Base::getODSOperandIndexAndLength(index, odsOperandsSize: odsOperands.size());
2031 }
2032
2033 RangeT getODSOperands(unsigned index) {
2034 auto valueRange = getODSOperandIndexAndLength(index);
2035 return {std::next(odsOperands.begin(), valueRange.first),
2036 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
2037 }
2038
2039 ValueT getVector() {
2040 return (*getODSOperands(index: 0).begin());
2041 }
2042
2043 ValueT getTile() {
2044 return (*getODSOperands(index: 1).begin());
2045 }
2046
2047 ValueT getTileSliceIndex() {
2048 return (*getODSOperands(index: 2).begin());
2049 }
2050
2051 RangeT getOperands() {
2052 return odsOperands;
2053 }
2054
2055private:
2056 RangeT odsOperands;
2057};
2058class InsertTileSliceOpAdaptor : public InsertTileSliceOpGenericAdaptor<::mlir::ValueRange> {
2059public:
2060 using InsertTileSliceOpGenericAdaptor::InsertTileSliceOpGenericAdaptor;
2061 InsertTileSliceOpAdaptor(InsertTileSliceOp op);
2062
2063 ::llvm::LogicalResult verify(::mlir::Location loc);
2064};
2065class InsertTileSliceOp : public ::mlir::Op<InsertTileSliceOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<VectorType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<3>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::arm_sme::ArmSMETileOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
2066public:
2067 using Op::Op;
2068 using Op::print;
2069 using Adaptor = InsertTileSliceOpAdaptor;
2070 template <typename RangeT>
2071 using GenericAdaptor = InsertTileSliceOpGenericAdaptor<RangeT>;
2072 using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
2073 static constexpr int odsIndex_vector = 0;
2074 static constexpr int odsIndex_tile = 1;
2075 static constexpr int odsIndex_tile_slice_index = 2;
2076 static constexpr int odsIndex_result = 0;
2077 using Properties = FoldAdaptor::Properties;
2078 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
2079 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("layout")};
2080 return ::llvm::ArrayRef(attrNames);
2081 }
2082
2083 ::mlir::StringAttr getLayoutAttrName() {
2084 return getAttributeNameForIndex(index: 0);
2085 }
2086
2087 static ::mlir::StringAttr getLayoutAttrName(::mlir::OperationName name) {
2088 return getAttributeNameForIndex(name, index: 0);
2089 }
2090
2091 static constexpr ::llvm::StringLiteral getOperationName() {
2092 return ::llvm::StringLiteral("arm_sme.insert_tile_slice");
2093 }
2094
2095 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
2096 return {index, 1};
2097 }
2098
2099 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
2100 auto [start, length] = getODSOperandIndexAndLength(index);
2101 return getOperation()->getOperands().slice(n: start, m: length);
2102 }
2103
2104 ::mlir::TypedValue<::mlir::VectorType> getVector() {
2105 return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *getODSOperands(index: 0).begin());
2106 }
2107
2108 ::mlir::TypedValue<VectorType> getTile() {
2109 return ::llvm::cast<::mlir::TypedValue<VectorType>>(Val: *getODSOperands(index: 1).begin());
2110 }
2111
2112 ::mlir::TypedValue<::mlir::IndexType> getTileSliceIndex() {
2113 return ::llvm::cast<::mlir::TypedValue<::mlir::IndexType>>(Val: *getODSOperands(index: 2).begin());
2114 }
2115
2116 ::mlir::OpOperand &getVectorMutable() {
2117 auto range = getODSOperandIndexAndLength(index: 0);
2118 return getOperation()->getOpOperand(idx: range.first);
2119 }
2120
2121 ::mlir::OpOperand &getTileMutable() {
2122 auto range = getODSOperandIndexAndLength(index: 1);
2123 return getOperation()->getOpOperand(idx: range.first);
2124 }
2125
2126 ::mlir::OpOperand &getTileSliceIndexMutable() {
2127 auto range = getODSOperandIndexAndLength(index: 2);
2128 return getOperation()->getOpOperand(idx: range.first);
2129 }
2130
2131 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
2132 return {index, 1};
2133 }
2134
2135 ::mlir::Operation::result_range getODSResults(unsigned index) {
2136 auto valueRange = getODSResultIndexAndLength(index);
2137 return {std::next(x: getOperation()->result_begin(), n: valueRange.first),
2138 std::next(x: getOperation()->result_begin(), n: valueRange.first + valueRange.second)};
2139 }
2140
2141 ::mlir::TypedValue<VectorType> getResult() {
2142 return ::llvm::cast<::mlir::TypedValue<VectorType>>(Val: *getODSResults(index: 0).begin());
2143 }
2144
2145 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
2146 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
2147 static llvm::hash_code computePropertiesHash(const Properties &prop);
2148 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
2149 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
2150 static void walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor);
2151 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
2152 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
2153 void writeProperties(::mlir::DialectBytecodeWriter &writer);
2154 ::mlir::arm_sme::TileSliceLayoutAttr getLayoutAttr() {
2155 return ::llvm::dyn_cast_or_null<::mlir::arm_sme::TileSliceLayoutAttr>(Val&: getProperties().layout);
2156 }
2157
2158 ::mlir::arm_sme::TileSliceLayout getLayout();
2159 void setLayoutAttr(::mlir::arm_sme::TileSliceLayoutAttr attr) {
2160 getProperties().layout = attr;
2161 }
2162
2163 void setLayout(::mlir::arm_sme::TileSliceLayout attrValue);
2164 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value vector, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayoutAttr layout);
2165 static InsertTileSliceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value vector, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayoutAttr layout);
2166 static InsertTileSliceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value vector, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayoutAttr layout);
2167 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value vector, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayoutAttr layout);
2168 static InsertTileSliceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value vector, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayoutAttr layout);
2169 static InsertTileSliceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value vector, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayoutAttr layout);
2170 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value vector, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayoutAttr layout);
2171 static InsertTileSliceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value vector, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayoutAttr layout);
2172 static InsertTileSliceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value vector, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayoutAttr layout);
2173 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value vector, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayout layout = TileSliceLayout::Horizontal);
2174 static InsertTileSliceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value vector, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayout layout = TileSliceLayout::Horizontal);
2175 static InsertTileSliceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value vector, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayout layout = TileSliceLayout::Horizontal);
2176 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value vector, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayout layout = TileSliceLayout::Horizontal);
2177 static InsertTileSliceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value vector, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayout layout = TileSliceLayout::Horizontal);
2178 static InsertTileSliceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value vector, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayout layout = TileSliceLayout::Horizontal);
2179 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value vector, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayout layout = TileSliceLayout::Horizontal);
2180 static InsertTileSliceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value vector, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayout layout = TileSliceLayout::Horizontal);
2181 static InsertTileSliceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value vector, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayout layout = TileSliceLayout::Horizontal);
2182 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
2183 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
2184 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
2185 static InsertTileSliceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
2186 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
2187 static InsertTileSliceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
2188 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
2189 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
2190 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
2191 static InsertTileSliceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
2192 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
2193 static InsertTileSliceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
2194 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
2195 static InsertTileSliceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
2196 static InsertTileSliceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
2197 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
2198 static InsertTileSliceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
2199 static InsertTileSliceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
2200 static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
2201 ::llvm::LogicalResult verifyInvariantsImpl();
2202 ::llvm::LogicalResult verifyInvariants();
2203 static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
2204 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
2205 LLVM_ATTRIBUTE_MINSIZE void print(::mlir::OpAsmPrinter &_odsPrinter);
2206 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
2207private:
2208 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
2209 return getAttributeNameForIndex(name: (*this)->getName(), index);
2210 }
2211
2212 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
2213 assert(index < 1 && "invalid attribute index");
2214 assert(name.getStringRef() == getOperationName() && "invalid operation name");
2215 assert(name.isRegistered() && "Operation isn't registered, missing a "
2216 "dependent dialect loading?");
2217 return name.getAttributeNames()[index];
2218 }
2219
2220 static void buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes);
2221public:
2222 VectorType getTileType() {
2223 return ::llvm::cast<VectorType>(Val: getTile().getType());
2224 }
2225};
2226
2227} // namespace mlir::arm_sme
2228MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::InsertTileSliceOp)
2229MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::InsertTileSliceOpGenericAdaptorBase::Properties)
2230
2231namespace mlir::arm_sme {
2232
2233
2234//===----------------------------------------------------------------------===//
2235// ::mlir::arm_sme::LoadTileSliceOp declarations
2236//===----------------------------------------------------------------------===//
2237
2238namespace detail {
2239
2240class LoadTileSliceOpGenericAdaptorBase {
2241public:
2242 struct Properties {
2243 using layoutTy = ::mlir::arm_sme::TileSliceLayoutAttr;
2244 layoutTy layout;
2245
2246 auto getLayout() const {
2247 auto &propStorage = this->layout;
2248 return ::llvm::dyn_cast_or_null<::mlir::arm_sme::TileSliceLayoutAttr>(Val: propStorage);
2249 }
2250 void setLayout(const ::mlir::arm_sme::TileSliceLayoutAttr &propValue) {
2251 this->layout = propValue;
2252 }
2253 bool operator==(const Properties &rhs) const {
2254 return
2255 rhs.layout == this->layout &&
2256 true;
2257 }
2258 bool operator!=(const Properties &rhs) const {
2259 return !(*this == rhs);
2260 }
2261 };
2262protected:
2263 ::mlir::DictionaryAttr odsAttrs;
2264 ::std::optional<::mlir::OperationName> odsOpName;
2265 Properties properties;
2266 ::mlir::RegionRange odsRegions;
2267public:
2268 LoadTileSliceOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
2269 odsOpName.emplace(args: "arm_sme.load_tile_slice", args: odsAttrs.getContext());
2270 }
2271
2272 LoadTileSliceOpGenericAdaptorBase(LoadTileSliceOp op);
2273
2274 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
2275 const Properties &getProperties() {
2276 return properties;
2277 }
2278
2279 ::mlir::DictionaryAttr getAttributes() {
2280 return odsAttrs;
2281 }
2282
2283 ::mlir::arm_sme::TileSliceLayoutAttr getLayoutAttr();
2284 ::mlir::arm_sme::TileSliceLayout getLayout();
2285};
2286
2287} // namespace detail
2288template <typename RangeT>
2289class LoadTileSliceOpGenericAdaptor : public detail::LoadTileSliceOpGenericAdaptorBase {
2290 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
2291 using Base = detail::LoadTileSliceOpGenericAdaptorBase;
2292 static constexpr int odsIndex_base = 0;
2293 static constexpr int odsIndex_mask = 1;
2294 static constexpr int odsIndex_tile = 2;
2295 static constexpr int odsIndex_indices = 3;
2296 static constexpr int odsIndex_tile_slice_index = 4;
2297public:
2298 LoadTileSliceOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
2299
2300 LoadTileSliceOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : LoadTileSliceOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
2301
2302 LoadTileSliceOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : LoadTileSliceOpGenericAdaptor(values, attrs, Properties{}, {}) {}
2303
2304 LoadTileSliceOpGenericAdaptor(RangeT values, const LoadTileSliceOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
2305
2306 template <typename LateInst = LoadTileSliceOp, typename = std::enable_if_t<std::is_same_v<LateInst, LoadTileSliceOp>>>
2307 LoadTileSliceOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
2308
2309 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
2310 return Base::getODSOperandIndexAndLength(index, odsOperandsSize: odsOperands.size());
2311 }
2312
2313 RangeT getODSOperands(unsigned index) {
2314 auto valueRange = getODSOperandIndexAndLength(index);
2315 return {std::next(odsOperands.begin(), valueRange.first),
2316 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
2317 }
2318
2319 ValueT getBase() {
2320 return (*getODSOperands(index: 0).begin());
2321 }
2322
2323 ValueT getMask() {
2324 return (*getODSOperands(index: 1).begin());
2325 }
2326
2327 ValueT getTile() {
2328 return (*getODSOperands(index: 2).begin());
2329 }
2330
2331 RangeT getIndices() {
2332 return getODSOperands(index: 3);
2333 }
2334
2335 ValueT getTileSliceIndex() {
2336 return (*getODSOperands(index: 4).begin());
2337 }
2338
2339 RangeT getOperands() {
2340 return odsOperands;
2341 }
2342
2343private:
2344 RangeT odsOperands;
2345};
2346class LoadTileSliceOpAdaptor : public LoadTileSliceOpGenericAdaptor<::mlir::ValueRange> {
2347public:
2348 using LoadTileSliceOpGenericAdaptor::LoadTileSliceOpGenericAdaptor;
2349 LoadTileSliceOpAdaptor(LoadTileSliceOp op);
2350
2351 ::llvm::LogicalResult verify(::mlir::Location loc);
2352};
2353class LoadTileSliceOp : public ::mlir::Op<LoadTileSliceOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<VectorType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<4>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::arm_sme::ArmSMETileOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait, ::mlir::MemoryEffectOpInterface::Trait> {
2354public:
2355 using Op::Op;
2356 using Op::print;
2357 using Adaptor = LoadTileSliceOpAdaptor;
2358 template <typename RangeT>
2359 using GenericAdaptor = LoadTileSliceOpGenericAdaptor<RangeT>;
2360 using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
2361 static constexpr int odsIndex_base = 0;
2362 static constexpr int odsIndex_mask = 1;
2363 static constexpr int odsIndex_tile = 2;
2364 static constexpr int odsIndex_indices = 3;
2365 static constexpr int odsIndex_tile_slice_index = 4;
2366 static constexpr int odsIndex_result = 0;
2367 using Properties = FoldAdaptor::Properties;
2368 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
2369 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("layout")};
2370 return ::llvm::ArrayRef(attrNames);
2371 }
2372
2373 ::mlir::StringAttr getLayoutAttrName() {
2374 return getAttributeNameForIndex(index: 0);
2375 }
2376
2377 static ::mlir::StringAttr getLayoutAttrName(::mlir::OperationName name) {
2378 return getAttributeNameForIndex(name, index: 0);
2379 }
2380
2381 static constexpr ::llvm::StringLiteral getOperationName() {
2382 return ::llvm::StringLiteral("arm_sme.load_tile_slice");
2383 }
2384
2385 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
2386 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
2387 auto [start, length] = getODSOperandIndexAndLength(index);
2388 return getOperation()->getOperands().slice(n: start, m: length);
2389 }
2390
2391 ::mlir::TypedValue<::mlir::MemRefType> getBase() {
2392 return ::llvm::cast<::mlir::TypedValue<::mlir::MemRefType>>(Val: *getODSOperands(index: 0).begin());
2393 }
2394
2395 ::mlir::TypedValue<::mlir::VectorType> getMask() {
2396 return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *getODSOperands(index: 1).begin());
2397 }
2398
2399 ::mlir::TypedValue<VectorType> getTile() {
2400 return ::llvm::cast<::mlir::TypedValue<VectorType>>(Val: *getODSOperands(index: 2).begin());
2401 }
2402
2403 ::mlir::Operation::operand_range getIndices() {
2404 return getODSOperands(index: 3);
2405 }
2406
2407 ::mlir::TypedValue<::mlir::IndexType> getTileSliceIndex() {
2408 return ::llvm::cast<::mlir::TypedValue<::mlir::IndexType>>(Val: *getODSOperands(index: 4).begin());
2409 }
2410
2411 ::mlir::OpOperand &getBaseMutable() {
2412 auto range = getODSOperandIndexAndLength(index: 0);
2413 return getOperation()->getOpOperand(idx: range.first);
2414 }
2415
2416 ::mlir::OpOperand &getMaskMutable() {
2417 auto range = getODSOperandIndexAndLength(index: 1);
2418 return getOperation()->getOpOperand(idx: range.first);
2419 }
2420
2421 ::mlir::OpOperand &getTileMutable() {
2422 auto range = getODSOperandIndexAndLength(index: 2);
2423 return getOperation()->getOpOperand(idx: range.first);
2424 }
2425
2426 ::mlir::MutableOperandRange getIndicesMutable();
2427 ::mlir::OpOperand &getTileSliceIndexMutable() {
2428 auto range = getODSOperandIndexAndLength(index: 4);
2429 return getOperation()->getOpOperand(idx: range.first);
2430 }
2431
2432 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
2433 return {index, 1};
2434 }
2435
2436 ::mlir::Operation::result_range getODSResults(unsigned index) {
2437 auto valueRange = getODSResultIndexAndLength(index);
2438 return {std::next(x: getOperation()->result_begin(), n: valueRange.first),
2439 std::next(x: getOperation()->result_begin(), n: valueRange.first + valueRange.second)};
2440 }
2441
2442 ::mlir::TypedValue<VectorType> getResult() {
2443 return ::llvm::cast<::mlir::TypedValue<VectorType>>(Val: *getODSResults(index: 0).begin());
2444 }
2445
2446 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
2447 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
2448 static llvm::hash_code computePropertiesHash(const Properties &prop);
2449 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
2450 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
2451 static void walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor);
2452 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
2453 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
2454 void writeProperties(::mlir::DialectBytecodeWriter &writer);
2455 ::mlir::arm_sme::TileSliceLayoutAttr getLayoutAttr() {
2456 return ::llvm::dyn_cast_or_null<::mlir::arm_sme::TileSliceLayoutAttr>(Val&: getProperties().layout);
2457 }
2458
2459 ::mlir::arm_sme::TileSliceLayout getLayout();
2460 void setLayoutAttr(::mlir::arm_sme::TileSliceLayoutAttr attr) {
2461 getProperties().layout = attr;
2462 }
2463
2464 void setLayout(::mlir::arm_sme::TileSliceLayout attrValue);
2465 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value base, ::mlir::Value mask, ::mlir::Value tile, ::mlir::ValueRange indices, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayoutAttr layout);
2466 static LoadTileSliceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value base, ::mlir::Value mask, ::mlir::Value tile, ::mlir::ValueRange indices, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayoutAttr layout);
2467 static LoadTileSliceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value base, ::mlir::Value mask, ::mlir::Value tile, ::mlir::ValueRange indices, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayoutAttr layout);
2468 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value base, ::mlir::Value mask, ::mlir::Value tile, ::mlir::ValueRange indices, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayoutAttr layout);
2469 static LoadTileSliceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value base, ::mlir::Value mask, ::mlir::Value tile, ::mlir::ValueRange indices, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayoutAttr layout);
2470 static LoadTileSliceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value base, ::mlir::Value mask, ::mlir::Value tile, ::mlir::ValueRange indices, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayoutAttr layout);
2471 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value base, ::mlir::Value mask, ::mlir::Value tile, ::mlir::ValueRange indices, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayoutAttr layout);
2472 static LoadTileSliceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value base, ::mlir::Value mask, ::mlir::Value tile, ::mlir::ValueRange indices, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayoutAttr layout);
2473 static LoadTileSliceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value base, ::mlir::Value mask, ::mlir::Value tile, ::mlir::ValueRange indices, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayoutAttr layout);
2474 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value base, ::mlir::Value mask, ::mlir::Value tile, ::mlir::ValueRange indices, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayout layout = TileSliceLayout::Horizontal);
2475 static LoadTileSliceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value base, ::mlir::Value mask, ::mlir::Value tile, ::mlir::ValueRange indices, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayout layout = TileSliceLayout::Horizontal);
2476 static LoadTileSliceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value base, ::mlir::Value mask, ::mlir::Value tile, ::mlir::ValueRange indices, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayout layout = TileSliceLayout::Horizontal);
2477 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value base, ::mlir::Value mask, ::mlir::Value tile, ::mlir::ValueRange indices, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayout layout = TileSliceLayout::Horizontal);
2478 static LoadTileSliceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value base, ::mlir::Value mask, ::mlir::Value tile, ::mlir::ValueRange indices, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayout layout = TileSliceLayout::Horizontal);
2479 static LoadTileSliceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value base, ::mlir::Value mask, ::mlir::Value tile, ::mlir::ValueRange indices, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayout layout = TileSliceLayout::Horizontal);
2480 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value base, ::mlir::Value mask, ::mlir::Value tile, ::mlir::ValueRange indices, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayout layout = TileSliceLayout::Horizontal);
2481 static LoadTileSliceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value base, ::mlir::Value mask, ::mlir::Value tile, ::mlir::ValueRange indices, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayout layout = TileSliceLayout::Horizontal);
2482 static LoadTileSliceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value base, ::mlir::Value mask, ::mlir::Value tile, ::mlir::ValueRange indices, ::mlir::Value tile_slice_index, ::mlir::arm_sme::TileSliceLayout layout = TileSliceLayout::Horizontal);
2483 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
2484 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
2485 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
2486 static LoadTileSliceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
2487 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
2488 static LoadTileSliceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
2489 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
2490 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
2491 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
2492 static LoadTileSliceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
2493 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
2494 static LoadTileSliceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
2495 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
2496 static LoadTileSliceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
2497 static LoadTileSliceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
2498 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
2499 static LoadTileSliceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
2500 static LoadTileSliceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
2501 static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
2502 ::llvm::LogicalResult verifyInvariantsImpl();
2503 ::llvm::LogicalResult verifyInvariants();
2504 static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
2505 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
2506 LLVM_ATTRIBUTE_MINSIZE void print(::mlir::OpAsmPrinter &_odsPrinter);
2507 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
2508private:
2509 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
2510 return getAttributeNameForIndex(name: (*this)->getName(), index);
2511 }
2512
2513 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
2514 assert(index < 1 && "invalid attribute index");
2515 assert(name.getStringRef() == getOperationName() && "invalid operation name");
2516 assert(name.isRegistered() && "Operation isn't registered, missing a "
2517 "dependent dialect loading?");
2518 return name.getAttributeNames()[index];
2519 }
2520
2521 static void buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes);
2522public:
2523 MemRefType getMemRefType() {
2524 return ::llvm::cast<MemRefType>(Val: getBase().getType());
2525 }
2526 VectorType getVectorType() {
2527 return ::llvm::cast<VectorType>(Val: getResult().getType());
2528 }
2529 VectorType getTileType() {
2530 return getVectorType();
2531 }
2532};
2533
2534} // namespace mlir::arm_sme
2535MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::LoadTileSliceOp)
2536MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::LoadTileSliceOpGenericAdaptorBase::Properties)
2537
2538namespace mlir::arm_sme {
2539
2540
2541//===----------------------------------------------------------------------===//
2542// ::mlir::arm_sme::OuterProductOp declarations
2543//===----------------------------------------------------------------------===//
2544
2545namespace detail {
2546
2547class OuterProductOpGenericAdaptorBase {
2548public:
2549 struct Properties {
2550 using kindTy = ::mlir::arm_sme::CombiningKindAttr;
2551 kindTy kind;
2552
2553 auto getKind() const {
2554 auto &propStorage = this->kind;
2555 return ::llvm::dyn_cast_or_null<::mlir::arm_sme::CombiningKindAttr>(Val: propStorage);
2556 }
2557 void setKind(const ::mlir::arm_sme::CombiningKindAttr &propValue) {
2558 this->kind = propValue;
2559 }
2560 using operandSegmentSizesTy = std::array<int32_t, 5>;
2561 operandSegmentSizesTy operandSegmentSizes;
2562 ::llvm::ArrayRef<int32_t> getOperandSegmentSizes() const {
2563 auto &propStorage = this->operandSegmentSizes;
2564 return propStorage;
2565 }
2566 void setOperandSegmentSizes(::llvm::ArrayRef<int32_t> propValue) {
2567 auto &propStorage = this->operandSegmentSizes;
2568 ::llvm::copy(Range&: propValue, Out: propStorage.begin());
2569 }
2570 bool operator==(const Properties &rhs) const {
2571 return
2572 rhs.kind == this->kind &&
2573 rhs.operandSegmentSizes == this->operandSegmentSizes &&
2574 true;
2575 }
2576 bool operator!=(const Properties &rhs) const {
2577 return !(*this == rhs);
2578 }
2579 };
2580protected:
2581 ::mlir::DictionaryAttr odsAttrs;
2582 ::std::optional<::mlir::OperationName> odsOpName;
2583 Properties properties;
2584 ::mlir::RegionRange odsRegions;
2585public:
2586 OuterProductOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
2587 odsOpName.emplace(args: "arm_sme.outerproduct", args: odsAttrs.getContext());
2588 }
2589
2590 OuterProductOpGenericAdaptorBase(OuterProductOp op);
2591
2592 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
2593 const Properties &getProperties() {
2594 return properties;
2595 }
2596
2597 ::mlir::DictionaryAttr getAttributes() {
2598 return odsAttrs;
2599 }
2600
2601 ::mlir::arm_sme::CombiningKindAttr getKindAttr();
2602 ::mlir::arm_sme::CombiningKind getKind();
2603};
2604
2605} // namespace detail
2606template <typename RangeT>
2607class OuterProductOpGenericAdaptor : public detail::OuterProductOpGenericAdaptorBase {
2608 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
2609 using Base = detail::OuterProductOpGenericAdaptorBase;
2610 static constexpr int odsIndex_lhs = 0;
2611 static constexpr int odsIndex_rhs = 1;
2612 static constexpr int odsIndex_lhsMask = 2;
2613 static constexpr int odsIndex_rhsMask = 3;
2614 static constexpr int odsIndex_acc = 4;
2615public:
2616 OuterProductOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
2617
2618 OuterProductOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : OuterProductOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
2619
2620 OuterProductOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs) : OuterProductOpGenericAdaptor(values, attrs, Properties{}, {}) {}
2621
2622 OuterProductOpGenericAdaptor(RangeT values, const OuterProductOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
2623
2624 template <typename LateInst = OuterProductOp, typename = std::enable_if_t<std::is_same_v<LateInst, OuterProductOp>>>
2625 OuterProductOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
2626
2627 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
2628 return Base::getODSOperandIndexAndLength(index, odsOperandsSize: odsOperands.size());
2629 }
2630
2631 RangeT getODSOperands(unsigned index) {
2632 auto valueRange = getODSOperandIndexAndLength(index);
2633 return {std::next(odsOperands.begin(), valueRange.first),
2634 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
2635 }
2636
2637 ValueT getLhs() {
2638 return (*getODSOperands(index: 0).begin());
2639 }
2640
2641 ValueT getRhs() {
2642 return (*getODSOperands(index: 1).begin());
2643 }
2644
2645 ValueT getLhsMask() {
2646 auto operands = getODSOperands(index: 2);
2647 return operands.empty() ? ValueT{} : (*operands.begin());
2648 }
2649
2650 ValueT getRhsMask() {
2651 auto operands = getODSOperands(index: 3);
2652 return operands.empty() ? ValueT{} : (*operands.begin());
2653 }
2654
2655 ValueT getAcc() {
2656 auto operands = getODSOperands(index: 4);
2657 return operands.empty() ? ValueT{} : (*operands.begin());
2658 }
2659
2660 RangeT getOperands() {
2661 return odsOperands;
2662 }
2663
2664private:
2665 RangeT odsOperands;
2666};
2667class OuterProductOpAdaptor : public OuterProductOpGenericAdaptor<::mlir::ValueRange> {
2668public:
2669 using OuterProductOpGenericAdaptor::OuterProductOpGenericAdaptor;
2670 OuterProductOpAdaptor(OuterProductOp op);
2671
2672 ::llvm::LogicalResult verify(::mlir::Location loc);
2673};
2674class OuterProductOp : public ::mlir::Op<OuterProductOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<VectorType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<2>::Impl, ::mlir::OpTrait::AttrSizedOperandSegments, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::arm_sme::ArmSMETileOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
2675public:
2676 using Op::Op;
2677 using Op::print;
2678 using Adaptor = OuterProductOpAdaptor;
2679 template <typename RangeT>
2680 using GenericAdaptor = OuterProductOpGenericAdaptor<RangeT>;
2681 using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
2682 static constexpr int odsIndex_lhs = 0;
2683 static constexpr int odsIndex_rhs = 1;
2684 static constexpr int odsIndex_lhsMask = 2;
2685 static constexpr int odsIndex_rhsMask = 3;
2686 static constexpr int odsIndex_acc = 4;
2687 static constexpr int odsIndex_result = 0;
2688 using Properties = FoldAdaptor::Properties;
2689 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
2690 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("kind"), ::llvm::StringRef("operandSegmentSizes")};
2691 return ::llvm::ArrayRef(attrNames);
2692 }
2693
2694 ::mlir::StringAttr getKindAttrName() {
2695 return getAttributeNameForIndex(index: 0);
2696 }
2697
2698 static ::mlir::StringAttr getKindAttrName(::mlir::OperationName name) {
2699 return getAttributeNameForIndex(name, index: 0);
2700 }
2701
2702 ::mlir::StringAttr getOperandSegmentSizesAttrName() {
2703 return (*this)->getName().getAttributeNames().back();
2704 }
2705
2706 static ::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name) {
2707 return name.getAttributeNames().back();
2708 }
2709
2710 static constexpr ::llvm::StringLiteral getOperationName() {
2711 return ::llvm::StringLiteral("arm_sme.outerproduct");
2712 }
2713
2714 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
2715 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
2716 auto [start, length] = getODSOperandIndexAndLength(index);
2717 return getOperation()->getOperands().slice(n: start, m: length);
2718 }
2719
2720 ::mlir::TypedValue<::mlir::VectorType> getLhs() {
2721 return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *getODSOperands(index: 0).begin());
2722 }
2723
2724 ::mlir::TypedValue<::mlir::VectorType> getRhs() {
2725 return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *getODSOperands(index: 1).begin());
2726 }
2727
2728 ::mlir::TypedValue<::mlir::VectorType> getLhsMask() {
2729 auto operands = getODSOperands(index: 2);
2730 return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *operands.begin());
2731 }
2732
2733 ::mlir::TypedValue<::mlir::VectorType> getRhsMask() {
2734 auto operands = getODSOperands(index: 3);
2735 return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *operands.begin());
2736 }
2737
2738 ::mlir::TypedValue<VectorType> getAcc() {
2739 auto operands = getODSOperands(index: 4);
2740 return operands.empty() ? ::mlir::TypedValue<VectorType>{} : ::llvm::cast<::mlir::TypedValue<VectorType>>(Val: *operands.begin());
2741 }
2742
2743 ::mlir::OpOperand &getLhsMutable() {
2744 auto range = getODSOperandIndexAndLength(index: 0);
2745 return getOperation()->getOpOperand(idx: range.first);
2746 }
2747
2748 ::mlir::OpOperand &getRhsMutable() {
2749 auto range = getODSOperandIndexAndLength(index: 1);
2750 return getOperation()->getOpOperand(idx: range.first);
2751 }
2752
2753 ::mlir::MutableOperandRange getLhsMaskMutable();
2754 ::mlir::MutableOperandRange getRhsMaskMutable();
2755 ::mlir::MutableOperandRange getAccMutable();
2756 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
2757 return {index, 1};
2758 }
2759
2760 ::mlir::Operation::result_range getODSResults(unsigned index) {
2761 auto valueRange = getODSResultIndexAndLength(index);
2762 return {std::next(x: getOperation()->result_begin(), n: valueRange.first),
2763 std::next(x: getOperation()->result_begin(), n: valueRange.first + valueRange.second)};
2764 }
2765
2766 ::mlir::TypedValue<VectorType> getResult() {
2767 return ::llvm::cast<::mlir::TypedValue<VectorType>>(Val: *getODSResults(index: 0).begin());
2768 }
2769
2770 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
2771 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
2772 static llvm::hash_code computePropertiesHash(const Properties &prop);
2773 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
2774 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
2775 static void walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor);
2776 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
2777 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
2778 void writeProperties(::mlir::DialectBytecodeWriter &writer);
2779 ::mlir::arm_sme::CombiningKindAttr getKindAttr() {
2780 return ::llvm::dyn_cast_or_null<::mlir::arm_sme::CombiningKindAttr>(Val&: getProperties().kind);
2781 }
2782
2783 ::mlir::arm_sme::CombiningKind getKind();
2784 void setKindAttr(::mlir::arm_sme::CombiningKindAttr attr) {
2785 getProperties().kind = attr;
2786 }
2787
2788 void setKind(::mlir::arm_sme::CombiningKind attrValue);
2789 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc, ::mlir::arm_sme::CombiningKindAttr kind);
2790 static OuterProductOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc, ::mlir::arm_sme::CombiningKindAttr kind);
2791 static OuterProductOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc, ::mlir::arm_sme::CombiningKindAttr kind);
2792 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc, ::mlir::arm_sme::CombiningKindAttr kind);
2793 static OuterProductOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc, ::mlir::arm_sme::CombiningKindAttr kind);
2794 static OuterProductOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc, ::mlir::arm_sme::CombiningKindAttr kind);
2795 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc, ::mlir::arm_sme::CombiningKindAttr kind);
2796 static OuterProductOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc, ::mlir::arm_sme::CombiningKindAttr kind);
2797 static OuterProductOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc, ::mlir::arm_sme::CombiningKindAttr kind);
2798 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc, ::mlir::arm_sme::CombiningKind kind = CombiningKind::Add);
2799 static OuterProductOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc, ::mlir::arm_sme::CombiningKind kind = CombiningKind::Add);
2800 static OuterProductOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc, ::mlir::arm_sme::CombiningKind kind = CombiningKind::Add);
2801 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc, ::mlir::arm_sme::CombiningKind kind = CombiningKind::Add);
2802 static OuterProductOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc, ::mlir::arm_sme::CombiningKind kind = CombiningKind::Add);
2803 static OuterProductOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc, ::mlir::arm_sme::CombiningKind kind = CombiningKind::Add);
2804 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc, ::mlir::arm_sme::CombiningKind kind = CombiningKind::Add);
2805 static OuterProductOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc, ::mlir::arm_sme::CombiningKind kind = CombiningKind::Add);
2806 static OuterProductOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc, ::mlir::arm_sme::CombiningKind kind = CombiningKind::Add);
2807 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
2808 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
2809 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
2810 static OuterProductOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
2811 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
2812 static OuterProductOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
2813 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
2814 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
2815 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
2816 static OuterProductOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
2817 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
2818 static OuterProductOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
2819 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
2820 static OuterProductOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
2821 static OuterProductOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
2822 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
2823 static OuterProductOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
2824 static OuterProductOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
2825 static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
2826 ::llvm::LogicalResult verifyInvariantsImpl();
2827 ::llvm::LogicalResult verifyInvariants();
2828 static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
2829 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
2830 LLVM_ATTRIBUTE_MINSIZE void print(::mlir::OpAsmPrinter &_odsPrinter);
2831 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
2832private:
2833 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
2834 return getAttributeNameForIndex(name: (*this)->getName(), index);
2835 }
2836
2837 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
2838 assert(index < 1 && "invalid attribute index");
2839 assert(name.getStringRef() == getOperationName() && "invalid operation name");
2840 assert(name.isRegistered() && "Operation isn't registered, missing a "
2841 "dependent dialect loading?");
2842 return name.getAttributeNames()[index];
2843 }
2844
2845 static void buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes);
2846public:
2847 VectorType getLhsType() { return llvm::cast<VectorType>(Val: getLhs().getType()); }
2848 VectorType getRhsType() { return llvm::cast<VectorType>(Val: getRhs().getType()); }
2849 VectorType getResultType() { return llvm::cast<VectorType>(Val: getResult().getType()); }
2850 VectorType getTileType() {
2851 return getResultType();
2852 }
2853};
2854
2855} // namespace mlir::arm_sme
2856MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::OuterProductOp)
2857MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::OuterProductOpGenericAdaptorBase::Properties)
2858
2859namespace mlir::arm_sme {
2860
2861
2862//===----------------------------------------------------------------------===//
2863// ::mlir::arm_sme::SMopa2WayOp declarations
2864//===----------------------------------------------------------------------===//
2865
2866namespace detail {
2867
2868class SMopa2WayOpGenericAdaptorBase {
2869public:
2870 struct Properties {
2871 using operandSegmentSizesTy = std::array<int32_t, 5>;
2872 operandSegmentSizesTy operandSegmentSizes;
2873 ::llvm::ArrayRef<int32_t> getOperandSegmentSizes() const {
2874 auto &propStorage = this->operandSegmentSizes;
2875 return propStorage;
2876 }
2877 void setOperandSegmentSizes(::llvm::ArrayRef<int32_t> propValue) {
2878 auto &propStorage = this->operandSegmentSizes;
2879 ::llvm::copy(Range&: propValue, Out: propStorage.begin());
2880 }
2881 bool operator==(const Properties &rhs) const {
2882 return
2883 rhs.operandSegmentSizes == this->operandSegmentSizes &&
2884 true;
2885 }
2886 bool operator!=(const Properties &rhs) const {
2887 return !(*this == rhs);
2888 }
2889 };
2890protected:
2891 ::mlir::DictionaryAttr odsAttrs;
2892 ::std::optional<::mlir::OperationName> odsOpName;
2893 Properties properties;
2894 ::mlir::RegionRange odsRegions;
2895public:
2896 SMopa2WayOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
2897 odsOpName.emplace(args: "arm_sme.smopa_2way", args: odsAttrs.getContext());
2898 }
2899
2900 SMopa2WayOpGenericAdaptorBase(SMopa2WayOp op);
2901
2902 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
2903 const Properties &getProperties() {
2904 return properties;
2905 }
2906
2907 ::mlir::DictionaryAttr getAttributes() {
2908 return odsAttrs;
2909 }
2910
2911};
2912
2913} // namespace detail
2914template <typename RangeT>
2915class SMopa2WayOpGenericAdaptor : public detail::SMopa2WayOpGenericAdaptorBase {
2916 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
2917 using Base = detail::SMopa2WayOpGenericAdaptorBase;
2918 static constexpr int odsIndex_lhs = 0;
2919 static constexpr int odsIndex_rhs = 1;
2920 static constexpr int odsIndex_lhsMask = 2;
2921 static constexpr int odsIndex_rhsMask = 3;
2922 static constexpr int odsIndex_acc = 4;
2923public:
2924 SMopa2WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
2925
2926 SMopa2WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : SMopa2WayOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
2927
2928 SMopa2WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs) : SMopa2WayOpGenericAdaptor(values, attrs, Properties{}, {}) {}
2929
2930 SMopa2WayOpGenericAdaptor(RangeT values, const SMopa2WayOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
2931
2932 template <typename LateInst = SMopa2WayOp, typename = std::enable_if_t<std::is_same_v<LateInst, SMopa2WayOp>>>
2933 SMopa2WayOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
2934
2935 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
2936 return Base::getODSOperandIndexAndLength(index, odsOperandsSize: odsOperands.size());
2937 }
2938
2939 RangeT getODSOperands(unsigned index) {
2940 auto valueRange = getODSOperandIndexAndLength(index);
2941 return {std::next(odsOperands.begin(), valueRange.first),
2942 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
2943 }
2944
2945 ValueT getLhs() {
2946 return (*getODSOperands(index: 0).begin());
2947 }
2948
2949 ValueT getRhs() {
2950 return (*getODSOperands(index: 1).begin());
2951 }
2952
2953 ValueT getLhsMask() {
2954 auto operands = getODSOperands(index: 2);
2955 return operands.empty() ? ValueT{} : (*operands.begin());
2956 }
2957
2958 ValueT getRhsMask() {
2959 auto operands = getODSOperands(index: 3);
2960 return operands.empty() ? ValueT{} : (*operands.begin());
2961 }
2962
2963 ValueT getAcc() {
2964 auto operands = getODSOperands(index: 4);
2965 return operands.empty() ? ValueT{} : (*operands.begin());
2966 }
2967
2968 RangeT getOperands() {
2969 return odsOperands;
2970 }
2971
2972private:
2973 RangeT odsOperands;
2974};
2975class SMopa2WayOpAdaptor : public SMopa2WayOpGenericAdaptor<::mlir::ValueRange> {
2976public:
2977 using SMopa2WayOpGenericAdaptor::SMopa2WayOpGenericAdaptor;
2978 SMopa2WayOpAdaptor(SMopa2WayOp op);
2979
2980 ::llvm::LogicalResult verify(::mlir::Location loc);
2981};
2982class SMopa2WayOp : public ::mlir::Op<SMopa2WayOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<2>::Impl, ::mlir::OpTrait::AttrSizedOperandSegments, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::arm_sme::ArmSMETileOpInterface::Trait> {
2983public:
2984 using Op::Op;
2985 using Op::print;
2986 using Adaptor = SMopa2WayOpAdaptor;
2987 template <typename RangeT>
2988 using GenericAdaptor = SMopa2WayOpGenericAdaptor<RangeT>;
2989 using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
2990 static constexpr int odsIndex_lhs = 0;
2991 static constexpr int odsIndex_rhs = 1;
2992 static constexpr int odsIndex_lhsMask = 2;
2993 static constexpr int odsIndex_rhsMask = 3;
2994 static constexpr int odsIndex_acc = 4;
2995 static constexpr int odsIndex_result = 0;
2996 using Properties = FoldAdaptor::Properties;
2997 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
2998 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("operandSegmentSizes")};
2999 return ::llvm::ArrayRef(attrNames);
3000 }
3001
3002 ::mlir::StringAttr getOperandSegmentSizesAttrName() {
3003 return (*this)->getName().getAttributeNames().back();
3004 }
3005
3006 static ::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name) {
3007 return name.getAttributeNames().back();
3008 }
3009
3010 static constexpr ::llvm::StringLiteral getOperationName() {
3011 return ::llvm::StringLiteral("arm_sme.smopa_2way");
3012 }
3013
3014 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
3015 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
3016 auto [start, length] = getODSOperandIndexAndLength(index);
3017 return getOperation()->getOperands().slice(n: start, m: length);
3018 }
3019
3020 ::mlir::TypedValue<::mlir::Type> getLhs() {
3021 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(Val: *getODSOperands(index: 0).begin());
3022 }
3023
3024 ::mlir::TypedValue<::mlir::VectorType> getRhs() {
3025 return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *getODSOperands(index: 1).begin());
3026 }
3027
3028 ::mlir::TypedValue<::mlir::VectorType> getLhsMask() {
3029 auto operands = getODSOperands(index: 2);
3030 return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *operands.begin());
3031 }
3032
3033 ::mlir::TypedValue<::mlir::VectorType> getRhsMask() {
3034 auto operands = getODSOperands(index: 3);
3035 return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *operands.begin());
3036 }
3037
3038 ::mlir::TypedValue<::mlir::VectorType> getAcc() {
3039 auto operands = getODSOperands(index: 4);
3040 return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *operands.begin());
3041 }
3042
3043 ::mlir::OpOperand &getLhsMutable() {
3044 auto range = getODSOperandIndexAndLength(index: 0);
3045 return getOperation()->getOpOperand(idx: range.first);
3046 }
3047
3048 ::mlir::OpOperand &getRhsMutable() {
3049 auto range = getODSOperandIndexAndLength(index: 1);
3050 return getOperation()->getOpOperand(idx: range.first);
3051 }
3052
3053 ::mlir::MutableOperandRange getLhsMaskMutable();
3054 ::mlir::MutableOperandRange getRhsMaskMutable();
3055 ::mlir::MutableOperandRange getAccMutable();
3056 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
3057 return {index, 1};
3058 }
3059
3060 ::mlir::Operation::result_range getODSResults(unsigned index) {
3061 auto valueRange = getODSResultIndexAndLength(index);
3062 return {std::next(x: getOperation()->result_begin(), n: valueRange.first),
3063 std::next(x: getOperation()->result_begin(), n: valueRange.first + valueRange.second)};
3064 }
3065
3066 ::mlir::TypedValue<::mlir::Type> getResult() {
3067 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(Val: *getODSResults(index: 0).begin());
3068 }
3069
3070 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
3071 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
3072 static llvm::hash_code computePropertiesHash(const Properties &prop);
3073 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
3074 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
3075 static void walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor);
3076 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
3077 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
3078 void writeProperties(::mlir::DialectBytecodeWriter &writer);
3079 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
3080 static SMopa2WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
3081 static SMopa2WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
3082 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
3083 static SMopa2WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
3084 static SMopa2WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
3085 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
3086 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
3087 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
3088 static SMopa2WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
3089 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
3090 static SMopa2WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
3091 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
3092 static SMopa2WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
3093 static SMopa2WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
3094 ::llvm::LogicalResult verifyInvariantsImpl();
3095 ::llvm::LogicalResult verifyInvariants();
3096 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
3097 LLVM_ATTRIBUTE_MINSIZE void print(::mlir::OpAsmPrinter &_odsPrinter);
3098 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
3099private:
3100 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
3101 return getAttributeNameForIndex(name: (*this)->getName(), index);
3102 }
3103
3104 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
3105 return {};
3106 }
3107
3108 static void buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes);
3109public:
3110 VectorType getLhsType() { return llvm::cast<VectorType>(Val: getLhs().getType()); }
3111 VectorType getRhsType() { return llvm::cast<VectorType>(Val: getRhs().getType()); }
3112 VectorType getResultType() { return llvm::cast<VectorType>(Val: getResult().getType()); }
3113 VectorType getTileType() {
3114 return getResultType();
3115 }
3116};
3117
3118} // namespace mlir::arm_sme
3119MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::SMopa2WayOp)
3120MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::SMopa2WayOpGenericAdaptorBase::Properties)
3121
3122namespace mlir::arm_sme {
3123
3124
3125//===----------------------------------------------------------------------===//
3126// ::mlir::arm_sme::SMopa4WayOp declarations
3127//===----------------------------------------------------------------------===//
3128
3129namespace detail {
3130
3131class SMopa4WayOpGenericAdaptorBase {
3132public:
3133 struct Properties {
3134 using operandSegmentSizesTy = std::array<int32_t, 5>;
3135 operandSegmentSizesTy operandSegmentSizes;
3136 ::llvm::ArrayRef<int32_t> getOperandSegmentSizes() const {
3137 auto &propStorage = this->operandSegmentSizes;
3138 return propStorage;
3139 }
3140 void setOperandSegmentSizes(::llvm::ArrayRef<int32_t> propValue) {
3141 auto &propStorage = this->operandSegmentSizes;
3142 ::llvm::copy(Range&: propValue, Out: propStorage.begin());
3143 }
3144 bool operator==(const Properties &rhs) const {
3145 return
3146 rhs.operandSegmentSizes == this->operandSegmentSizes &&
3147 true;
3148 }
3149 bool operator!=(const Properties &rhs) const {
3150 return !(*this == rhs);
3151 }
3152 };
3153protected:
3154 ::mlir::DictionaryAttr odsAttrs;
3155 ::std::optional<::mlir::OperationName> odsOpName;
3156 Properties properties;
3157 ::mlir::RegionRange odsRegions;
3158public:
3159 SMopa4WayOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
3160 odsOpName.emplace(args: "arm_sme.smopa_4way", args: odsAttrs.getContext());
3161 }
3162
3163 SMopa4WayOpGenericAdaptorBase(SMopa4WayOp op);
3164
3165 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
3166 const Properties &getProperties() {
3167 return properties;
3168 }
3169
3170 ::mlir::DictionaryAttr getAttributes() {
3171 return odsAttrs;
3172 }
3173
3174};
3175
3176} // namespace detail
3177template <typename RangeT>
3178class SMopa4WayOpGenericAdaptor : public detail::SMopa4WayOpGenericAdaptorBase {
3179 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
3180 using Base = detail::SMopa4WayOpGenericAdaptorBase;
3181 static constexpr int odsIndex_lhs = 0;
3182 static constexpr int odsIndex_rhs = 1;
3183 static constexpr int odsIndex_lhsMask = 2;
3184 static constexpr int odsIndex_rhsMask = 3;
3185 static constexpr int odsIndex_acc = 4;
3186public:
3187 SMopa4WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
3188
3189 SMopa4WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : SMopa4WayOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
3190
3191 SMopa4WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs) : SMopa4WayOpGenericAdaptor(values, attrs, Properties{}, {}) {}
3192
3193 SMopa4WayOpGenericAdaptor(RangeT values, const SMopa4WayOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
3194
3195 template <typename LateInst = SMopa4WayOp, typename = std::enable_if_t<std::is_same_v<LateInst, SMopa4WayOp>>>
3196 SMopa4WayOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
3197
3198 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
3199 return Base::getODSOperandIndexAndLength(index, odsOperandsSize: odsOperands.size());
3200 }
3201
3202 RangeT getODSOperands(unsigned index) {
3203 auto valueRange = getODSOperandIndexAndLength(index);
3204 return {std::next(odsOperands.begin(), valueRange.first),
3205 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
3206 }
3207
3208 ValueT getLhs() {
3209 return (*getODSOperands(index: 0).begin());
3210 }
3211
3212 ValueT getRhs() {
3213 return (*getODSOperands(index: 1).begin());
3214 }
3215
3216 ValueT getLhsMask() {
3217 auto operands = getODSOperands(index: 2);
3218 return operands.empty() ? ValueT{} : (*operands.begin());
3219 }
3220
3221 ValueT getRhsMask() {
3222 auto operands = getODSOperands(index: 3);
3223 return operands.empty() ? ValueT{} : (*operands.begin());
3224 }
3225
3226 ValueT getAcc() {
3227 auto operands = getODSOperands(index: 4);
3228 return operands.empty() ? ValueT{} : (*operands.begin());
3229 }
3230
3231 RangeT getOperands() {
3232 return odsOperands;
3233 }
3234
3235private:
3236 RangeT odsOperands;
3237};
3238class SMopa4WayOpAdaptor : public SMopa4WayOpGenericAdaptor<::mlir::ValueRange> {
3239public:
3240 using SMopa4WayOpGenericAdaptor::SMopa4WayOpGenericAdaptor;
3241 SMopa4WayOpAdaptor(SMopa4WayOp op);
3242
3243 ::llvm::LogicalResult verify(::mlir::Location loc);
3244};
3245class SMopa4WayOp : public ::mlir::Op<SMopa4WayOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<2>::Impl, ::mlir::OpTrait::AttrSizedOperandSegments, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::arm_sme::ArmSMETileOpInterface::Trait> {
3246public:
3247 using Op::Op;
3248 using Op::print;
3249 using Adaptor = SMopa4WayOpAdaptor;
3250 template <typename RangeT>
3251 using GenericAdaptor = SMopa4WayOpGenericAdaptor<RangeT>;
3252 using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
3253 static constexpr int odsIndex_lhs = 0;
3254 static constexpr int odsIndex_rhs = 1;
3255 static constexpr int odsIndex_lhsMask = 2;
3256 static constexpr int odsIndex_rhsMask = 3;
3257 static constexpr int odsIndex_acc = 4;
3258 static constexpr int odsIndex_result = 0;
3259 using Properties = FoldAdaptor::Properties;
3260 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
3261 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("operandSegmentSizes")};
3262 return ::llvm::ArrayRef(attrNames);
3263 }
3264
3265 ::mlir::StringAttr getOperandSegmentSizesAttrName() {
3266 return (*this)->getName().getAttributeNames().back();
3267 }
3268
3269 static ::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name) {
3270 return name.getAttributeNames().back();
3271 }
3272
3273 static constexpr ::llvm::StringLiteral getOperationName() {
3274 return ::llvm::StringLiteral("arm_sme.smopa_4way");
3275 }
3276
3277 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
3278 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
3279 auto [start, length] = getODSOperandIndexAndLength(index);
3280 return getOperation()->getOperands().slice(n: start, m: length);
3281 }
3282
3283 ::mlir::TypedValue<::mlir::Type> getLhs() {
3284 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(Val: *getODSOperands(index: 0).begin());
3285 }
3286
3287 ::mlir::TypedValue<::mlir::VectorType> getRhs() {
3288 return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *getODSOperands(index: 1).begin());
3289 }
3290
3291 ::mlir::TypedValue<::mlir::VectorType> getLhsMask() {
3292 auto operands = getODSOperands(index: 2);
3293 return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *operands.begin());
3294 }
3295
3296 ::mlir::TypedValue<::mlir::VectorType> getRhsMask() {
3297 auto operands = getODSOperands(index: 3);
3298 return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *operands.begin());
3299 }
3300
3301 ::mlir::TypedValue<::mlir::VectorType> getAcc() {
3302 auto operands = getODSOperands(index: 4);
3303 return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *operands.begin());
3304 }
3305
3306 ::mlir::OpOperand &getLhsMutable() {
3307 auto range = getODSOperandIndexAndLength(index: 0);
3308 return getOperation()->getOpOperand(idx: range.first);
3309 }
3310
3311 ::mlir::OpOperand &getRhsMutable() {
3312 auto range = getODSOperandIndexAndLength(index: 1);
3313 return getOperation()->getOpOperand(idx: range.first);
3314 }
3315
3316 ::mlir::MutableOperandRange getLhsMaskMutable();
3317 ::mlir::MutableOperandRange getRhsMaskMutable();
3318 ::mlir::MutableOperandRange getAccMutable();
3319 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
3320 return {index, 1};
3321 }
3322
3323 ::mlir::Operation::result_range getODSResults(unsigned index) {
3324 auto valueRange = getODSResultIndexAndLength(index);
3325 return {std::next(x: getOperation()->result_begin(), n: valueRange.first),
3326 std::next(x: getOperation()->result_begin(), n: valueRange.first + valueRange.second)};
3327 }
3328
3329 ::mlir::TypedValue<::mlir::Type> getResult() {
3330 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(Val: *getODSResults(index: 0).begin());
3331 }
3332
3333 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
3334 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
3335 static llvm::hash_code computePropertiesHash(const Properties &prop);
3336 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
3337 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
3338 static void walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor);
3339 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
3340 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
3341 void writeProperties(::mlir::DialectBytecodeWriter &writer);
3342 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
3343 static SMopa4WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
3344 static SMopa4WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
3345 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
3346 static SMopa4WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
3347 static SMopa4WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
3348 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
3349 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
3350 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
3351 static SMopa4WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
3352 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
3353 static SMopa4WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
3354 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
3355 static SMopa4WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
3356 static SMopa4WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
3357 ::llvm::LogicalResult verifyInvariantsImpl();
3358 ::llvm::LogicalResult verifyInvariants();
3359 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
3360 LLVM_ATTRIBUTE_MINSIZE void print(::mlir::OpAsmPrinter &_odsPrinter);
3361 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
3362private:
3363 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
3364 return getAttributeNameForIndex(name: (*this)->getName(), index);
3365 }
3366
3367 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
3368 return {};
3369 }
3370
3371 static void buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes);
3372public:
3373 VectorType getLhsType() { return llvm::cast<VectorType>(Val: getLhs().getType()); }
3374 VectorType getRhsType() { return llvm::cast<VectorType>(Val: getRhs().getType()); }
3375 VectorType getResultType() { return llvm::cast<VectorType>(Val: getResult().getType()); }
3376 VectorType getTileType() {
3377 return getResultType();
3378 }
3379};
3380
3381} // namespace mlir::arm_sme
3382MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::SMopa4WayOp)
3383MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::SMopa4WayOpGenericAdaptorBase::Properties)
3384
3385namespace mlir::arm_sme {
3386
3387
3388//===----------------------------------------------------------------------===//
3389// ::mlir::arm_sme::SMops2WayOp declarations
3390//===----------------------------------------------------------------------===//
3391
3392namespace detail {
3393
3394class SMops2WayOpGenericAdaptorBase {
3395public:
3396 struct Properties {
3397 using operandSegmentSizesTy = std::array<int32_t, 5>;
3398 operandSegmentSizesTy operandSegmentSizes;
3399 ::llvm::ArrayRef<int32_t> getOperandSegmentSizes() const {
3400 auto &propStorage = this->operandSegmentSizes;
3401 return propStorage;
3402 }
3403 void setOperandSegmentSizes(::llvm::ArrayRef<int32_t> propValue) {
3404 auto &propStorage = this->operandSegmentSizes;
3405 ::llvm::copy(Range&: propValue, Out: propStorage.begin());
3406 }
3407 bool operator==(const Properties &rhs) const {
3408 return
3409 rhs.operandSegmentSizes == this->operandSegmentSizes &&
3410 true;
3411 }
3412 bool operator!=(const Properties &rhs) const {
3413 return !(*this == rhs);
3414 }
3415 };
3416protected:
3417 ::mlir::DictionaryAttr odsAttrs;
3418 ::std::optional<::mlir::OperationName> odsOpName;
3419 Properties properties;
3420 ::mlir::RegionRange odsRegions;
3421public:
3422 SMops2WayOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
3423 odsOpName.emplace(args: "arm_sme.smops_2way", args: odsAttrs.getContext());
3424 }
3425
3426 SMops2WayOpGenericAdaptorBase(SMops2WayOp op);
3427
3428 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
3429 const Properties &getProperties() {
3430 return properties;
3431 }
3432
3433 ::mlir::DictionaryAttr getAttributes() {
3434 return odsAttrs;
3435 }
3436
3437};
3438
3439} // namespace detail
3440template <typename RangeT>
3441class SMops2WayOpGenericAdaptor : public detail::SMops2WayOpGenericAdaptorBase {
3442 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
3443 using Base = detail::SMops2WayOpGenericAdaptorBase;
3444 static constexpr int odsIndex_lhs = 0;
3445 static constexpr int odsIndex_rhs = 1;
3446 static constexpr int odsIndex_lhsMask = 2;
3447 static constexpr int odsIndex_rhsMask = 3;
3448 static constexpr int odsIndex_acc = 4;
3449public:
3450 SMops2WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
3451
3452 SMops2WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : SMops2WayOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
3453
3454 SMops2WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs) : SMops2WayOpGenericAdaptor(values, attrs, Properties{}, {}) {}
3455
3456 SMops2WayOpGenericAdaptor(RangeT values, const SMops2WayOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
3457
3458 template <typename LateInst = SMops2WayOp, typename = std::enable_if_t<std::is_same_v<LateInst, SMops2WayOp>>>
3459 SMops2WayOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
3460
3461 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
3462 return Base::getODSOperandIndexAndLength(index, odsOperandsSize: odsOperands.size());
3463 }
3464
3465 RangeT getODSOperands(unsigned index) {
3466 auto valueRange = getODSOperandIndexAndLength(index);
3467 return {std::next(odsOperands.begin(), valueRange.first),
3468 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
3469 }
3470
3471 ValueT getLhs() {
3472 return (*getODSOperands(index: 0).begin());
3473 }
3474
3475 ValueT getRhs() {
3476 return (*getODSOperands(index: 1).begin());
3477 }
3478
3479 ValueT getLhsMask() {
3480 auto operands = getODSOperands(index: 2);
3481 return operands.empty() ? ValueT{} : (*operands.begin());
3482 }
3483
3484 ValueT getRhsMask() {
3485 auto operands = getODSOperands(index: 3);
3486 return operands.empty() ? ValueT{} : (*operands.begin());
3487 }
3488
3489 ValueT getAcc() {
3490 auto operands = getODSOperands(index: 4);
3491 return operands.empty() ? ValueT{} : (*operands.begin());
3492 }
3493
3494 RangeT getOperands() {
3495 return odsOperands;
3496 }
3497
3498private:
3499 RangeT odsOperands;
3500};
3501class SMops2WayOpAdaptor : public SMops2WayOpGenericAdaptor<::mlir::ValueRange> {
3502public:
3503 using SMops2WayOpGenericAdaptor::SMops2WayOpGenericAdaptor;
3504 SMops2WayOpAdaptor(SMops2WayOp op);
3505
3506 ::llvm::LogicalResult verify(::mlir::Location loc);
3507};
3508class SMops2WayOp : public ::mlir::Op<SMops2WayOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<2>::Impl, ::mlir::OpTrait::AttrSizedOperandSegments, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::arm_sme::ArmSMETileOpInterface::Trait> {
3509public:
3510 using Op::Op;
3511 using Op::print;
3512 using Adaptor = SMops2WayOpAdaptor;
3513 template <typename RangeT>
3514 using GenericAdaptor = SMops2WayOpGenericAdaptor<RangeT>;
3515 using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
3516 static constexpr int odsIndex_lhs = 0;
3517 static constexpr int odsIndex_rhs = 1;
3518 static constexpr int odsIndex_lhsMask = 2;
3519 static constexpr int odsIndex_rhsMask = 3;
3520 static constexpr int odsIndex_acc = 4;
3521 static constexpr int odsIndex_result = 0;
3522 using Properties = FoldAdaptor::Properties;
3523 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
3524 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("operandSegmentSizes")};
3525 return ::llvm::ArrayRef(attrNames);
3526 }
3527
3528 ::mlir::StringAttr getOperandSegmentSizesAttrName() {
3529 return (*this)->getName().getAttributeNames().back();
3530 }
3531
3532 static ::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name) {
3533 return name.getAttributeNames().back();
3534 }
3535
3536 static constexpr ::llvm::StringLiteral getOperationName() {
3537 return ::llvm::StringLiteral("arm_sme.smops_2way");
3538 }
3539
3540 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
3541 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
3542 auto [start, length] = getODSOperandIndexAndLength(index);
3543 return getOperation()->getOperands().slice(n: start, m: length);
3544 }
3545
3546 ::mlir::TypedValue<::mlir::Type> getLhs() {
3547 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(Val: *getODSOperands(index: 0).begin());
3548 }
3549
3550 ::mlir::TypedValue<::mlir::VectorType> getRhs() {
3551 return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *getODSOperands(index: 1).begin());
3552 }
3553
3554 ::mlir::TypedValue<::mlir::VectorType> getLhsMask() {
3555 auto operands = getODSOperands(index: 2);
3556 return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *operands.begin());
3557 }
3558
3559 ::mlir::TypedValue<::mlir::VectorType> getRhsMask() {
3560 auto operands = getODSOperands(index: 3);
3561 return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *operands.begin());
3562 }
3563
3564 ::mlir::TypedValue<::mlir::VectorType> getAcc() {
3565 auto operands = getODSOperands(index: 4);
3566 return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *operands.begin());
3567 }
3568
3569 ::mlir::OpOperand &getLhsMutable() {
3570 auto range = getODSOperandIndexAndLength(index: 0);
3571 return getOperation()->getOpOperand(idx: range.first);
3572 }
3573
3574 ::mlir::OpOperand &getRhsMutable() {
3575 auto range = getODSOperandIndexAndLength(index: 1);
3576 return getOperation()->getOpOperand(idx: range.first);
3577 }
3578
3579 ::mlir::MutableOperandRange getLhsMaskMutable();
3580 ::mlir::MutableOperandRange getRhsMaskMutable();
3581 ::mlir::MutableOperandRange getAccMutable();
3582 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
3583 return {index, 1};
3584 }
3585
3586 ::mlir::Operation::result_range getODSResults(unsigned index) {
3587 auto valueRange = getODSResultIndexAndLength(index);
3588 return {std::next(x: getOperation()->result_begin(), n: valueRange.first),
3589 std::next(x: getOperation()->result_begin(), n: valueRange.first + valueRange.second)};
3590 }
3591
3592 ::mlir::TypedValue<::mlir::Type> getResult() {
3593 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(Val: *getODSResults(index: 0).begin());
3594 }
3595
3596 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
3597 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
3598 static llvm::hash_code computePropertiesHash(const Properties &prop);
3599 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
3600 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
3601 static void walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor);
3602 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
3603 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
3604 void writeProperties(::mlir::DialectBytecodeWriter &writer);
3605 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
3606 static SMops2WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
3607 static SMops2WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
3608 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
3609 static SMops2WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
3610 static SMops2WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
3611 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
3612 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
3613 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
3614 static SMops2WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
3615 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
3616 static SMops2WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
3617 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
3618 static SMops2WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
3619 static SMops2WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
3620 ::llvm::LogicalResult verifyInvariantsImpl();
3621 ::llvm::LogicalResult verifyInvariants();
3622 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
3623 LLVM_ATTRIBUTE_MINSIZE void print(::mlir::OpAsmPrinter &_odsPrinter);
3624 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
3625private:
3626 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
3627 return getAttributeNameForIndex(name: (*this)->getName(), index);
3628 }
3629
3630 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
3631 return {};
3632 }
3633
3634 static void buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes);
3635public:
3636 VectorType getLhsType() { return llvm::cast<VectorType>(Val: getLhs().getType()); }
3637 VectorType getRhsType() { return llvm::cast<VectorType>(Val: getRhs().getType()); }
3638 VectorType getResultType() { return llvm::cast<VectorType>(Val: getResult().getType()); }
3639 VectorType getTileType() {
3640 return getResultType();
3641 }
3642};
3643
3644} // namespace mlir::arm_sme
3645MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::SMops2WayOp)
3646MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::SMops2WayOpGenericAdaptorBase::Properties)
3647
3648namespace mlir::arm_sme {
3649
3650
3651//===----------------------------------------------------------------------===//
3652// ::mlir::arm_sme::SMops4WayOp declarations
3653//===----------------------------------------------------------------------===//
3654
3655namespace detail {
3656
3657class SMops4WayOpGenericAdaptorBase {
3658public:
3659 struct Properties {
3660 using operandSegmentSizesTy = std::array<int32_t, 5>;
3661 operandSegmentSizesTy operandSegmentSizes;
3662 ::llvm::ArrayRef<int32_t> getOperandSegmentSizes() const {
3663 auto &propStorage = this->operandSegmentSizes;
3664 return propStorage;
3665 }
3666 void setOperandSegmentSizes(::llvm::ArrayRef<int32_t> propValue) {
3667 auto &propStorage = this->operandSegmentSizes;
3668 ::llvm::copy(Range&: propValue, Out: propStorage.begin());
3669 }
3670 bool operator==(const Properties &rhs) const {
3671 return
3672 rhs.operandSegmentSizes == this->operandSegmentSizes &&
3673 true;
3674 }
3675 bool operator!=(const Properties &rhs) const {
3676 return !(*this == rhs);
3677 }
3678 };
3679protected:
3680 ::mlir::DictionaryAttr odsAttrs;
3681 ::std::optional<::mlir::OperationName> odsOpName;
3682 Properties properties;
3683 ::mlir::RegionRange odsRegions;
3684public:
3685 SMops4WayOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
3686 odsOpName.emplace(args: "arm_sme.smops_4way", args: odsAttrs.getContext());
3687 }
3688
3689 SMops4WayOpGenericAdaptorBase(SMops4WayOp op);
3690
3691 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
3692 const Properties &getProperties() {
3693 return properties;
3694 }
3695
3696 ::mlir::DictionaryAttr getAttributes() {
3697 return odsAttrs;
3698 }
3699
3700};
3701
3702} // namespace detail
3703template <typename RangeT>
3704class SMops4WayOpGenericAdaptor : public detail::SMops4WayOpGenericAdaptorBase {
3705 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
3706 using Base = detail::SMops4WayOpGenericAdaptorBase;
3707 static constexpr int odsIndex_lhs = 0;
3708 static constexpr int odsIndex_rhs = 1;
3709 static constexpr int odsIndex_lhsMask = 2;
3710 static constexpr int odsIndex_rhsMask = 3;
3711 static constexpr int odsIndex_acc = 4;
3712public:
3713 SMops4WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
3714
3715 SMops4WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : SMops4WayOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
3716
3717 SMops4WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs) : SMops4WayOpGenericAdaptor(values, attrs, Properties{}, {}) {}
3718
3719 SMops4WayOpGenericAdaptor(RangeT values, const SMops4WayOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
3720
3721 template <typename LateInst = SMops4WayOp, typename = std::enable_if_t<std::is_same_v<LateInst, SMops4WayOp>>>
3722 SMops4WayOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
3723
3724 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
3725 return Base::getODSOperandIndexAndLength(index, odsOperandsSize: odsOperands.size());
3726 }
3727
3728 RangeT getODSOperands(unsigned index) {
3729 auto valueRange = getODSOperandIndexAndLength(index);
3730 return {std::next(odsOperands.begin(), valueRange.first),
3731 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
3732 }
3733
3734 ValueT getLhs() {
3735 return (*getODSOperands(index: 0).begin());
3736 }
3737
3738 ValueT getRhs() {
3739 return (*getODSOperands(index: 1).begin());
3740 }
3741
3742 ValueT getLhsMask() {
3743 auto operands = getODSOperands(index: 2);
3744 return operands.empty() ? ValueT{} : (*operands.begin());
3745 }
3746
3747 ValueT getRhsMask() {
3748 auto operands = getODSOperands(index: 3);
3749 return operands.empty() ? ValueT{} : (*operands.begin());
3750 }
3751
3752 ValueT getAcc() {
3753 auto operands = getODSOperands(index: 4);
3754 return operands.empty() ? ValueT{} : (*operands.begin());
3755 }
3756
3757 RangeT getOperands() {
3758 return odsOperands;
3759 }
3760
3761private:
3762 RangeT odsOperands;
3763};
3764class SMops4WayOpAdaptor : public SMops4WayOpGenericAdaptor<::mlir::ValueRange> {
3765public:
3766 using SMops4WayOpGenericAdaptor::SMops4WayOpGenericAdaptor;
3767 SMops4WayOpAdaptor(SMops4WayOp op);
3768
3769 ::llvm::LogicalResult verify(::mlir::Location loc);
3770};
3771class SMops4WayOp : public ::mlir::Op<SMops4WayOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<2>::Impl, ::mlir::OpTrait::AttrSizedOperandSegments, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::arm_sme::ArmSMETileOpInterface::Trait> {
3772public:
3773 using Op::Op;
3774 using Op::print;
3775 using Adaptor = SMops4WayOpAdaptor;
3776 template <typename RangeT>
3777 using GenericAdaptor = SMops4WayOpGenericAdaptor<RangeT>;
3778 using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
3779 static constexpr int odsIndex_lhs = 0;
3780 static constexpr int odsIndex_rhs = 1;
3781 static constexpr int odsIndex_lhsMask = 2;
3782 static constexpr int odsIndex_rhsMask = 3;
3783 static constexpr int odsIndex_acc = 4;
3784 static constexpr int odsIndex_result = 0;
3785 using Properties = FoldAdaptor::Properties;
3786 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
3787 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("operandSegmentSizes")};
3788 return ::llvm::ArrayRef(attrNames);
3789 }
3790
3791 ::mlir::StringAttr getOperandSegmentSizesAttrName() {
3792 return (*this)->getName().getAttributeNames().back();
3793 }
3794
3795 static ::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name) {
3796 return name.getAttributeNames().back();
3797 }
3798
3799 static constexpr ::llvm::StringLiteral getOperationName() {
3800 return ::llvm::StringLiteral("arm_sme.smops_4way");
3801 }
3802
3803 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
3804 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
3805 auto [start, length] = getODSOperandIndexAndLength(index);
3806 return getOperation()->getOperands().slice(n: start, m: length);
3807 }
3808
3809 ::mlir::TypedValue<::mlir::Type> getLhs() {
3810 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(Val: *getODSOperands(index: 0).begin());
3811 }
3812
3813 ::mlir::TypedValue<::mlir::VectorType> getRhs() {
3814 return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *getODSOperands(index: 1).begin());
3815 }
3816
3817 ::mlir::TypedValue<::mlir::VectorType> getLhsMask() {
3818 auto operands = getODSOperands(index: 2);
3819 return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *operands.begin());
3820 }
3821
3822 ::mlir::TypedValue<::mlir::VectorType> getRhsMask() {
3823 auto operands = getODSOperands(index: 3);
3824 return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *operands.begin());
3825 }
3826
3827 ::mlir::TypedValue<::mlir::VectorType> getAcc() {
3828 auto operands = getODSOperands(index: 4);
3829 return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *operands.begin());
3830 }
3831
3832 ::mlir::OpOperand &getLhsMutable() {
3833 auto range = getODSOperandIndexAndLength(index: 0);
3834 return getOperation()->getOpOperand(idx: range.first);
3835 }
3836
3837 ::mlir::OpOperand &getRhsMutable() {
3838 auto range = getODSOperandIndexAndLength(index: 1);
3839 return getOperation()->getOpOperand(idx: range.first);
3840 }
3841
3842 ::mlir::MutableOperandRange getLhsMaskMutable();
3843 ::mlir::MutableOperandRange getRhsMaskMutable();
3844 ::mlir::MutableOperandRange getAccMutable();
3845 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
3846 return {index, 1};
3847 }
3848
3849 ::mlir::Operation::result_range getODSResults(unsigned index) {
3850 auto valueRange = getODSResultIndexAndLength(index);
3851 return {std::next(x: getOperation()->result_begin(), n: valueRange.first),
3852 std::next(x: getOperation()->result_begin(), n: valueRange.first + valueRange.second)};
3853 }
3854
3855 ::mlir::TypedValue<::mlir::Type> getResult() {
3856 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(Val: *getODSResults(index: 0).begin());
3857 }
3858
3859 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
3860 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
3861 static llvm::hash_code computePropertiesHash(const Properties &prop);
3862 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
3863 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
3864 static void walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor);
3865 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
3866 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
3867 void writeProperties(::mlir::DialectBytecodeWriter &writer);
3868 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
3869 static SMops4WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
3870 static SMops4WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
3871 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
3872 static SMops4WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
3873 static SMops4WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
3874 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
3875 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
3876 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
3877 static SMops4WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
3878 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
3879 static SMops4WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
3880 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
3881 static SMops4WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
3882 static SMops4WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
3883 ::llvm::LogicalResult verifyInvariantsImpl();
3884 ::llvm::LogicalResult verifyInvariants();
3885 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
3886 LLVM_ATTRIBUTE_MINSIZE void print(::mlir::OpAsmPrinter &_odsPrinter);
3887 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
3888private:
3889 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
3890 return getAttributeNameForIndex(name: (*this)->getName(), index);
3891 }
3892
3893 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
3894 return {};
3895 }
3896
3897 static void buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes);
3898public:
3899 VectorType getLhsType() { return llvm::cast<VectorType>(Val: getLhs().getType()); }
3900 VectorType getRhsType() { return llvm::cast<VectorType>(Val: getRhs().getType()); }
3901 VectorType getResultType() { return llvm::cast<VectorType>(Val: getResult().getType()); }
3902 VectorType getTileType() {
3903 return getResultType();
3904 }
3905};
3906
3907} // namespace mlir::arm_sme
3908MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::SMops4WayOp)
3909MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::SMops4WayOpGenericAdaptorBase::Properties)
3910
3911namespace mlir::arm_sme {
3912
3913
3914//===----------------------------------------------------------------------===//
3915// ::mlir::arm_sme::StoreTileSliceOp declarations
3916//===----------------------------------------------------------------------===//
3917
3918namespace detail {
3919
3920class StoreTileSliceOpGenericAdaptorBase {
3921public:
3922 struct Properties {
3923 using layoutTy = ::mlir::arm_sme::TileSliceLayoutAttr;
3924 layoutTy layout;
3925
3926 auto getLayout() const {
3927 auto &propStorage = this->layout;
3928 return ::llvm::dyn_cast_or_null<::mlir::arm_sme::TileSliceLayoutAttr>(Val: propStorage);
3929 }
3930 void setLayout(const ::mlir::arm_sme::TileSliceLayoutAttr &propValue) {
3931 this->layout = propValue;
3932 }
3933 bool operator==(const Properties &rhs) const {
3934 return
3935 rhs.layout == this->layout &&
3936 true;
3937 }
3938 bool operator!=(const Properties &rhs) const {
3939 return !(*this == rhs);
3940 }
3941 };
3942protected:
3943 ::mlir::DictionaryAttr odsAttrs;
3944 ::std::optional<::mlir::OperationName> odsOpName;
3945 Properties properties;
3946 ::mlir::RegionRange odsRegions;
3947public:
3948 StoreTileSliceOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
3949 odsOpName.emplace(args: "arm_sme.store_tile_slice", args: odsAttrs.getContext());
3950 }
3951
3952 StoreTileSliceOpGenericAdaptorBase(StoreTileSliceOp op);
3953
3954 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
3955 const Properties &getProperties() {
3956 return properties;
3957 }
3958
3959 ::mlir::DictionaryAttr getAttributes() {
3960 return odsAttrs;
3961 }
3962
3963 ::mlir::arm_sme::TileSliceLayoutAttr getLayoutAttr();
3964 ::mlir::arm_sme::TileSliceLayout getLayout();
3965};
3966
3967} // namespace detail
3968template <typename RangeT>
3969class StoreTileSliceOpGenericAdaptor : public detail::StoreTileSliceOpGenericAdaptorBase {
3970 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
3971 using Base = detail::StoreTileSliceOpGenericAdaptorBase;
3972 static constexpr int odsIndex_tile = 0;
3973 static constexpr int odsIndex_tile_slice_index = 1;
3974 static constexpr int odsIndex_mask = 2;
3975 static constexpr int odsIndex_base = 3;
3976 static constexpr int odsIndex_indices = 4;
3977public:
3978 StoreTileSliceOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
3979
3980 StoreTileSliceOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : StoreTileSliceOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
3981
3982 StoreTileSliceOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : StoreTileSliceOpGenericAdaptor(values, attrs, Properties{}, {}) {}
3983
3984 StoreTileSliceOpGenericAdaptor(RangeT values, const StoreTileSliceOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
3985
3986 template <typename LateInst = StoreTileSliceOp, typename = std::enable_if_t<std::is_same_v<LateInst, StoreTileSliceOp>>>
3987 StoreTileSliceOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
3988
3989 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
3990 return Base::getODSOperandIndexAndLength(index, odsOperandsSize: odsOperands.size());
3991 }
3992
3993 RangeT getODSOperands(unsigned index) {
3994 auto valueRange = getODSOperandIndexAndLength(index);
3995 return {std::next(odsOperands.begin(), valueRange.first),
3996 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
3997 }
3998
3999 ValueT getTile() {
4000 return (*getODSOperands(index: 0).begin());
4001 }
4002
4003 ValueT getTileSliceIndex() {
4004 return (*getODSOperands(index: 1).begin());
4005 }
4006
4007 ValueT getMask() {
4008 return (*getODSOperands(index: 2).begin());
4009 }
4010
4011 ValueT getBase() {
4012 return (*getODSOperands(index: 3).begin());
4013 }
4014
4015 RangeT getIndices() {
4016 return getODSOperands(index: 4);
4017 }
4018
4019 RangeT getOperands() {
4020 return odsOperands;
4021 }
4022
4023private:
4024 RangeT odsOperands;
4025};
4026class StoreTileSliceOpAdaptor : public StoreTileSliceOpGenericAdaptor<::mlir::ValueRange> {
4027public:
4028 using StoreTileSliceOpGenericAdaptor::StoreTileSliceOpGenericAdaptor;
4029 StoreTileSliceOpAdaptor(StoreTileSliceOp op);
4030
4031 ::llvm::LogicalResult verify(::mlir::Location loc);
4032};
4033class StoreTileSliceOp : public ::mlir::Op<StoreTileSliceOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<4>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::arm_sme::ArmSMETileOpInterface::Trait, ::mlir::MemoryEffectOpInterface::Trait> {
4034public:
4035 using Op::Op;
4036 using Op::print;
4037 using Adaptor = StoreTileSliceOpAdaptor;
4038 template <typename RangeT>
4039 using GenericAdaptor = StoreTileSliceOpGenericAdaptor<RangeT>;
4040 using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
4041 static constexpr int odsIndex_tile = 0;
4042 static constexpr int odsIndex_tile_slice_index = 1;
4043 static constexpr int odsIndex_mask = 2;
4044 static constexpr int odsIndex_base = 3;
4045 static constexpr int odsIndex_indices = 4;
4046 using Properties = FoldAdaptor::Properties;
4047 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
4048 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("layout")};
4049 return ::llvm::ArrayRef(attrNames);
4050 }
4051
4052 ::mlir::StringAttr getLayoutAttrName() {
4053 return getAttributeNameForIndex(index: 0);
4054 }
4055
4056 static ::mlir::StringAttr getLayoutAttrName(::mlir::OperationName name) {
4057 return getAttributeNameForIndex(name, index: 0);
4058 }
4059
4060 static constexpr ::llvm::StringLiteral getOperationName() {
4061 return ::llvm::StringLiteral("arm_sme.store_tile_slice");
4062 }
4063
4064 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
4065 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
4066 auto [start, length] = getODSOperandIndexAndLength(index);
4067 return getOperation()->getOperands().slice(n: start, m: length);
4068 }
4069
4070 ::mlir::TypedValue<VectorType> getTile() {
4071 return ::llvm::cast<::mlir::TypedValue<VectorType>>(Val: *getODSOperands(index: 0).begin());
4072 }
4073
4074 ::mlir::TypedValue<::mlir::IndexType> getTileSliceIndex() {
4075 return ::llvm::cast<::mlir::TypedValue<::mlir::IndexType>>(Val: *getODSOperands(index: 1).begin());
4076 }
4077
4078 ::mlir::TypedValue<::mlir::VectorType> getMask() {
4079 return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *getODSOperands(index: 2).begin());
4080 }
4081
4082 ::mlir::TypedValue<::mlir::MemRefType> getBase() {
4083 return ::llvm::cast<::mlir::TypedValue<::mlir::MemRefType>>(Val: *getODSOperands(index: 3).begin());
4084 }
4085
4086 ::mlir::Operation::operand_range getIndices() {
4087 return getODSOperands(index: 4);
4088 }
4089
4090 ::mlir::OpOperand &getTileMutable() {
4091 auto range = getODSOperandIndexAndLength(index: 0);
4092 return getOperation()->getOpOperand(idx: range.first);
4093 }
4094
4095 ::mlir::OpOperand &getTileSliceIndexMutable() {
4096 auto range = getODSOperandIndexAndLength(index: 1);
4097 return getOperation()->getOpOperand(idx: range.first);
4098 }
4099
4100 ::mlir::OpOperand &getMaskMutable() {
4101 auto range = getODSOperandIndexAndLength(index: 2);
4102 return getOperation()->getOpOperand(idx: range.first);
4103 }
4104
4105 ::mlir::OpOperand &getBaseMutable() {
4106 auto range = getODSOperandIndexAndLength(index: 3);
4107 return getOperation()->getOpOperand(idx: range.first);
4108 }
4109
4110 ::mlir::MutableOperandRange getIndicesMutable();
4111 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
4112 return {index, 1};
4113 }
4114
4115 ::mlir::Operation::result_range getODSResults(unsigned index) {
4116 auto valueRange = getODSResultIndexAndLength(index);
4117 return {std::next(x: getOperation()->result_begin(), n: valueRange.first),
4118 std::next(x: getOperation()->result_begin(), n: valueRange.first + valueRange.second)};
4119 }
4120
4121 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
4122 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
4123 static llvm::hash_code computePropertiesHash(const Properties &prop);
4124 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
4125 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
4126 static void walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor);
4127 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
4128 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
4129 void writeProperties(::mlir::DialectBytecodeWriter &writer);
4130 ::mlir::arm_sme::TileSliceLayoutAttr getLayoutAttr() {
4131 return ::llvm::dyn_cast_or_null<::mlir::arm_sme::TileSliceLayoutAttr>(Val&: getProperties().layout);
4132 }
4133
4134 ::mlir::arm_sme::TileSliceLayout getLayout();
4135 void setLayoutAttr(::mlir::arm_sme::TileSliceLayoutAttr attr) {
4136 getProperties().layout = attr;
4137 }
4138
4139 void setLayout(::mlir::arm_sme::TileSliceLayout attrValue);
4140 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::Value mask, ::mlir::Value base, ::mlir::ValueRange indices, ::mlir::arm_sme::TileSliceLayoutAttr layout);
4141 static StoreTileSliceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::Value mask, ::mlir::Value base, ::mlir::ValueRange indices, ::mlir::arm_sme::TileSliceLayoutAttr layout);
4142 static StoreTileSliceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::Value mask, ::mlir::Value base, ::mlir::ValueRange indices, ::mlir::arm_sme::TileSliceLayoutAttr layout);
4143 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::Value mask, ::mlir::Value base, ::mlir::ValueRange indices, ::mlir::arm_sme::TileSliceLayoutAttr layout);
4144 static StoreTileSliceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::Value mask, ::mlir::Value base, ::mlir::ValueRange indices, ::mlir::arm_sme::TileSliceLayoutAttr layout);
4145 static StoreTileSliceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::Value mask, ::mlir::Value base, ::mlir::ValueRange indices, ::mlir::arm_sme::TileSliceLayoutAttr layout);
4146 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::Value mask, ::mlir::Value base, ::mlir::ValueRange indices, ::mlir::arm_sme::TileSliceLayout layout = TileSliceLayout::Horizontal);
4147 static StoreTileSliceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::Value mask, ::mlir::Value base, ::mlir::ValueRange indices, ::mlir::arm_sme::TileSliceLayout layout = TileSliceLayout::Horizontal);
4148 static StoreTileSliceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::Value mask, ::mlir::Value base, ::mlir::ValueRange indices, ::mlir::arm_sme::TileSliceLayout layout = TileSliceLayout::Horizontal);
4149 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::Value mask, ::mlir::Value base, ::mlir::ValueRange indices, ::mlir::arm_sme::TileSliceLayout layout = TileSliceLayout::Horizontal);
4150 static StoreTileSliceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::Value mask, ::mlir::Value base, ::mlir::ValueRange indices, ::mlir::arm_sme::TileSliceLayout layout = TileSliceLayout::Horizontal);
4151 static StoreTileSliceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value tile, ::mlir::Value tile_slice_index, ::mlir::Value mask, ::mlir::Value base, ::mlir::ValueRange indices, ::mlir::arm_sme::TileSliceLayout layout = TileSliceLayout::Horizontal);
4152 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
4153 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
4154 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
4155 static StoreTileSliceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
4156 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
4157 static StoreTileSliceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
4158 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
4159 static StoreTileSliceOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
4160 static StoreTileSliceOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
4161 static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
4162 ::llvm::LogicalResult verifyInvariantsImpl();
4163 ::llvm::LogicalResult verifyInvariants();
4164 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
4165 LLVM_ATTRIBUTE_MINSIZE void print(::mlir::OpAsmPrinter &_odsPrinter);
4166 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
4167private:
4168 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
4169 return getAttributeNameForIndex(name: (*this)->getName(), index);
4170 }
4171
4172 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
4173 assert(index < 1 && "invalid attribute index");
4174 assert(name.getStringRef() == getOperationName() && "invalid operation name");
4175 assert(name.isRegistered() && "Operation isn't registered, missing a "
4176 "dependent dialect loading?");
4177 return name.getAttributeNames()[index];
4178 }
4179
4180 static void buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes);
4181public:
4182 MemRefType getMemRefType() {
4183 return ::llvm::cast<MemRefType>(Val: getBase().getType());
4184 }
4185 VectorType getVectorType() {
4186 return ::llvm::cast<VectorType>(Val: getTile().getType());
4187 }
4188 VectorType getTileType() {
4189 return getVectorType();
4190 }
4191};
4192
4193} // namespace mlir::arm_sme
4194MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::StoreTileSliceOp)
4195MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::StoreTileSliceOpGenericAdaptorBase::Properties)
4196
4197namespace mlir::arm_sme {
4198
4199
4200//===----------------------------------------------------------------------===//
4201// ::mlir::arm_sme::StreamingVLOp declarations
4202//===----------------------------------------------------------------------===//
4203
4204namespace detail {
4205
4206class StreamingVLOpGenericAdaptorBase {
4207public:
4208 struct Properties {
4209 using type_sizeTy = ::mlir::arm_sme::TypeSizeAttr;
4210 type_sizeTy type_size;
4211
4212 auto getTypeSize() const {
4213 auto &propStorage = this->type_size;
4214 return ::llvm::cast<::mlir::arm_sme::TypeSizeAttr>(Val: propStorage);
4215 }
4216 void setTypeSize(const ::mlir::arm_sme::TypeSizeAttr &propValue) {
4217 this->type_size = propValue;
4218 }
4219 bool operator==(const Properties &rhs) const {
4220 return
4221 rhs.type_size == this->type_size &&
4222 true;
4223 }
4224 bool operator!=(const Properties &rhs) const {
4225 return !(*this == rhs);
4226 }
4227 };
4228protected:
4229 ::mlir::DictionaryAttr odsAttrs;
4230 ::std::optional<::mlir::OperationName> odsOpName;
4231 Properties properties;
4232 ::mlir::RegionRange odsRegions;
4233public:
4234 StreamingVLOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
4235 odsOpName.emplace(args: "arm_sme.streaming_vl", args: odsAttrs.getContext());
4236 }
4237
4238 StreamingVLOpGenericAdaptorBase(StreamingVLOp op);
4239
4240 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
4241 return {index, 1};
4242 }
4243
4244 const Properties &getProperties() {
4245 return properties;
4246 }
4247
4248 ::mlir::DictionaryAttr getAttributes() {
4249 return odsAttrs;
4250 }
4251
4252 ::mlir::arm_sme::TypeSizeAttr getTypeSizeAttr() {
4253 auto attr = ::llvm::cast<::mlir::arm_sme::TypeSizeAttr>(Val: getProperties().type_size);
4254 return attr;
4255 }
4256
4257 ::mlir::arm_sme::TypeSize getTypeSize();
4258};
4259
4260} // namespace detail
4261template <typename RangeT>
4262class StreamingVLOpGenericAdaptor : public detail::StreamingVLOpGenericAdaptorBase {
4263 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
4264 using Base = detail::StreamingVLOpGenericAdaptorBase;
4265public:
4266 StreamingVLOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
4267
4268 StreamingVLOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : StreamingVLOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
4269
4270 StreamingVLOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : StreamingVLOpGenericAdaptor(values, attrs, Properties{}, {}) {}
4271
4272 StreamingVLOpGenericAdaptor(RangeT values, const StreamingVLOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
4273
4274 template <typename LateInst = StreamingVLOp, typename = std::enable_if_t<std::is_same_v<LateInst, StreamingVLOp>>>
4275 StreamingVLOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
4276
4277 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
4278 return Base::getODSOperandIndexAndLength(index, odsOperandsSize: odsOperands.size());
4279 }
4280
4281 RangeT getODSOperands(unsigned index) {
4282 auto valueRange = getODSOperandIndexAndLength(index);
4283 return {std::next(odsOperands.begin(), valueRange.first),
4284 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
4285 }
4286
4287 RangeT getOperands() {
4288 return odsOperands;
4289 }
4290
4291private:
4292 RangeT odsOperands;
4293};
4294class StreamingVLOpAdaptor : public StreamingVLOpGenericAdaptor<::mlir::ValueRange> {
4295public:
4296 using StreamingVLOpGenericAdaptor::StreamingVLOpGenericAdaptor;
4297 StreamingVLOpAdaptor(StreamingVLOp op);
4298
4299 ::llvm::LogicalResult verify(::mlir::Location loc);
4300};
4301class StreamingVLOp : public ::mlir::Op<StreamingVLOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IndexType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
4302public:
4303 using Op::Op;
4304 using Op::print;
4305 using Adaptor = StreamingVLOpAdaptor;
4306 template <typename RangeT>
4307 using GenericAdaptor = StreamingVLOpGenericAdaptor<RangeT>;
4308 using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
4309 using Properties = FoldAdaptor::Properties;
4310 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
4311 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("type_size")};
4312 return ::llvm::ArrayRef(attrNames);
4313 }
4314
4315 ::mlir::StringAttr getTypeSizeAttrName() {
4316 return getAttributeNameForIndex(index: 0);
4317 }
4318
4319 static ::mlir::StringAttr getTypeSizeAttrName(::mlir::OperationName name) {
4320 return getAttributeNameForIndex(name, index: 0);
4321 }
4322
4323 static constexpr ::llvm::StringLiteral getOperationName() {
4324 return ::llvm::StringLiteral("arm_sme.streaming_vl");
4325 }
4326
4327 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
4328 return {index, 1};
4329 }
4330
4331 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
4332 auto [start, length] = getODSOperandIndexAndLength(index);
4333 return getOperation()->getOperands().slice(n: start, m: length);
4334 }
4335
4336 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
4337 return {index, 1};
4338 }
4339
4340 ::mlir::Operation::result_range getODSResults(unsigned index) {
4341 auto valueRange = getODSResultIndexAndLength(index);
4342 return {std::next(x: getOperation()->result_begin(), n: valueRange.first),
4343 std::next(x: getOperation()->result_begin(), n: valueRange.first + valueRange.second)};
4344 }
4345
4346 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
4347 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
4348 static llvm::hash_code computePropertiesHash(const Properties &prop);
4349 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
4350 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
4351 static void walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor);
4352 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
4353 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
4354 void writeProperties(::mlir::DialectBytecodeWriter &writer);
4355 ::mlir::arm_sme::TypeSizeAttr getTypeSizeAttr() {
4356 return ::llvm::cast<::mlir::arm_sme::TypeSizeAttr>(Val&: getProperties().type_size);
4357 }
4358
4359 ::mlir::arm_sme::TypeSize getTypeSize();
4360 void setTypeSizeAttr(::mlir::arm_sme::TypeSizeAttr attr) {
4361 getProperties().type_size = attr;
4362 }
4363
4364 void setTypeSize(::mlir::arm_sme::TypeSize attrValue);
4365 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type resultType0, ::mlir::arm_sme::TypeSizeAttr type_size);
4366 static StreamingVLOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type resultType0, ::mlir::arm_sme::TypeSizeAttr type_size);
4367 static StreamingVLOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type resultType0, ::mlir::arm_sme::TypeSizeAttr type_size);
4368 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::arm_sme::TypeSizeAttr type_size);
4369 static StreamingVLOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::arm_sme::TypeSizeAttr type_size);
4370 static StreamingVLOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::arm_sme::TypeSizeAttr type_size);
4371 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::arm_sme::TypeSizeAttr type_size);
4372 static StreamingVLOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::arm_sme::TypeSizeAttr type_size);
4373 static StreamingVLOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::arm_sme::TypeSizeAttr type_size);
4374 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type resultType0, ::mlir::arm_sme::TypeSize type_size);
4375 static StreamingVLOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type resultType0, ::mlir::arm_sme::TypeSize type_size);
4376 static StreamingVLOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type resultType0, ::mlir::arm_sme::TypeSize type_size);
4377 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::arm_sme::TypeSize type_size);
4378 static StreamingVLOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::arm_sme::TypeSize type_size);
4379 static StreamingVLOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::arm_sme::TypeSize type_size);
4380 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::arm_sme::TypeSize type_size);
4381 static StreamingVLOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::arm_sme::TypeSize type_size);
4382 static StreamingVLOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::arm_sme::TypeSize type_size);
4383 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
4384 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
4385 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
4386 static StreamingVLOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
4387 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
4388 static StreamingVLOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
4389 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
4390 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
4391 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
4392 static StreamingVLOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
4393 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
4394 static StreamingVLOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
4395 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
4396 static StreamingVLOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
4397 static StreamingVLOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
4398 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
4399 static StreamingVLOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
4400 static StreamingVLOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
4401 ::llvm::LogicalResult verifyInvariantsImpl();
4402 ::llvm::LogicalResult verifyInvariants();
4403 static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
4404 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
4405 LLVM_ATTRIBUTE_MINSIZE void print(::mlir::OpAsmPrinter &_odsPrinter);
4406 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
4407private:
4408 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
4409 return getAttributeNameForIndex(name: (*this)->getName(), index);
4410 }
4411
4412 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
4413 assert(index < 1 && "invalid attribute index");
4414 assert(name.getStringRef() == getOperationName() && "invalid operation name");
4415 assert(name.isRegistered() && "Operation isn't registered, missing a "
4416 "dependent dialect loading?");
4417 return name.getAttributeNames()[index];
4418 }
4419
4420 static void buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes);
4421public:
4422};
4423
4424} // namespace mlir::arm_sme
4425MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::StreamingVLOp)
4426MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::StreamingVLOpGenericAdaptorBase::Properties)
4427
4428namespace mlir::arm_sme {
4429
4430
4431//===----------------------------------------------------------------------===//
4432// ::mlir::arm_sme::SuMopa4WayOp declarations
4433//===----------------------------------------------------------------------===//
4434
4435namespace detail {
4436
4437class SuMopa4WayOpGenericAdaptorBase {
4438public:
4439 struct Properties {
4440 using operandSegmentSizesTy = std::array<int32_t, 5>;
4441 operandSegmentSizesTy operandSegmentSizes;
4442 ::llvm::ArrayRef<int32_t> getOperandSegmentSizes() const {
4443 auto &propStorage = this->operandSegmentSizes;
4444 return propStorage;
4445 }
4446 void setOperandSegmentSizes(::llvm::ArrayRef<int32_t> propValue) {
4447 auto &propStorage = this->operandSegmentSizes;
4448 ::llvm::copy(Range&: propValue, Out: propStorage.begin());
4449 }
4450 bool operator==(const Properties &rhs) const {
4451 return
4452 rhs.operandSegmentSizes == this->operandSegmentSizes &&
4453 true;
4454 }
4455 bool operator!=(const Properties &rhs) const {
4456 return !(*this == rhs);
4457 }
4458 };
4459protected:
4460 ::mlir::DictionaryAttr odsAttrs;
4461 ::std::optional<::mlir::OperationName> odsOpName;
4462 Properties properties;
4463 ::mlir::RegionRange odsRegions;
4464public:
4465 SuMopa4WayOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
4466 odsOpName.emplace(args: "arm_sme.sumopa_4way", args: odsAttrs.getContext());
4467 }
4468
4469 SuMopa4WayOpGenericAdaptorBase(SuMopa4WayOp op);
4470
4471 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
4472 const Properties &getProperties() {
4473 return properties;
4474 }
4475
4476 ::mlir::DictionaryAttr getAttributes() {
4477 return odsAttrs;
4478 }
4479
4480};
4481
4482} // namespace detail
4483template <typename RangeT>
4484class SuMopa4WayOpGenericAdaptor : public detail::SuMopa4WayOpGenericAdaptorBase {
4485 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
4486 using Base = detail::SuMopa4WayOpGenericAdaptorBase;
4487 static constexpr int odsIndex_lhs = 0;
4488 static constexpr int odsIndex_rhs = 1;
4489 static constexpr int odsIndex_lhsMask = 2;
4490 static constexpr int odsIndex_rhsMask = 3;
4491 static constexpr int odsIndex_acc = 4;
4492public:
4493 SuMopa4WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
4494
4495 SuMopa4WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : SuMopa4WayOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
4496
4497 SuMopa4WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs) : SuMopa4WayOpGenericAdaptor(values, attrs, Properties{}, {}) {}
4498
4499 SuMopa4WayOpGenericAdaptor(RangeT values, const SuMopa4WayOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
4500
4501 template <typename LateInst = SuMopa4WayOp, typename = std::enable_if_t<std::is_same_v<LateInst, SuMopa4WayOp>>>
4502 SuMopa4WayOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
4503
4504 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
4505 return Base::getODSOperandIndexAndLength(index, odsOperandsSize: odsOperands.size());
4506 }
4507
4508 RangeT getODSOperands(unsigned index) {
4509 auto valueRange = getODSOperandIndexAndLength(index);
4510 return {std::next(odsOperands.begin(), valueRange.first),
4511 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
4512 }
4513
4514 ValueT getLhs() {
4515 return (*getODSOperands(index: 0).begin());
4516 }
4517
4518 ValueT getRhs() {
4519 return (*getODSOperands(index: 1).begin());
4520 }
4521
4522 ValueT getLhsMask() {
4523 auto operands = getODSOperands(index: 2);
4524 return operands.empty() ? ValueT{} : (*operands.begin());
4525 }
4526
4527 ValueT getRhsMask() {
4528 auto operands = getODSOperands(index: 3);
4529 return operands.empty() ? ValueT{} : (*operands.begin());
4530 }
4531
4532 ValueT getAcc() {
4533 auto operands = getODSOperands(index: 4);
4534 return operands.empty() ? ValueT{} : (*operands.begin());
4535 }
4536
4537 RangeT getOperands() {
4538 return odsOperands;
4539 }
4540
4541private:
4542 RangeT odsOperands;
4543};
4544class SuMopa4WayOpAdaptor : public SuMopa4WayOpGenericAdaptor<::mlir::ValueRange> {
4545public:
4546 using SuMopa4WayOpGenericAdaptor::SuMopa4WayOpGenericAdaptor;
4547 SuMopa4WayOpAdaptor(SuMopa4WayOp op);
4548
4549 ::llvm::LogicalResult verify(::mlir::Location loc);
4550};
4551class SuMopa4WayOp : public ::mlir::Op<SuMopa4WayOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<2>::Impl, ::mlir::OpTrait::AttrSizedOperandSegments, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::arm_sme::ArmSMETileOpInterface::Trait> {
4552public:
4553 using Op::Op;
4554 using Op::print;
4555 using Adaptor = SuMopa4WayOpAdaptor;
4556 template <typename RangeT>
4557 using GenericAdaptor = SuMopa4WayOpGenericAdaptor<RangeT>;
4558 using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
4559 static constexpr int odsIndex_lhs = 0;
4560 static constexpr int odsIndex_rhs = 1;
4561 static constexpr int odsIndex_lhsMask = 2;
4562 static constexpr int odsIndex_rhsMask = 3;
4563 static constexpr int odsIndex_acc = 4;
4564 static constexpr int odsIndex_result = 0;
4565 using Properties = FoldAdaptor::Properties;
4566 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
4567 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("operandSegmentSizes")};
4568 return ::llvm::ArrayRef(attrNames);
4569 }
4570
4571 ::mlir::StringAttr getOperandSegmentSizesAttrName() {
4572 return (*this)->getName().getAttributeNames().back();
4573 }
4574
4575 static ::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name) {
4576 return name.getAttributeNames().back();
4577 }
4578
4579 static constexpr ::llvm::StringLiteral getOperationName() {
4580 return ::llvm::StringLiteral("arm_sme.sumopa_4way");
4581 }
4582
4583 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
4584 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
4585 auto [start, length] = getODSOperandIndexAndLength(index);
4586 return getOperation()->getOperands().slice(n: start, m: length);
4587 }
4588
4589 ::mlir::TypedValue<::mlir::Type> getLhs() {
4590 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(Val: *getODSOperands(index: 0).begin());
4591 }
4592
4593 ::mlir::TypedValue<::mlir::VectorType> getRhs() {
4594 return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *getODSOperands(index: 1).begin());
4595 }
4596
4597 ::mlir::TypedValue<::mlir::VectorType> getLhsMask() {
4598 auto operands = getODSOperands(index: 2);
4599 return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *operands.begin());
4600 }
4601
4602 ::mlir::TypedValue<::mlir::VectorType> getRhsMask() {
4603 auto operands = getODSOperands(index: 3);
4604 return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *operands.begin());
4605 }
4606
4607 ::mlir::TypedValue<::mlir::VectorType> getAcc() {
4608 auto operands = getODSOperands(index: 4);
4609 return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *operands.begin());
4610 }
4611
4612 ::mlir::OpOperand &getLhsMutable() {
4613 auto range = getODSOperandIndexAndLength(index: 0);
4614 return getOperation()->getOpOperand(idx: range.first);
4615 }
4616
4617 ::mlir::OpOperand &getRhsMutable() {
4618 auto range = getODSOperandIndexAndLength(index: 1);
4619 return getOperation()->getOpOperand(idx: range.first);
4620 }
4621
4622 ::mlir::MutableOperandRange getLhsMaskMutable();
4623 ::mlir::MutableOperandRange getRhsMaskMutable();
4624 ::mlir::MutableOperandRange getAccMutable();
4625 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
4626 return {index, 1};
4627 }
4628
4629 ::mlir::Operation::result_range getODSResults(unsigned index) {
4630 auto valueRange = getODSResultIndexAndLength(index);
4631 return {std::next(x: getOperation()->result_begin(), n: valueRange.first),
4632 std::next(x: getOperation()->result_begin(), n: valueRange.first + valueRange.second)};
4633 }
4634
4635 ::mlir::TypedValue<::mlir::Type> getResult() {
4636 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(Val: *getODSResults(index: 0).begin());
4637 }
4638
4639 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
4640 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
4641 static llvm::hash_code computePropertiesHash(const Properties &prop);
4642 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
4643 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
4644 static void walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor);
4645 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
4646 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
4647 void writeProperties(::mlir::DialectBytecodeWriter &writer);
4648 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
4649 static SuMopa4WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
4650 static SuMopa4WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
4651 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
4652 static SuMopa4WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
4653 static SuMopa4WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
4654 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
4655 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
4656 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
4657 static SuMopa4WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
4658 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
4659 static SuMopa4WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
4660 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
4661 static SuMopa4WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
4662 static SuMopa4WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
4663 ::llvm::LogicalResult verifyInvariantsImpl();
4664 ::llvm::LogicalResult verifyInvariants();
4665 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
4666 LLVM_ATTRIBUTE_MINSIZE void print(::mlir::OpAsmPrinter &_odsPrinter);
4667 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
4668private:
4669 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
4670 return getAttributeNameForIndex(name: (*this)->getName(), index);
4671 }
4672
4673 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
4674 return {};
4675 }
4676
4677 static void buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes);
4678public:
4679 VectorType getLhsType() { return llvm::cast<VectorType>(Val: getLhs().getType()); }
4680 VectorType getRhsType() { return llvm::cast<VectorType>(Val: getRhs().getType()); }
4681 VectorType getResultType() { return llvm::cast<VectorType>(Val: getResult().getType()); }
4682 VectorType getTileType() {
4683 return getResultType();
4684 }
4685};
4686
4687} // namespace mlir::arm_sme
4688MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::SuMopa4WayOp)
4689MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::SuMopa4WayOpGenericAdaptorBase::Properties)
4690
4691namespace mlir::arm_sme {
4692
4693
4694//===----------------------------------------------------------------------===//
4695// ::mlir::arm_sme::SuMops4WayOp declarations
4696//===----------------------------------------------------------------------===//
4697
4698namespace detail {
4699
4700class SuMops4WayOpGenericAdaptorBase {
4701public:
4702 struct Properties {
4703 using operandSegmentSizesTy = std::array<int32_t, 5>;
4704 operandSegmentSizesTy operandSegmentSizes;
4705 ::llvm::ArrayRef<int32_t> getOperandSegmentSizes() const {
4706 auto &propStorage = this->operandSegmentSizes;
4707 return propStorage;
4708 }
4709 void setOperandSegmentSizes(::llvm::ArrayRef<int32_t> propValue) {
4710 auto &propStorage = this->operandSegmentSizes;
4711 ::llvm::copy(Range&: propValue, Out: propStorage.begin());
4712 }
4713 bool operator==(const Properties &rhs) const {
4714 return
4715 rhs.operandSegmentSizes == this->operandSegmentSizes &&
4716 true;
4717 }
4718 bool operator!=(const Properties &rhs) const {
4719 return !(*this == rhs);
4720 }
4721 };
4722protected:
4723 ::mlir::DictionaryAttr odsAttrs;
4724 ::std::optional<::mlir::OperationName> odsOpName;
4725 Properties properties;
4726 ::mlir::RegionRange odsRegions;
4727public:
4728 SuMops4WayOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
4729 odsOpName.emplace(args: "arm_sme.sumops_4way", args: odsAttrs.getContext());
4730 }
4731
4732 SuMops4WayOpGenericAdaptorBase(SuMops4WayOp op);
4733
4734 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
4735 const Properties &getProperties() {
4736 return properties;
4737 }
4738
4739 ::mlir::DictionaryAttr getAttributes() {
4740 return odsAttrs;
4741 }
4742
4743};
4744
4745} // namespace detail
4746template <typename RangeT>
4747class SuMops4WayOpGenericAdaptor : public detail::SuMops4WayOpGenericAdaptorBase {
4748 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
4749 using Base = detail::SuMops4WayOpGenericAdaptorBase;
4750 static constexpr int odsIndex_lhs = 0;
4751 static constexpr int odsIndex_rhs = 1;
4752 static constexpr int odsIndex_lhsMask = 2;
4753 static constexpr int odsIndex_rhsMask = 3;
4754 static constexpr int odsIndex_acc = 4;
4755public:
4756 SuMops4WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
4757
4758 SuMops4WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : SuMops4WayOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
4759
4760 SuMops4WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs) : SuMops4WayOpGenericAdaptor(values, attrs, Properties{}, {}) {}
4761
4762 SuMops4WayOpGenericAdaptor(RangeT values, const SuMops4WayOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
4763
4764 template <typename LateInst = SuMops4WayOp, typename = std::enable_if_t<std::is_same_v<LateInst, SuMops4WayOp>>>
4765 SuMops4WayOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
4766
4767 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
4768 return Base::getODSOperandIndexAndLength(index, odsOperandsSize: odsOperands.size());
4769 }
4770
4771 RangeT getODSOperands(unsigned index) {
4772 auto valueRange = getODSOperandIndexAndLength(index);
4773 return {std::next(odsOperands.begin(), valueRange.first),
4774 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
4775 }
4776
4777 ValueT getLhs() {
4778 return (*getODSOperands(index: 0).begin());
4779 }
4780
4781 ValueT getRhs() {
4782 return (*getODSOperands(index: 1).begin());
4783 }
4784
4785 ValueT getLhsMask() {
4786 auto operands = getODSOperands(index: 2);
4787 return operands.empty() ? ValueT{} : (*operands.begin());
4788 }
4789
4790 ValueT getRhsMask() {
4791 auto operands = getODSOperands(index: 3);
4792 return operands.empty() ? ValueT{} : (*operands.begin());
4793 }
4794
4795 ValueT getAcc() {
4796 auto operands = getODSOperands(index: 4);
4797 return operands.empty() ? ValueT{} : (*operands.begin());
4798 }
4799
4800 RangeT getOperands() {
4801 return odsOperands;
4802 }
4803
4804private:
4805 RangeT odsOperands;
4806};
4807class SuMops4WayOpAdaptor : public SuMops4WayOpGenericAdaptor<::mlir::ValueRange> {
4808public:
4809 using SuMops4WayOpGenericAdaptor::SuMops4WayOpGenericAdaptor;
4810 SuMops4WayOpAdaptor(SuMops4WayOp op);
4811
4812 ::llvm::LogicalResult verify(::mlir::Location loc);
4813};
4814class SuMops4WayOp : public ::mlir::Op<SuMops4WayOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<2>::Impl, ::mlir::OpTrait::AttrSizedOperandSegments, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::arm_sme::ArmSMETileOpInterface::Trait> {
4815public:
4816 using Op::Op;
4817 using Op::print;
4818 using Adaptor = SuMops4WayOpAdaptor;
4819 template <typename RangeT>
4820 using GenericAdaptor = SuMops4WayOpGenericAdaptor<RangeT>;
4821 using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
4822 static constexpr int odsIndex_lhs = 0;
4823 static constexpr int odsIndex_rhs = 1;
4824 static constexpr int odsIndex_lhsMask = 2;
4825 static constexpr int odsIndex_rhsMask = 3;
4826 static constexpr int odsIndex_acc = 4;
4827 static constexpr int odsIndex_result = 0;
4828 using Properties = FoldAdaptor::Properties;
4829 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
4830 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("operandSegmentSizes")};
4831 return ::llvm::ArrayRef(attrNames);
4832 }
4833
4834 ::mlir::StringAttr getOperandSegmentSizesAttrName() {
4835 return (*this)->getName().getAttributeNames().back();
4836 }
4837
4838 static ::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name) {
4839 return name.getAttributeNames().back();
4840 }
4841
4842 static constexpr ::llvm::StringLiteral getOperationName() {
4843 return ::llvm::StringLiteral("arm_sme.sumops_4way");
4844 }
4845
4846 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
4847 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
4848 auto [start, length] = getODSOperandIndexAndLength(index);
4849 return getOperation()->getOperands().slice(n: start, m: length);
4850 }
4851
4852 ::mlir::TypedValue<::mlir::Type> getLhs() {
4853 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(Val: *getODSOperands(index: 0).begin());
4854 }
4855
4856 ::mlir::TypedValue<::mlir::VectorType> getRhs() {
4857 return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *getODSOperands(index: 1).begin());
4858 }
4859
4860 ::mlir::TypedValue<::mlir::VectorType> getLhsMask() {
4861 auto operands = getODSOperands(index: 2);
4862 return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *operands.begin());
4863 }
4864
4865 ::mlir::TypedValue<::mlir::VectorType> getRhsMask() {
4866 auto operands = getODSOperands(index: 3);
4867 return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *operands.begin());
4868 }
4869
4870 ::mlir::TypedValue<::mlir::VectorType> getAcc() {
4871 auto operands = getODSOperands(index: 4);
4872 return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *operands.begin());
4873 }
4874
4875 ::mlir::OpOperand &getLhsMutable() {
4876 auto range = getODSOperandIndexAndLength(index: 0);
4877 return getOperation()->getOpOperand(idx: range.first);
4878 }
4879
4880 ::mlir::OpOperand &getRhsMutable() {
4881 auto range = getODSOperandIndexAndLength(index: 1);
4882 return getOperation()->getOpOperand(idx: range.first);
4883 }
4884
4885 ::mlir::MutableOperandRange getLhsMaskMutable();
4886 ::mlir::MutableOperandRange getRhsMaskMutable();
4887 ::mlir::MutableOperandRange getAccMutable();
4888 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
4889 return {index, 1};
4890 }
4891
4892 ::mlir::Operation::result_range getODSResults(unsigned index) {
4893 auto valueRange = getODSResultIndexAndLength(index);
4894 return {std::next(x: getOperation()->result_begin(), n: valueRange.first),
4895 std::next(x: getOperation()->result_begin(), n: valueRange.first + valueRange.second)};
4896 }
4897
4898 ::mlir::TypedValue<::mlir::Type> getResult() {
4899 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(Val: *getODSResults(index: 0).begin());
4900 }
4901
4902 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
4903 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
4904 static llvm::hash_code computePropertiesHash(const Properties &prop);
4905 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
4906 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
4907 static void walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor);
4908 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
4909 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
4910 void writeProperties(::mlir::DialectBytecodeWriter &writer);
4911 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
4912 static SuMops4WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
4913 static SuMops4WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
4914 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
4915 static SuMops4WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
4916 static SuMops4WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
4917 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
4918 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
4919 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
4920 static SuMops4WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
4921 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
4922 static SuMops4WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
4923 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
4924 static SuMops4WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
4925 static SuMops4WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
4926 ::llvm::LogicalResult verifyInvariantsImpl();
4927 ::llvm::LogicalResult verifyInvariants();
4928 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
4929 LLVM_ATTRIBUTE_MINSIZE void print(::mlir::OpAsmPrinter &_odsPrinter);
4930 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
4931private:
4932 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
4933 return getAttributeNameForIndex(name: (*this)->getName(), index);
4934 }
4935
4936 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
4937 return {};
4938 }
4939
4940 static void buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes);
4941public:
4942 VectorType getLhsType() { return llvm::cast<VectorType>(Val: getLhs().getType()); }
4943 VectorType getRhsType() { return llvm::cast<VectorType>(Val: getRhs().getType()); }
4944 VectorType getResultType() { return llvm::cast<VectorType>(Val: getResult().getType()); }
4945 VectorType getTileType() {
4946 return getResultType();
4947 }
4948};
4949
4950} // namespace mlir::arm_sme
4951MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::SuMops4WayOp)
4952MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::SuMops4WayOpGenericAdaptorBase::Properties)
4953
4954namespace mlir::arm_sme {
4955
4956
4957//===----------------------------------------------------------------------===//
4958// ::mlir::arm_sme::TileLoadOp declarations
4959//===----------------------------------------------------------------------===//
4960
4961namespace detail {
4962
4963class TileLoadOpGenericAdaptorBase {
4964public:
4965 struct Properties {
4966 using layoutTy = ::mlir::arm_sme::TileSliceLayoutAttr;
4967 layoutTy layout;
4968
4969 auto getLayout() const {
4970 auto &propStorage = this->layout;
4971 return ::llvm::dyn_cast_or_null<::mlir::arm_sme::TileSliceLayoutAttr>(Val: propStorage);
4972 }
4973 void setLayout(const ::mlir::arm_sme::TileSliceLayoutAttr &propValue) {
4974 this->layout = propValue;
4975 }
4976 using operandSegmentSizesTy = std::array<int32_t, 4>;
4977 operandSegmentSizesTy operandSegmentSizes;
4978 ::llvm::ArrayRef<int32_t> getOperandSegmentSizes() const {
4979 auto &propStorage = this->operandSegmentSizes;
4980 return propStorage;
4981 }
4982 void setOperandSegmentSizes(::llvm::ArrayRef<int32_t> propValue) {
4983 auto &propStorage = this->operandSegmentSizes;
4984 ::llvm::copy(Range&: propValue, Out: propStorage.begin());
4985 }
4986 bool operator==(const Properties &rhs) const {
4987 return
4988 rhs.layout == this->layout &&
4989 rhs.operandSegmentSizes == this->operandSegmentSizes &&
4990 true;
4991 }
4992 bool operator!=(const Properties &rhs) const {
4993 return !(*this == rhs);
4994 }
4995 };
4996protected:
4997 ::mlir::DictionaryAttr odsAttrs;
4998 ::std::optional<::mlir::OperationName> odsOpName;
4999 Properties properties;
5000 ::mlir::RegionRange odsRegions;
5001public:
5002 TileLoadOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
5003 odsOpName.emplace(args: "arm_sme.tile_load", args: odsAttrs.getContext());
5004 }
5005
5006 TileLoadOpGenericAdaptorBase(TileLoadOp op);
5007
5008 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
5009 const Properties &getProperties() {
5010 return properties;
5011 }
5012
5013 ::mlir::DictionaryAttr getAttributes() {
5014 return odsAttrs;
5015 }
5016
5017 ::mlir::arm_sme::TileSliceLayoutAttr getLayoutAttr();
5018 ::mlir::arm_sme::TileSliceLayout getLayout();
5019};
5020
5021} // namespace detail
5022template <typename RangeT>
5023class TileLoadOpGenericAdaptor : public detail::TileLoadOpGenericAdaptorBase {
5024 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
5025 using Base = detail::TileLoadOpGenericAdaptorBase;
5026 static constexpr int odsIndex_base = 0;
5027 static constexpr int odsIndex_indices = 1;
5028 static constexpr int odsIndex_padding = 2;
5029 static constexpr int odsIndex_mask = 3;
5030public:
5031 TileLoadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
5032
5033 TileLoadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : TileLoadOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
5034
5035 TileLoadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs) : TileLoadOpGenericAdaptor(values, attrs, Properties{}, {}) {}
5036
5037 TileLoadOpGenericAdaptor(RangeT values, const TileLoadOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
5038
5039 template <typename LateInst = TileLoadOp, typename = std::enable_if_t<std::is_same_v<LateInst, TileLoadOp>>>
5040 TileLoadOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
5041
5042 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
5043 return Base::getODSOperandIndexAndLength(index, odsOperandsSize: odsOperands.size());
5044 }
5045
5046 RangeT getODSOperands(unsigned index) {
5047 auto valueRange = getODSOperandIndexAndLength(index);
5048 return {std::next(odsOperands.begin(), valueRange.first),
5049 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
5050 }
5051
5052 ValueT getBase() {
5053 return (*getODSOperands(index: 0).begin());
5054 }
5055
5056 RangeT getIndices() {
5057 return getODSOperands(index: 1);
5058 }
5059
5060 ValueT getPadding() {
5061 auto operands = getODSOperands(index: 2);
5062 return operands.empty() ? ValueT{} : (*operands.begin());
5063 }
5064
5065 ValueT getMask() {
5066 auto operands = getODSOperands(index: 3);
5067 return operands.empty() ? ValueT{} : (*operands.begin());
5068 }
5069
5070 RangeT getOperands() {
5071 return odsOperands;
5072 }
5073
5074private:
5075 RangeT odsOperands;
5076};
5077class TileLoadOpAdaptor : public TileLoadOpGenericAdaptor<::mlir::ValueRange> {
5078public:
5079 using TileLoadOpGenericAdaptor::TileLoadOpGenericAdaptor;
5080 TileLoadOpAdaptor(TileLoadOp op);
5081
5082 ::llvm::LogicalResult verify(::mlir::Location loc);
5083};
5084class TileLoadOp : public ::mlir::Op<TileLoadOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<VectorType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<1>::Impl, ::mlir::OpTrait::AttrSizedOperandSegments, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::arm_sme::ArmSMETileOpInterface::Trait, ::mlir::MemoryEffectOpInterface::Trait> {
5085public:
5086 using Op::Op;
5087 using Op::print;
5088 using Adaptor = TileLoadOpAdaptor;
5089 template <typename RangeT>
5090 using GenericAdaptor = TileLoadOpGenericAdaptor<RangeT>;
5091 using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
5092 static constexpr int odsIndex_base = 0;
5093 static constexpr int odsIndex_indices = 1;
5094 static constexpr int odsIndex_padding = 2;
5095 static constexpr int odsIndex_mask = 3;
5096 static constexpr int odsIndex_result = 0;
5097 using Properties = FoldAdaptor::Properties;
5098 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
5099 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("layout"), ::llvm::StringRef("operandSegmentSizes")};
5100 return ::llvm::ArrayRef(attrNames);
5101 }
5102
5103 ::mlir::StringAttr getLayoutAttrName() {
5104 return getAttributeNameForIndex(index: 0);
5105 }
5106
5107 static ::mlir::StringAttr getLayoutAttrName(::mlir::OperationName name) {
5108 return getAttributeNameForIndex(name, index: 0);
5109 }
5110
5111 ::mlir::StringAttr getOperandSegmentSizesAttrName() {
5112 return (*this)->getName().getAttributeNames().back();
5113 }
5114
5115 static ::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name) {
5116 return name.getAttributeNames().back();
5117 }
5118
5119 static constexpr ::llvm::StringLiteral getOperationName() {
5120 return ::llvm::StringLiteral("arm_sme.tile_load");
5121 }
5122
5123 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
5124 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
5125 auto [start, length] = getODSOperandIndexAndLength(index);
5126 return getOperation()->getOperands().slice(n: start, m: length);
5127 }
5128
5129 ::mlir::TypedValue<::mlir::MemRefType> getBase() {
5130 return ::llvm::cast<::mlir::TypedValue<::mlir::MemRefType>>(Val: *getODSOperands(index: 0).begin());
5131 }
5132
5133 ::mlir::Operation::operand_range getIndices() {
5134 return getODSOperands(index: 1);
5135 }
5136
5137 ::mlir::TypedValue<::mlir::Type> getPadding() {
5138 auto operands = getODSOperands(index: 2);
5139 return operands.empty() ? ::mlir::TypedValue<::mlir::Type>{} : ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(Val: *operands.begin());
5140 }
5141
5142 ::mlir::TypedValue<::mlir::VectorType> getMask() {
5143 auto operands = getODSOperands(index: 3);
5144 return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *operands.begin());
5145 }
5146
5147 ::mlir::OpOperand &getBaseMutable() {
5148 auto range = getODSOperandIndexAndLength(index: 0);
5149 return getOperation()->getOpOperand(idx: range.first);
5150 }
5151
5152 ::mlir::MutableOperandRange getIndicesMutable();
5153 ::mlir::MutableOperandRange getPaddingMutable();
5154 ::mlir::MutableOperandRange getMaskMutable();
5155 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
5156 return {index, 1};
5157 }
5158
5159 ::mlir::Operation::result_range getODSResults(unsigned index) {
5160 auto valueRange = getODSResultIndexAndLength(index);
5161 return {std::next(x: getOperation()->result_begin(), n: valueRange.first),
5162 std::next(x: getOperation()->result_begin(), n: valueRange.first + valueRange.second)};
5163 }
5164
5165 ::mlir::TypedValue<VectorType> getResult() {
5166 return ::llvm::cast<::mlir::TypedValue<VectorType>>(Val: *getODSResults(index: 0).begin());
5167 }
5168
5169 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
5170 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
5171 static llvm::hash_code computePropertiesHash(const Properties &prop);
5172 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
5173 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
5174 static void walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor);
5175 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
5176 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
5177 void writeProperties(::mlir::DialectBytecodeWriter &writer);
5178 ::mlir::arm_sme::TileSliceLayoutAttr getLayoutAttr() {
5179 return ::llvm::dyn_cast_or_null<::mlir::arm_sme::TileSliceLayoutAttr>(Val&: getProperties().layout);
5180 }
5181
5182 ::mlir::arm_sme::TileSliceLayout getLayout();
5183 void setLayoutAttr(::mlir::arm_sme::TileSliceLayoutAttr attr) {
5184 getProperties().layout = attr;
5185 }
5186
5187 void setLayout(::mlir::arm_sme::TileSliceLayout attrValue);
5188 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, VectorType resultType, Value base, ValueRange indices, TileSliceLayout layout);
5189 static TileLoadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, VectorType resultType, Value base, ValueRange indices, TileSliceLayout layout);
5190 static TileLoadOp create(::mlir::ImplicitLocOpBuilder &builder, VectorType resultType, Value base, ValueRange indices, TileSliceLayout layout);
5191 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, VectorType resultType, Value base, ValueRange indices);
5192 static TileLoadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, VectorType resultType, Value base, ValueRange indices);
5193 static TileLoadOp create(::mlir::ImplicitLocOpBuilder &builder, VectorType resultType, Value base, ValueRange indices);
5194 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value base, ::mlir::ValueRange indices, /*optional*/::mlir::Value padding, /*optional*/::mlir::Value mask, ::mlir::arm_sme::TileSliceLayoutAttr layout);
5195 static TileLoadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value base, ::mlir::ValueRange indices, /*optional*/::mlir::Value padding, /*optional*/::mlir::Value mask, ::mlir::arm_sme::TileSliceLayoutAttr layout);
5196 static TileLoadOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value base, ::mlir::ValueRange indices, /*optional*/::mlir::Value padding, /*optional*/::mlir::Value mask, ::mlir::arm_sme::TileSliceLayoutAttr layout);
5197 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value base, ::mlir::ValueRange indices, /*optional*/::mlir::Value padding, /*optional*/::mlir::Value mask, ::mlir::arm_sme::TileSliceLayoutAttr layout);
5198 static TileLoadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value base, ::mlir::ValueRange indices, /*optional*/::mlir::Value padding, /*optional*/::mlir::Value mask, ::mlir::arm_sme::TileSliceLayoutAttr layout);
5199 static TileLoadOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value base, ::mlir::ValueRange indices, /*optional*/::mlir::Value padding, /*optional*/::mlir::Value mask, ::mlir::arm_sme::TileSliceLayoutAttr layout);
5200 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value base, ::mlir::ValueRange indices, /*optional*/::mlir::Value padding, /*optional*/::mlir::Value mask, ::mlir::arm_sme::TileSliceLayout layout = TileSliceLayout::Horizontal);
5201 static TileLoadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value base, ::mlir::ValueRange indices, /*optional*/::mlir::Value padding, /*optional*/::mlir::Value mask, ::mlir::arm_sme::TileSliceLayout layout = TileSliceLayout::Horizontal);
5202 static TileLoadOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value base, ::mlir::ValueRange indices, /*optional*/::mlir::Value padding, /*optional*/::mlir::Value mask, ::mlir::arm_sme::TileSliceLayout layout = TileSliceLayout::Horizontal);
5203 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value base, ::mlir::ValueRange indices, /*optional*/::mlir::Value padding, /*optional*/::mlir::Value mask, ::mlir::arm_sme::TileSliceLayout layout = TileSliceLayout::Horizontal);
5204 static TileLoadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value base, ::mlir::ValueRange indices, /*optional*/::mlir::Value padding, /*optional*/::mlir::Value mask, ::mlir::arm_sme::TileSliceLayout layout = TileSliceLayout::Horizontal);
5205 static TileLoadOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value base, ::mlir::ValueRange indices, /*optional*/::mlir::Value padding, /*optional*/::mlir::Value mask, ::mlir::arm_sme::TileSliceLayout layout = TileSliceLayout::Horizontal);
5206 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
5207 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
5208 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
5209 static TileLoadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
5210 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
5211 static TileLoadOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
5212 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
5213 static TileLoadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
5214 static TileLoadOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
5215 static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
5216 ::llvm::LogicalResult verifyInvariantsImpl();
5217 ::llvm::LogicalResult verifyInvariants();
5218 ::llvm::LogicalResult verify();
5219 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
5220 LLVM_ATTRIBUTE_MINSIZE void print(::mlir::OpAsmPrinter &_odsPrinter);
5221 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
5222private:
5223 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
5224 return getAttributeNameForIndex(name: (*this)->getName(), index);
5225 }
5226
5227 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
5228 assert(index < 1 && "invalid attribute index");
5229 assert(name.getStringRef() == getOperationName() && "invalid operation name");
5230 assert(name.isRegistered() && "Operation isn't registered, missing a "
5231 "dependent dialect loading?");
5232 return name.getAttributeNames()[index];
5233 }
5234
5235 static void buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes);
5236public:
5237 MemRefType getMemRefType() {
5238 return ::llvm::cast<MemRefType>(Val: getBase().getType());
5239 }
5240 VectorType getVectorType() {
5241 return ::llvm::cast<VectorType>(Val: getResult().getType());
5242 }
5243 VectorType getTileType() {
5244 return getVectorType();
5245 }
5246};
5247
5248} // namespace mlir::arm_sme
5249MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::TileLoadOp)
5250MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::TileLoadOpGenericAdaptorBase::Properties)
5251
5252namespace mlir::arm_sme {
5253
5254
5255//===----------------------------------------------------------------------===//
5256// ::mlir::arm_sme::TileStoreOp declarations
5257//===----------------------------------------------------------------------===//
5258
5259namespace detail {
5260
5261class TileStoreOpGenericAdaptorBase {
5262public:
5263 struct Properties {
5264 using layoutTy = ::mlir::arm_sme::TileSliceLayoutAttr;
5265 layoutTy layout;
5266
5267 auto getLayout() const {
5268 auto &propStorage = this->layout;
5269 return ::llvm::dyn_cast_or_null<::mlir::arm_sme::TileSliceLayoutAttr>(Val: propStorage);
5270 }
5271 void setLayout(const ::mlir::arm_sme::TileSliceLayoutAttr &propValue) {
5272 this->layout = propValue;
5273 }
5274 using operandSegmentSizesTy = std::array<int32_t, 4>;
5275 operandSegmentSizesTy operandSegmentSizes;
5276 ::llvm::ArrayRef<int32_t> getOperandSegmentSizes() const {
5277 auto &propStorage = this->operandSegmentSizes;
5278 return propStorage;
5279 }
5280 void setOperandSegmentSizes(::llvm::ArrayRef<int32_t> propValue) {
5281 auto &propStorage = this->operandSegmentSizes;
5282 ::llvm::copy(Range&: propValue, Out: propStorage.begin());
5283 }
5284 bool operator==(const Properties &rhs) const {
5285 return
5286 rhs.layout == this->layout &&
5287 rhs.operandSegmentSizes == this->operandSegmentSizes &&
5288 true;
5289 }
5290 bool operator!=(const Properties &rhs) const {
5291 return !(*this == rhs);
5292 }
5293 };
5294protected:
5295 ::mlir::DictionaryAttr odsAttrs;
5296 ::std::optional<::mlir::OperationName> odsOpName;
5297 Properties properties;
5298 ::mlir::RegionRange odsRegions;
5299public:
5300 TileStoreOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
5301 odsOpName.emplace(args: "arm_sme.tile_store", args: odsAttrs.getContext());
5302 }
5303
5304 TileStoreOpGenericAdaptorBase(TileStoreOp op);
5305
5306 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
5307 const Properties &getProperties() {
5308 return properties;
5309 }
5310
5311 ::mlir::DictionaryAttr getAttributes() {
5312 return odsAttrs;
5313 }
5314
5315 ::mlir::arm_sme::TileSliceLayoutAttr getLayoutAttr();
5316 ::mlir::arm_sme::TileSliceLayout getLayout();
5317};
5318
5319} // namespace detail
5320template <typename RangeT>
5321class TileStoreOpGenericAdaptor : public detail::TileStoreOpGenericAdaptorBase {
5322 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
5323 using Base = detail::TileStoreOpGenericAdaptorBase;
5324 static constexpr int odsIndex_valueToStore = 0;
5325 static constexpr int odsIndex_base = 1;
5326 static constexpr int odsIndex_indices = 2;
5327 static constexpr int odsIndex_mask = 3;
5328public:
5329 TileStoreOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
5330
5331 TileStoreOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : TileStoreOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
5332
5333 TileStoreOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs) : TileStoreOpGenericAdaptor(values, attrs, Properties{}, {}) {}
5334
5335 TileStoreOpGenericAdaptor(RangeT values, const TileStoreOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
5336
5337 template <typename LateInst = TileStoreOp, typename = std::enable_if_t<std::is_same_v<LateInst, TileStoreOp>>>
5338 TileStoreOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
5339
5340 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
5341 return Base::getODSOperandIndexAndLength(index, odsOperandsSize: odsOperands.size());
5342 }
5343
5344 RangeT getODSOperands(unsigned index) {
5345 auto valueRange = getODSOperandIndexAndLength(index);
5346 return {std::next(odsOperands.begin(), valueRange.first),
5347 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
5348 }
5349
5350 ValueT getValueToStore() {
5351 return (*getODSOperands(index: 0).begin());
5352 }
5353
5354 ValueT getBase() {
5355 return (*getODSOperands(index: 1).begin());
5356 }
5357
5358 RangeT getIndices() {
5359 return getODSOperands(index: 2);
5360 }
5361
5362 ValueT getMask() {
5363 auto operands = getODSOperands(index: 3);
5364 return operands.empty() ? ValueT{} : (*operands.begin());
5365 }
5366
5367 RangeT getOperands() {
5368 return odsOperands;
5369 }
5370
5371private:
5372 RangeT odsOperands;
5373};
5374class TileStoreOpAdaptor : public TileStoreOpGenericAdaptor<::mlir::ValueRange> {
5375public:
5376 using TileStoreOpGenericAdaptor::TileStoreOpGenericAdaptor;
5377 TileStoreOpAdaptor(TileStoreOp op);
5378
5379 ::llvm::LogicalResult verify(::mlir::Location loc);
5380};
5381class TileStoreOp : public ::mlir::Op<TileStoreOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<2>::Impl, ::mlir::OpTrait::AttrSizedOperandSegments, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::arm_sme::ArmSMETileOpInterface::Trait, ::mlir::MemoryEffectOpInterface::Trait> {
5382public:
5383 using Op::Op;
5384 using Op::print;
5385 using Adaptor = TileStoreOpAdaptor;
5386 template <typename RangeT>
5387 using GenericAdaptor = TileStoreOpGenericAdaptor<RangeT>;
5388 using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
5389 static constexpr int odsIndex_valueToStore = 0;
5390 static constexpr int odsIndex_base = 1;
5391 static constexpr int odsIndex_indices = 2;
5392 static constexpr int odsIndex_mask = 3;
5393 using Properties = FoldAdaptor::Properties;
5394 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
5395 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("layout"), ::llvm::StringRef("operandSegmentSizes")};
5396 return ::llvm::ArrayRef(attrNames);
5397 }
5398
5399 ::mlir::StringAttr getLayoutAttrName() {
5400 return getAttributeNameForIndex(index: 0);
5401 }
5402
5403 static ::mlir::StringAttr getLayoutAttrName(::mlir::OperationName name) {
5404 return getAttributeNameForIndex(name, index: 0);
5405 }
5406
5407 ::mlir::StringAttr getOperandSegmentSizesAttrName() {
5408 return (*this)->getName().getAttributeNames().back();
5409 }
5410
5411 static ::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name) {
5412 return name.getAttributeNames().back();
5413 }
5414
5415 static constexpr ::llvm::StringLiteral getOperationName() {
5416 return ::llvm::StringLiteral("arm_sme.tile_store");
5417 }
5418
5419 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
5420 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
5421 auto [start, length] = getODSOperandIndexAndLength(index);
5422 return getOperation()->getOperands().slice(n: start, m: length);
5423 }
5424
5425 ::mlir::TypedValue<VectorType> getValueToStore() {
5426 return ::llvm::cast<::mlir::TypedValue<VectorType>>(Val: *getODSOperands(index: 0).begin());
5427 }
5428
5429 ::mlir::TypedValue<::mlir::MemRefType> getBase() {
5430 return ::llvm::cast<::mlir::TypedValue<::mlir::MemRefType>>(Val: *getODSOperands(index: 1).begin());
5431 }
5432
5433 ::mlir::Operation::operand_range getIndices() {
5434 return getODSOperands(index: 2);
5435 }
5436
5437 ::mlir::TypedValue<::mlir::VectorType> getMask() {
5438 auto operands = getODSOperands(index: 3);
5439 return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *operands.begin());
5440 }
5441
5442 ::mlir::OpOperand &getValueToStoreMutable() {
5443 auto range = getODSOperandIndexAndLength(index: 0);
5444 return getOperation()->getOpOperand(idx: range.first);
5445 }
5446
5447 ::mlir::OpOperand &getBaseMutable() {
5448 auto range = getODSOperandIndexAndLength(index: 1);
5449 return getOperation()->getOpOperand(idx: range.first);
5450 }
5451
5452 ::mlir::MutableOperandRange getIndicesMutable();
5453 ::mlir::MutableOperandRange getMaskMutable();
5454 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
5455 return {index, 1};
5456 }
5457
5458 ::mlir::Operation::result_range getODSResults(unsigned index) {
5459 auto valueRange = getODSResultIndexAndLength(index);
5460 return {std::next(x: getOperation()->result_begin(), n: valueRange.first),
5461 std::next(x: getOperation()->result_begin(), n: valueRange.first + valueRange.second)};
5462 }
5463
5464 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
5465 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
5466 static llvm::hash_code computePropertiesHash(const Properties &prop);
5467 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
5468 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
5469 static void walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor);
5470 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
5471 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
5472 void writeProperties(::mlir::DialectBytecodeWriter &writer);
5473 ::mlir::arm_sme::TileSliceLayoutAttr getLayoutAttr() {
5474 return ::llvm::dyn_cast_or_null<::mlir::arm_sme::TileSliceLayoutAttr>(Val&: getProperties().layout);
5475 }
5476
5477 ::mlir::arm_sme::TileSliceLayout getLayout();
5478 void setLayoutAttr(::mlir::arm_sme::TileSliceLayoutAttr attr) {
5479 getProperties().layout = attr;
5480 }
5481
5482 void setLayout(::mlir::arm_sme::TileSliceLayout attrValue);
5483 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Value valueToStore, Value base, ValueRange indices);
5484 static TileStoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Value valueToStore, Value base, ValueRange indices);
5485 static TileStoreOp create(::mlir::ImplicitLocOpBuilder &builder, Value valueToStore, Value base, ValueRange indices);
5486 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value valueToStore, ::mlir::Value base, ::mlir::ValueRange indices, /*optional*/::mlir::Value mask, ::mlir::arm_sme::TileSliceLayoutAttr layout);
5487 static TileStoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value valueToStore, ::mlir::Value base, ::mlir::ValueRange indices, /*optional*/::mlir::Value mask, ::mlir::arm_sme::TileSliceLayoutAttr layout);
5488 static TileStoreOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value valueToStore, ::mlir::Value base, ::mlir::ValueRange indices, /*optional*/::mlir::Value mask, ::mlir::arm_sme::TileSliceLayoutAttr layout);
5489 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value valueToStore, ::mlir::Value base, ::mlir::ValueRange indices, /*optional*/::mlir::Value mask, ::mlir::arm_sme::TileSliceLayoutAttr layout);
5490 static TileStoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value valueToStore, ::mlir::Value base, ::mlir::ValueRange indices, /*optional*/::mlir::Value mask, ::mlir::arm_sme::TileSliceLayoutAttr layout);
5491 static TileStoreOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value valueToStore, ::mlir::Value base, ::mlir::ValueRange indices, /*optional*/::mlir::Value mask, ::mlir::arm_sme::TileSliceLayoutAttr layout);
5492 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value valueToStore, ::mlir::Value base, ::mlir::ValueRange indices, /*optional*/::mlir::Value mask, ::mlir::arm_sme::TileSliceLayout layout = TileSliceLayout::Horizontal);
5493 static TileStoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value valueToStore, ::mlir::Value base, ::mlir::ValueRange indices, /*optional*/::mlir::Value mask, ::mlir::arm_sme::TileSliceLayout layout = TileSliceLayout::Horizontal);
5494 static TileStoreOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value valueToStore, ::mlir::Value base, ::mlir::ValueRange indices, /*optional*/::mlir::Value mask, ::mlir::arm_sme::TileSliceLayout layout = TileSliceLayout::Horizontal);
5495 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value valueToStore, ::mlir::Value base, ::mlir::ValueRange indices, /*optional*/::mlir::Value mask, ::mlir::arm_sme::TileSliceLayout layout = TileSliceLayout::Horizontal);
5496 static TileStoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value valueToStore, ::mlir::Value base, ::mlir::ValueRange indices, /*optional*/::mlir::Value mask, ::mlir::arm_sme::TileSliceLayout layout = TileSliceLayout::Horizontal);
5497 static TileStoreOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value valueToStore, ::mlir::Value base, ::mlir::ValueRange indices, /*optional*/::mlir::Value mask, ::mlir::arm_sme::TileSliceLayout layout = TileSliceLayout::Horizontal);
5498 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
5499 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
5500 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
5501 static TileStoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
5502 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
5503 static TileStoreOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
5504 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
5505 static TileStoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
5506 static TileStoreOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
5507 static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
5508 ::llvm::LogicalResult verifyInvariantsImpl();
5509 ::llvm::LogicalResult verifyInvariants();
5510 ::llvm::LogicalResult verify();
5511 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
5512 LLVM_ATTRIBUTE_MINSIZE void print(::mlir::OpAsmPrinter &_odsPrinter);
5513 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
5514private:
5515 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
5516 return getAttributeNameForIndex(name: (*this)->getName(), index);
5517 }
5518
5519 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
5520 assert(index < 1 && "invalid attribute index");
5521 assert(name.getStringRef() == getOperationName() && "invalid operation name");
5522 assert(name.isRegistered() && "Operation isn't registered, missing a "
5523 "dependent dialect loading?");
5524 return name.getAttributeNames()[index];
5525 }
5526
5527 static void buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes);
5528public:
5529 MemRefType getMemRefType() {
5530 return ::llvm::cast<MemRefType>(Val: getBase().getType());
5531 }
5532 VectorType getVectorType() {
5533 return ::llvm::cast<VectorType>(Val: getValueToStore().getType());
5534 }
5535 VectorType getTileType() {
5536 return getVectorType();
5537 }
5538};
5539
5540} // namespace mlir::arm_sme
5541MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::TileStoreOp)
5542MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::TileStoreOpGenericAdaptorBase::Properties)
5543
5544namespace mlir::arm_sme {
5545
5546
5547//===----------------------------------------------------------------------===//
5548// ::mlir::arm_sme::UMopa2WayOp declarations
5549//===----------------------------------------------------------------------===//
5550
5551namespace detail {
5552
5553class UMopa2WayOpGenericAdaptorBase {
5554public:
5555 struct Properties {
5556 using operandSegmentSizesTy = std::array<int32_t, 5>;
5557 operandSegmentSizesTy operandSegmentSizes;
5558 ::llvm::ArrayRef<int32_t> getOperandSegmentSizes() const {
5559 auto &propStorage = this->operandSegmentSizes;
5560 return propStorage;
5561 }
5562 void setOperandSegmentSizes(::llvm::ArrayRef<int32_t> propValue) {
5563 auto &propStorage = this->operandSegmentSizes;
5564 ::llvm::copy(Range&: propValue, Out: propStorage.begin());
5565 }
5566 bool operator==(const Properties &rhs) const {
5567 return
5568 rhs.operandSegmentSizes == this->operandSegmentSizes &&
5569 true;
5570 }
5571 bool operator!=(const Properties &rhs) const {
5572 return !(*this == rhs);
5573 }
5574 };
5575protected:
5576 ::mlir::DictionaryAttr odsAttrs;
5577 ::std::optional<::mlir::OperationName> odsOpName;
5578 Properties properties;
5579 ::mlir::RegionRange odsRegions;
5580public:
5581 UMopa2WayOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
5582 odsOpName.emplace(args: "arm_sme.umopa_2way", args: odsAttrs.getContext());
5583 }
5584
5585 UMopa2WayOpGenericAdaptorBase(UMopa2WayOp op);
5586
5587 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
5588 const Properties &getProperties() {
5589 return properties;
5590 }
5591
5592 ::mlir::DictionaryAttr getAttributes() {
5593 return odsAttrs;
5594 }
5595
5596};
5597
5598} // namespace detail
5599template <typename RangeT>
5600class UMopa2WayOpGenericAdaptor : public detail::UMopa2WayOpGenericAdaptorBase {
5601 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
5602 using Base = detail::UMopa2WayOpGenericAdaptorBase;
5603 static constexpr int odsIndex_lhs = 0;
5604 static constexpr int odsIndex_rhs = 1;
5605 static constexpr int odsIndex_lhsMask = 2;
5606 static constexpr int odsIndex_rhsMask = 3;
5607 static constexpr int odsIndex_acc = 4;
5608public:
5609 UMopa2WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
5610
5611 UMopa2WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : UMopa2WayOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
5612
5613 UMopa2WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs) : UMopa2WayOpGenericAdaptor(values, attrs, Properties{}, {}) {}
5614
5615 UMopa2WayOpGenericAdaptor(RangeT values, const UMopa2WayOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
5616
5617 template <typename LateInst = UMopa2WayOp, typename = std::enable_if_t<std::is_same_v<LateInst, UMopa2WayOp>>>
5618 UMopa2WayOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
5619
5620 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
5621 return Base::getODSOperandIndexAndLength(index, odsOperandsSize: odsOperands.size());
5622 }
5623
5624 RangeT getODSOperands(unsigned index) {
5625 auto valueRange = getODSOperandIndexAndLength(index);
5626 return {std::next(odsOperands.begin(), valueRange.first),
5627 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
5628 }
5629
5630 ValueT getLhs() {
5631 return (*getODSOperands(index: 0).begin());
5632 }
5633
5634 ValueT getRhs() {
5635 return (*getODSOperands(index: 1).begin());
5636 }
5637
5638 ValueT getLhsMask() {
5639 auto operands = getODSOperands(index: 2);
5640 return operands.empty() ? ValueT{} : (*operands.begin());
5641 }
5642
5643 ValueT getRhsMask() {
5644 auto operands = getODSOperands(index: 3);
5645 return operands.empty() ? ValueT{} : (*operands.begin());
5646 }
5647
5648 ValueT getAcc() {
5649 auto operands = getODSOperands(index: 4);
5650 return operands.empty() ? ValueT{} : (*operands.begin());
5651 }
5652
5653 RangeT getOperands() {
5654 return odsOperands;
5655 }
5656
5657private:
5658 RangeT odsOperands;
5659};
5660class UMopa2WayOpAdaptor : public UMopa2WayOpGenericAdaptor<::mlir::ValueRange> {
5661public:
5662 using UMopa2WayOpGenericAdaptor::UMopa2WayOpGenericAdaptor;
5663 UMopa2WayOpAdaptor(UMopa2WayOp op);
5664
5665 ::llvm::LogicalResult verify(::mlir::Location loc);
5666};
5667class UMopa2WayOp : public ::mlir::Op<UMopa2WayOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<2>::Impl, ::mlir::OpTrait::AttrSizedOperandSegments, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::arm_sme::ArmSMETileOpInterface::Trait> {
5668public:
5669 using Op::Op;
5670 using Op::print;
5671 using Adaptor = UMopa2WayOpAdaptor;
5672 template <typename RangeT>
5673 using GenericAdaptor = UMopa2WayOpGenericAdaptor<RangeT>;
5674 using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
5675 static constexpr int odsIndex_lhs = 0;
5676 static constexpr int odsIndex_rhs = 1;
5677 static constexpr int odsIndex_lhsMask = 2;
5678 static constexpr int odsIndex_rhsMask = 3;
5679 static constexpr int odsIndex_acc = 4;
5680 static constexpr int odsIndex_result = 0;
5681 using Properties = FoldAdaptor::Properties;
5682 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
5683 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("operandSegmentSizes")};
5684 return ::llvm::ArrayRef(attrNames);
5685 }
5686
5687 ::mlir::StringAttr getOperandSegmentSizesAttrName() {
5688 return (*this)->getName().getAttributeNames().back();
5689 }
5690
5691 static ::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name) {
5692 return name.getAttributeNames().back();
5693 }
5694
5695 static constexpr ::llvm::StringLiteral getOperationName() {
5696 return ::llvm::StringLiteral("arm_sme.umopa_2way");
5697 }
5698
5699 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
5700 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
5701 auto [start, length] = getODSOperandIndexAndLength(index);
5702 return getOperation()->getOperands().slice(n: start, m: length);
5703 }
5704
5705 ::mlir::TypedValue<::mlir::Type> getLhs() {
5706 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(Val: *getODSOperands(index: 0).begin());
5707 }
5708
5709 ::mlir::TypedValue<::mlir::VectorType> getRhs() {
5710 return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *getODSOperands(index: 1).begin());
5711 }
5712
5713 ::mlir::TypedValue<::mlir::VectorType> getLhsMask() {
5714 auto operands = getODSOperands(index: 2);
5715 return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *operands.begin());
5716 }
5717
5718 ::mlir::TypedValue<::mlir::VectorType> getRhsMask() {
5719 auto operands = getODSOperands(index: 3);
5720 return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *operands.begin());
5721 }
5722
5723 ::mlir::TypedValue<::mlir::VectorType> getAcc() {
5724 auto operands = getODSOperands(index: 4);
5725 return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *operands.begin());
5726 }
5727
5728 ::mlir::OpOperand &getLhsMutable() {
5729 auto range = getODSOperandIndexAndLength(index: 0);
5730 return getOperation()->getOpOperand(idx: range.first);
5731 }
5732
5733 ::mlir::OpOperand &getRhsMutable() {
5734 auto range = getODSOperandIndexAndLength(index: 1);
5735 return getOperation()->getOpOperand(idx: range.first);
5736 }
5737
5738 ::mlir::MutableOperandRange getLhsMaskMutable();
5739 ::mlir::MutableOperandRange getRhsMaskMutable();
5740 ::mlir::MutableOperandRange getAccMutable();
5741 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
5742 return {index, 1};
5743 }
5744
5745 ::mlir::Operation::result_range getODSResults(unsigned index) {
5746 auto valueRange = getODSResultIndexAndLength(index);
5747 return {std::next(x: getOperation()->result_begin(), n: valueRange.first),
5748 std::next(x: getOperation()->result_begin(), n: valueRange.first + valueRange.second)};
5749 }
5750
5751 ::mlir::TypedValue<::mlir::Type> getResult() {
5752 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(Val: *getODSResults(index: 0).begin());
5753 }
5754
5755 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
5756 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
5757 static llvm::hash_code computePropertiesHash(const Properties &prop);
5758 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
5759 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
5760 static void walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor);
5761 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
5762 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
5763 void writeProperties(::mlir::DialectBytecodeWriter &writer);
5764 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
5765 static UMopa2WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
5766 static UMopa2WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
5767 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
5768 static UMopa2WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
5769 static UMopa2WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
5770 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
5771 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
5772 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
5773 static UMopa2WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
5774 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
5775 static UMopa2WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
5776 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
5777 static UMopa2WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
5778 static UMopa2WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
5779 ::llvm::LogicalResult verifyInvariantsImpl();
5780 ::llvm::LogicalResult verifyInvariants();
5781 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
5782 LLVM_ATTRIBUTE_MINSIZE void print(::mlir::OpAsmPrinter &_odsPrinter);
5783 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
5784private:
5785 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
5786 return getAttributeNameForIndex(name: (*this)->getName(), index);
5787 }
5788
5789 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
5790 return {};
5791 }
5792
5793 static void buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes);
5794public:
5795 VectorType getLhsType() { return llvm::cast<VectorType>(Val: getLhs().getType()); }
5796 VectorType getRhsType() { return llvm::cast<VectorType>(Val: getRhs().getType()); }
5797 VectorType getResultType() { return llvm::cast<VectorType>(Val: getResult().getType()); }
5798 VectorType getTileType() {
5799 return getResultType();
5800 }
5801};
5802
5803} // namespace mlir::arm_sme
5804MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::UMopa2WayOp)
5805MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::UMopa2WayOpGenericAdaptorBase::Properties)
5806
5807namespace mlir::arm_sme {
5808
5809
5810//===----------------------------------------------------------------------===//
5811// ::mlir::arm_sme::UMopa4WayOp declarations
5812//===----------------------------------------------------------------------===//
5813
5814namespace detail {
5815
5816class UMopa4WayOpGenericAdaptorBase {
5817public:
5818 struct Properties {
5819 using operandSegmentSizesTy = std::array<int32_t, 5>;
5820 operandSegmentSizesTy operandSegmentSizes;
5821 ::llvm::ArrayRef<int32_t> getOperandSegmentSizes() const {
5822 auto &propStorage = this->operandSegmentSizes;
5823 return propStorage;
5824 }
5825 void setOperandSegmentSizes(::llvm::ArrayRef<int32_t> propValue) {
5826 auto &propStorage = this->operandSegmentSizes;
5827 ::llvm::copy(Range&: propValue, Out: propStorage.begin());
5828 }
5829 bool operator==(const Properties &rhs) const {
5830 return
5831 rhs.operandSegmentSizes == this->operandSegmentSizes &&
5832 true;
5833 }
5834 bool operator!=(const Properties &rhs) const {
5835 return !(*this == rhs);
5836 }
5837 };
5838protected:
5839 ::mlir::DictionaryAttr odsAttrs;
5840 ::std::optional<::mlir::OperationName> odsOpName;
5841 Properties properties;
5842 ::mlir::RegionRange odsRegions;
5843public:
5844 UMopa4WayOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
5845 odsOpName.emplace(args: "arm_sme.umopa_4way", args: odsAttrs.getContext());
5846 }
5847
5848 UMopa4WayOpGenericAdaptorBase(UMopa4WayOp op);
5849
5850 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
5851 const Properties &getProperties() {
5852 return properties;
5853 }
5854
5855 ::mlir::DictionaryAttr getAttributes() {
5856 return odsAttrs;
5857 }
5858
5859};
5860
5861} // namespace detail
5862template <typename RangeT>
5863class UMopa4WayOpGenericAdaptor : public detail::UMopa4WayOpGenericAdaptorBase {
5864 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
5865 using Base = detail::UMopa4WayOpGenericAdaptorBase;
5866 static constexpr int odsIndex_lhs = 0;
5867 static constexpr int odsIndex_rhs = 1;
5868 static constexpr int odsIndex_lhsMask = 2;
5869 static constexpr int odsIndex_rhsMask = 3;
5870 static constexpr int odsIndex_acc = 4;
5871public:
5872 UMopa4WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
5873
5874 UMopa4WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : UMopa4WayOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
5875
5876 UMopa4WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs) : UMopa4WayOpGenericAdaptor(values, attrs, Properties{}, {}) {}
5877
5878 UMopa4WayOpGenericAdaptor(RangeT values, const UMopa4WayOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
5879
5880 template <typename LateInst = UMopa4WayOp, typename = std::enable_if_t<std::is_same_v<LateInst, UMopa4WayOp>>>
5881 UMopa4WayOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
5882
5883 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
5884 return Base::getODSOperandIndexAndLength(index, odsOperandsSize: odsOperands.size());
5885 }
5886
5887 RangeT getODSOperands(unsigned index) {
5888 auto valueRange = getODSOperandIndexAndLength(index);
5889 return {std::next(odsOperands.begin(), valueRange.first),
5890 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
5891 }
5892
5893 ValueT getLhs() {
5894 return (*getODSOperands(index: 0).begin());
5895 }
5896
5897 ValueT getRhs() {
5898 return (*getODSOperands(index: 1).begin());
5899 }
5900
5901 ValueT getLhsMask() {
5902 auto operands = getODSOperands(index: 2);
5903 return operands.empty() ? ValueT{} : (*operands.begin());
5904 }
5905
5906 ValueT getRhsMask() {
5907 auto operands = getODSOperands(index: 3);
5908 return operands.empty() ? ValueT{} : (*operands.begin());
5909 }
5910
5911 ValueT getAcc() {
5912 auto operands = getODSOperands(index: 4);
5913 return operands.empty() ? ValueT{} : (*operands.begin());
5914 }
5915
5916 RangeT getOperands() {
5917 return odsOperands;
5918 }
5919
5920private:
5921 RangeT odsOperands;
5922};
5923class UMopa4WayOpAdaptor : public UMopa4WayOpGenericAdaptor<::mlir::ValueRange> {
5924public:
5925 using UMopa4WayOpGenericAdaptor::UMopa4WayOpGenericAdaptor;
5926 UMopa4WayOpAdaptor(UMopa4WayOp op);
5927
5928 ::llvm::LogicalResult verify(::mlir::Location loc);
5929};
5930class UMopa4WayOp : public ::mlir::Op<UMopa4WayOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<2>::Impl, ::mlir::OpTrait::AttrSizedOperandSegments, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::arm_sme::ArmSMETileOpInterface::Trait> {
5931public:
5932 using Op::Op;
5933 using Op::print;
5934 using Adaptor = UMopa4WayOpAdaptor;
5935 template <typename RangeT>
5936 using GenericAdaptor = UMopa4WayOpGenericAdaptor<RangeT>;
5937 using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
5938 static constexpr int odsIndex_lhs = 0;
5939 static constexpr int odsIndex_rhs = 1;
5940 static constexpr int odsIndex_lhsMask = 2;
5941 static constexpr int odsIndex_rhsMask = 3;
5942 static constexpr int odsIndex_acc = 4;
5943 static constexpr int odsIndex_result = 0;
5944 using Properties = FoldAdaptor::Properties;
5945 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
5946 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("operandSegmentSizes")};
5947 return ::llvm::ArrayRef(attrNames);
5948 }
5949
5950 ::mlir::StringAttr getOperandSegmentSizesAttrName() {
5951 return (*this)->getName().getAttributeNames().back();
5952 }
5953
5954 static ::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name) {
5955 return name.getAttributeNames().back();
5956 }
5957
5958 static constexpr ::llvm::StringLiteral getOperationName() {
5959 return ::llvm::StringLiteral("arm_sme.umopa_4way");
5960 }
5961
5962 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
5963 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
5964 auto [start, length] = getODSOperandIndexAndLength(index);
5965 return getOperation()->getOperands().slice(n: start, m: length);
5966 }
5967
5968 ::mlir::TypedValue<::mlir::Type> getLhs() {
5969 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(Val: *getODSOperands(index: 0).begin());
5970 }
5971
5972 ::mlir::TypedValue<::mlir::VectorType> getRhs() {
5973 return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *getODSOperands(index: 1).begin());
5974 }
5975
5976 ::mlir::TypedValue<::mlir::VectorType> getLhsMask() {
5977 auto operands = getODSOperands(index: 2);
5978 return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *operands.begin());
5979 }
5980
5981 ::mlir::TypedValue<::mlir::VectorType> getRhsMask() {
5982 auto operands = getODSOperands(index: 3);
5983 return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *operands.begin());
5984 }
5985
5986 ::mlir::TypedValue<::mlir::VectorType> getAcc() {
5987 auto operands = getODSOperands(index: 4);
5988 return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *operands.begin());
5989 }
5990
5991 ::mlir::OpOperand &getLhsMutable() {
5992 auto range = getODSOperandIndexAndLength(index: 0);
5993 return getOperation()->getOpOperand(idx: range.first);
5994 }
5995
5996 ::mlir::OpOperand &getRhsMutable() {
5997 auto range = getODSOperandIndexAndLength(index: 1);
5998 return getOperation()->getOpOperand(idx: range.first);
5999 }
6000
6001 ::mlir::MutableOperandRange getLhsMaskMutable();
6002 ::mlir::MutableOperandRange getRhsMaskMutable();
6003 ::mlir::MutableOperandRange getAccMutable();
6004 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
6005 return {index, 1};
6006 }
6007
6008 ::mlir::Operation::result_range getODSResults(unsigned index) {
6009 auto valueRange = getODSResultIndexAndLength(index);
6010 return {std::next(x: getOperation()->result_begin(), n: valueRange.first),
6011 std::next(x: getOperation()->result_begin(), n: valueRange.first + valueRange.second)};
6012 }
6013
6014 ::mlir::TypedValue<::mlir::Type> getResult() {
6015 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(Val: *getODSResults(index: 0).begin());
6016 }
6017
6018 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
6019 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
6020 static llvm::hash_code computePropertiesHash(const Properties &prop);
6021 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
6022 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
6023 static void walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor);
6024 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
6025 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
6026 void writeProperties(::mlir::DialectBytecodeWriter &writer);
6027 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
6028 static UMopa4WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
6029 static UMopa4WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
6030 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
6031 static UMopa4WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
6032 static UMopa4WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
6033 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
6034 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
6035 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
6036 static UMopa4WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
6037 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
6038 static UMopa4WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
6039 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
6040 static UMopa4WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
6041 static UMopa4WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
6042 ::llvm::LogicalResult verifyInvariantsImpl();
6043 ::llvm::LogicalResult verifyInvariants();
6044 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
6045 LLVM_ATTRIBUTE_MINSIZE void print(::mlir::OpAsmPrinter &_odsPrinter);
6046 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
6047private:
6048 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
6049 return getAttributeNameForIndex(name: (*this)->getName(), index);
6050 }
6051
6052 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
6053 return {};
6054 }
6055
6056 static void buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes);
6057public:
6058 VectorType getLhsType() { return llvm::cast<VectorType>(Val: getLhs().getType()); }
6059 VectorType getRhsType() { return llvm::cast<VectorType>(Val: getRhs().getType()); }
6060 VectorType getResultType() { return llvm::cast<VectorType>(Val: getResult().getType()); }
6061 VectorType getTileType() {
6062 return getResultType();
6063 }
6064};
6065
6066} // namespace mlir::arm_sme
6067MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::UMopa4WayOp)
6068MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::UMopa4WayOpGenericAdaptorBase::Properties)
6069
6070namespace mlir::arm_sme {
6071
6072
6073//===----------------------------------------------------------------------===//
6074// ::mlir::arm_sme::UMops2WayOp declarations
6075//===----------------------------------------------------------------------===//
6076
6077namespace detail {
6078
6079class UMops2WayOpGenericAdaptorBase {
6080public:
6081 struct Properties {
6082 using operandSegmentSizesTy = std::array<int32_t, 5>;
6083 operandSegmentSizesTy operandSegmentSizes;
6084 ::llvm::ArrayRef<int32_t> getOperandSegmentSizes() const {
6085 auto &propStorage = this->operandSegmentSizes;
6086 return propStorage;
6087 }
6088 void setOperandSegmentSizes(::llvm::ArrayRef<int32_t> propValue) {
6089 auto &propStorage = this->operandSegmentSizes;
6090 ::llvm::copy(Range&: propValue, Out: propStorage.begin());
6091 }
6092 bool operator==(const Properties &rhs) const {
6093 return
6094 rhs.operandSegmentSizes == this->operandSegmentSizes &&
6095 true;
6096 }
6097 bool operator!=(const Properties &rhs) const {
6098 return !(*this == rhs);
6099 }
6100 };
6101protected:
6102 ::mlir::DictionaryAttr odsAttrs;
6103 ::std::optional<::mlir::OperationName> odsOpName;
6104 Properties properties;
6105 ::mlir::RegionRange odsRegions;
6106public:
6107 UMops2WayOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
6108 odsOpName.emplace(args: "arm_sme.umops_2way", args: odsAttrs.getContext());
6109 }
6110
6111 UMops2WayOpGenericAdaptorBase(UMops2WayOp op);
6112
6113 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
6114 const Properties &getProperties() {
6115 return properties;
6116 }
6117
6118 ::mlir::DictionaryAttr getAttributes() {
6119 return odsAttrs;
6120 }
6121
6122};
6123
6124} // namespace detail
6125template <typename RangeT>
6126class UMops2WayOpGenericAdaptor : public detail::UMops2WayOpGenericAdaptorBase {
6127 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
6128 using Base = detail::UMops2WayOpGenericAdaptorBase;
6129 static constexpr int odsIndex_lhs = 0;
6130 static constexpr int odsIndex_rhs = 1;
6131 static constexpr int odsIndex_lhsMask = 2;
6132 static constexpr int odsIndex_rhsMask = 3;
6133 static constexpr int odsIndex_acc = 4;
6134public:
6135 UMops2WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
6136
6137 UMops2WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : UMops2WayOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
6138
6139 UMops2WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs) : UMops2WayOpGenericAdaptor(values, attrs, Properties{}, {}) {}
6140
6141 UMops2WayOpGenericAdaptor(RangeT values, const UMops2WayOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
6142
6143 template <typename LateInst = UMops2WayOp, typename = std::enable_if_t<std::is_same_v<LateInst, UMops2WayOp>>>
6144 UMops2WayOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
6145
6146 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
6147 return Base::getODSOperandIndexAndLength(index, odsOperandsSize: odsOperands.size());
6148 }
6149
6150 RangeT getODSOperands(unsigned index) {
6151 auto valueRange = getODSOperandIndexAndLength(index);
6152 return {std::next(odsOperands.begin(), valueRange.first),
6153 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
6154 }
6155
6156 ValueT getLhs() {
6157 return (*getODSOperands(index: 0).begin());
6158 }
6159
6160 ValueT getRhs() {
6161 return (*getODSOperands(index: 1).begin());
6162 }
6163
6164 ValueT getLhsMask() {
6165 auto operands = getODSOperands(index: 2);
6166 return operands.empty() ? ValueT{} : (*operands.begin());
6167 }
6168
6169 ValueT getRhsMask() {
6170 auto operands = getODSOperands(index: 3);
6171 return operands.empty() ? ValueT{} : (*operands.begin());
6172 }
6173
6174 ValueT getAcc() {
6175 auto operands = getODSOperands(index: 4);
6176 return operands.empty() ? ValueT{} : (*operands.begin());
6177 }
6178
6179 RangeT getOperands() {
6180 return odsOperands;
6181 }
6182
6183private:
6184 RangeT odsOperands;
6185};
6186class UMops2WayOpAdaptor : public UMops2WayOpGenericAdaptor<::mlir::ValueRange> {
6187public:
6188 using UMops2WayOpGenericAdaptor::UMops2WayOpGenericAdaptor;
6189 UMops2WayOpAdaptor(UMops2WayOp op);
6190
6191 ::llvm::LogicalResult verify(::mlir::Location loc);
6192};
6193class UMops2WayOp : public ::mlir::Op<UMops2WayOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<2>::Impl, ::mlir::OpTrait::AttrSizedOperandSegments, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::arm_sme::ArmSMETileOpInterface::Trait> {
6194public:
6195 using Op::Op;
6196 using Op::print;
6197 using Adaptor = UMops2WayOpAdaptor;
6198 template <typename RangeT>
6199 using GenericAdaptor = UMops2WayOpGenericAdaptor<RangeT>;
6200 using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
6201 static constexpr int odsIndex_lhs = 0;
6202 static constexpr int odsIndex_rhs = 1;
6203 static constexpr int odsIndex_lhsMask = 2;
6204 static constexpr int odsIndex_rhsMask = 3;
6205 static constexpr int odsIndex_acc = 4;
6206 static constexpr int odsIndex_result = 0;
6207 using Properties = FoldAdaptor::Properties;
6208 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
6209 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("operandSegmentSizes")};
6210 return ::llvm::ArrayRef(attrNames);
6211 }
6212
6213 ::mlir::StringAttr getOperandSegmentSizesAttrName() {
6214 return (*this)->getName().getAttributeNames().back();
6215 }
6216
6217 static ::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name) {
6218 return name.getAttributeNames().back();
6219 }
6220
6221 static constexpr ::llvm::StringLiteral getOperationName() {
6222 return ::llvm::StringLiteral("arm_sme.umops_2way");
6223 }
6224
6225 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
6226 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
6227 auto [start, length] = getODSOperandIndexAndLength(index);
6228 return getOperation()->getOperands().slice(n: start, m: length);
6229 }
6230
6231 ::mlir::TypedValue<::mlir::Type> getLhs() {
6232 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(Val: *getODSOperands(index: 0).begin());
6233 }
6234
6235 ::mlir::TypedValue<::mlir::VectorType> getRhs() {
6236 return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *getODSOperands(index: 1).begin());
6237 }
6238
6239 ::mlir::TypedValue<::mlir::VectorType> getLhsMask() {
6240 auto operands = getODSOperands(index: 2);
6241 return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *operands.begin());
6242 }
6243
6244 ::mlir::TypedValue<::mlir::VectorType> getRhsMask() {
6245 auto operands = getODSOperands(index: 3);
6246 return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *operands.begin());
6247 }
6248
6249 ::mlir::TypedValue<::mlir::VectorType> getAcc() {
6250 auto operands = getODSOperands(index: 4);
6251 return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *operands.begin());
6252 }
6253
6254 ::mlir::OpOperand &getLhsMutable() {
6255 auto range = getODSOperandIndexAndLength(index: 0);
6256 return getOperation()->getOpOperand(idx: range.first);
6257 }
6258
6259 ::mlir::OpOperand &getRhsMutable() {
6260 auto range = getODSOperandIndexAndLength(index: 1);
6261 return getOperation()->getOpOperand(idx: range.first);
6262 }
6263
6264 ::mlir::MutableOperandRange getLhsMaskMutable();
6265 ::mlir::MutableOperandRange getRhsMaskMutable();
6266 ::mlir::MutableOperandRange getAccMutable();
6267 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
6268 return {index, 1};
6269 }
6270
6271 ::mlir::Operation::result_range getODSResults(unsigned index) {
6272 auto valueRange = getODSResultIndexAndLength(index);
6273 return {std::next(x: getOperation()->result_begin(), n: valueRange.first),
6274 std::next(x: getOperation()->result_begin(), n: valueRange.first + valueRange.second)};
6275 }
6276
6277 ::mlir::TypedValue<::mlir::Type> getResult() {
6278 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(Val: *getODSResults(index: 0).begin());
6279 }
6280
6281 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
6282 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
6283 static llvm::hash_code computePropertiesHash(const Properties &prop);
6284 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
6285 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
6286 static void walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor);
6287 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
6288 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
6289 void writeProperties(::mlir::DialectBytecodeWriter &writer);
6290 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
6291 static UMops2WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
6292 static UMops2WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
6293 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
6294 static UMops2WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
6295 static UMops2WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
6296 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
6297 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
6298 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
6299 static UMops2WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
6300 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
6301 static UMops2WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
6302 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
6303 static UMops2WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
6304 static UMops2WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
6305 ::llvm::LogicalResult verifyInvariantsImpl();
6306 ::llvm::LogicalResult verifyInvariants();
6307 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
6308 LLVM_ATTRIBUTE_MINSIZE void print(::mlir::OpAsmPrinter &_odsPrinter);
6309 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
6310private:
6311 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
6312 return getAttributeNameForIndex(name: (*this)->getName(), index);
6313 }
6314
6315 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
6316 return {};
6317 }
6318
6319 static void buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes);
6320public:
6321 VectorType getLhsType() { return llvm::cast<VectorType>(Val: getLhs().getType()); }
6322 VectorType getRhsType() { return llvm::cast<VectorType>(Val: getRhs().getType()); }
6323 VectorType getResultType() { return llvm::cast<VectorType>(Val: getResult().getType()); }
6324 VectorType getTileType() {
6325 return getResultType();
6326 }
6327};
6328
6329} // namespace mlir::arm_sme
6330MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::UMops2WayOp)
6331MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::UMops2WayOpGenericAdaptorBase::Properties)
6332
6333namespace mlir::arm_sme {
6334
6335
6336//===----------------------------------------------------------------------===//
6337// ::mlir::arm_sme::UMops4WayOp declarations
6338//===----------------------------------------------------------------------===//
6339
6340namespace detail {
6341
6342class UMops4WayOpGenericAdaptorBase {
6343public:
6344 struct Properties {
6345 using operandSegmentSizesTy = std::array<int32_t, 5>;
6346 operandSegmentSizesTy operandSegmentSizes;
6347 ::llvm::ArrayRef<int32_t> getOperandSegmentSizes() const {
6348 auto &propStorage = this->operandSegmentSizes;
6349 return propStorage;
6350 }
6351 void setOperandSegmentSizes(::llvm::ArrayRef<int32_t> propValue) {
6352 auto &propStorage = this->operandSegmentSizes;
6353 ::llvm::copy(Range&: propValue, Out: propStorage.begin());
6354 }
6355 bool operator==(const Properties &rhs) const {
6356 return
6357 rhs.operandSegmentSizes == this->operandSegmentSizes &&
6358 true;
6359 }
6360 bool operator!=(const Properties &rhs) const {
6361 return !(*this == rhs);
6362 }
6363 };
6364protected:
6365 ::mlir::DictionaryAttr odsAttrs;
6366 ::std::optional<::mlir::OperationName> odsOpName;
6367 Properties properties;
6368 ::mlir::RegionRange odsRegions;
6369public:
6370 UMops4WayOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
6371 odsOpName.emplace(args: "arm_sme.umops_4way", args: odsAttrs.getContext());
6372 }
6373
6374 UMops4WayOpGenericAdaptorBase(UMops4WayOp op);
6375
6376 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
6377 const Properties &getProperties() {
6378 return properties;
6379 }
6380
6381 ::mlir::DictionaryAttr getAttributes() {
6382 return odsAttrs;
6383 }
6384
6385};
6386
6387} // namespace detail
6388template <typename RangeT>
6389class UMops4WayOpGenericAdaptor : public detail::UMops4WayOpGenericAdaptorBase {
6390 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
6391 using Base = detail::UMops4WayOpGenericAdaptorBase;
6392 static constexpr int odsIndex_lhs = 0;
6393 static constexpr int odsIndex_rhs = 1;
6394 static constexpr int odsIndex_lhsMask = 2;
6395 static constexpr int odsIndex_rhsMask = 3;
6396 static constexpr int odsIndex_acc = 4;
6397public:
6398 UMops4WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
6399
6400 UMops4WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : UMops4WayOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
6401
6402 UMops4WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs) : UMops4WayOpGenericAdaptor(values, attrs, Properties{}, {}) {}
6403
6404 UMops4WayOpGenericAdaptor(RangeT values, const UMops4WayOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
6405
6406 template <typename LateInst = UMops4WayOp, typename = std::enable_if_t<std::is_same_v<LateInst, UMops4WayOp>>>
6407 UMops4WayOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
6408
6409 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
6410 return Base::getODSOperandIndexAndLength(index, odsOperandsSize: odsOperands.size());
6411 }
6412
6413 RangeT getODSOperands(unsigned index) {
6414 auto valueRange = getODSOperandIndexAndLength(index);
6415 return {std::next(odsOperands.begin(), valueRange.first),
6416 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
6417 }
6418
6419 ValueT getLhs() {
6420 return (*getODSOperands(index: 0).begin());
6421 }
6422
6423 ValueT getRhs() {
6424 return (*getODSOperands(index: 1).begin());
6425 }
6426
6427 ValueT getLhsMask() {
6428 auto operands = getODSOperands(index: 2);
6429 return operands.empty() ? ValueT{} : (*operands.begin());
6430 }
6431
6432 ValueT getRhsMask() {
6433 auto operands = getODSOperands(index: 3);
6434 return operands.empty() ? ValueT{} : (*operands.begin());
6435 }
6436
6437 ValueT getAcc() {
6438 auto operands = getODSOperands(index: 4);
6439 return operands.empty() ? ValueT{} : (*operands.begin());
6440 }
6441
6442 RangeT getOperands() {
6443 return odsOperands;
6444 }
6445
6446private:
6447 RangeT odsOperands;
6448};
6449class UMops4WayOpAdaptor : public UMops4WayOpGenericAdaptor<::mlir::ValueRange> {
6450public:
6451 using UMops4WayOpGenericAdaptor::UMops4WayOpGenericAdaptor;
6452 UMops4WayOpAdaptor(UMops4WayOp op);
6453
6454 ::llvm::LogicalResult verify(::mlir::Location loc);
6455};
6456class UMops4WayOp : public ::mlir::Op<UMops4WayOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<2>::Impl, ::mlir::OpTrait::AttrSizedOperandSegments, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::arm_sme::ArmSMETileOpInterface::Trait> {
6457public:
6458 using Op::Op;
6459 using Op::print;
6460 using Adaptor = UMops4WayOpAdaptor;
6461 template <typename RangeT>
6462 using GenericAdaptor = UMops4WayOpGenericAdaptor<RangeT>;
6463 using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
6464 static constexpr int odsIndex_lhs = 0;
6465 static constexpr int odsIndex_rhs = 1;
6466 static constexpr int odsIndex_lhsMask = 2;
6467 static constexpr int odsIndex_rhsMask = 3;
6468 static constexpr int odsIndex_acc = 4;
6469 static constexpr int odsIndex_result = 0;
6470 using Properties = FoldAdaptor::Properties;
6471 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
6472 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("operandSegmentSizes")};
6473 return ::llvm::ArrayRef(attrNames);
6474 }
6475
6476 ::mlir::StringAttr getOperandSegmentSizesAttrName() {
6477 return (*this)->getName().getAttributeNames().back();
6478 }
6479
6480 static ::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name) {
6481 return name.getAttributeNames().back();
6482 }
6483
6484 static constexpr ::llvm::StringLiteral getOperationName() {
6485 return ::llvm::StringLiteral("arm_sme.umops_4way");
6486 }
6487
6488 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
6489 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
6490 auto [start, length] = getODSOperandIndexAndLength(index);
6491 return getOperation()->getOperands().slice(n: start, m: length);
6492 }
6493
6494 ::mlir::TypedValue<::mlir::Type> getLhs() {
6495 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(Val: *getODSOperands(index: 0).begin());
6496 }
6497
6498 ::mlir::TypedValue<::mlir::VectorType> getRhs() {
6499 return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *getODSOperands(index: 1).begin());
6500 }
6501
6502 ::mlir::TypedValue<::mlir::VectorType> getLhsMask() {
6503 auto operands = getODSOperands(index: 2);
6504 return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *operands.begin());
6505 }
6506
6507 ::mlir::TypedValue<::mlir::VectorType> getRhsMask() {
6508 auto operands = getODSOperands(index: 3);
6509 return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *operands.begin());
6510 }
6511
6512 ::mlir::TypedValue<::mlir::VectorType> getAcc() {
6513 auto operands = getODSOperands(index: 4);
6514 return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *operands.begin());
6515 }
6516
6517 ::mlir::OpOperand &getLhsMutable() {
6518 auto range = getODSOperandIndexAndLength(index: 0);
6519 return getOperation()->getOpOperand(idx: range.first);
6520 }
6521
6522 ::mlir::OpOperand &getRhsMutable() {
6523 auto range = getODSOperandIndexAndLength(index: 1);
6524 return getOperation()->getOpOperand(idx: range.first);
6525 }
6526
6527 ::mlir::MutableOperandRange getLhsMaskMutable();
6528 ::mlir::MutableOperandRange getRhsMaskMutable();
6529 ::mlir::MutableOperandRange getAccMutable();
6530 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
6531 return {index, 1};
6532 }
6533
6534 ::mlir::Operation::result_range getODSResults(unsigned index) {
6535 auto valueRange = getODSResultIndexAndLength(index);
6536 return {std::next(x: getOperation()->result_begin(), n: valueRange.first),
6537 std::next(x: getOperation()->result_begin(), n: valueRange.first + valueRange.second)};
6538 }
6539
6540 ::mlir::TypedValue<::mlir::Type> getResult() {
6541 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(Val: *getODSResults(index: 0).begin());
6542 }
6543
6544 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
6545 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
6546 static llvm::hash_code computePropertiesHash(const Properties &prop);
6547 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
6548 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
6549 static void walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor);
6550 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
6551 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
6552 void writeProperties(::mlir::DialectBytecodeWriter &writer);
6553 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
6554 static UMops4WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
6555 static UMops4WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
6556 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
6557 static UMops4WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
6558 static UMops4WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
6559 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
6560 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
6561 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
6562 static UMops4WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
6563 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
6564 static UMops4WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
6565 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
6566 static UMops4WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
6567 static UMops4WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
6568 ::llvm::LogicalResult verifyInvariantsImpl();
6569 ::llvm::LogicalResult verifyInvariants();
6570 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
6571 LLVM_ATTRIBUTE_MINSIZE void print(::mlir::OpAsmPrinter &_odsPrinter);
6572 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
6573private:
6574 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
6575 return getAttributeNameForIndex(name: (*this)->getName(), index);
6576 }
6577
6578 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
6579 return {};
6580 }
6581
6582 static void buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes);
6583public:
6584 VectorType getLhsType() { return llvm::cast<VectorType>(Val: getLhs().getType()); }
6585 VectorType getRhsType() { return llvm::cast<VectorType>(Val: getRhs().getType()); }
6586 VectorType getResultType() { return llvm::cast<VectorType>(Val: getResult().getType()); }
6587 VectorType getTileType() {
6588 return getResultType();
6589 }
6590};
6591
6592} // namespace mlir::arm_sme
6593MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::UMops4WayOp)
6594MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::UMops4WayOpGenericAdaptorBase::Properties)
6595
6596namespace mlir::arm_sme {
6597
6598
6599//===----------------------------------------------------------------------===//
6600// ::mlir::arm_sme::UsMopa4WayOp declarations
6601//===----------------------------------------------------------------------===//
6602
6603namespace detail {
6604
6605class UsMopa4WayOpGenericAdaptorBase {
6606public:
6607 struct Properties {
6608 using operandSegmentSizesTy = std::array<int32_t, 5>;
6609 operandSegmentSizesTy operandSegmentSizes;
6610 ::llvm::ArrayRef<int32_t> getOperandSegmentSizes() const {
6611 auto &propStorage = this->operandSegmentSizes;
6612 return propStorage;
6613 }
6614 void setOperandSegmentSizes(::llvm::ArrayRef<int32_t> propValue) {
6615 auto &propStorage = this->operandSegmentSizes;
6616 ::llvm::copy(Range&: propValue, Out: propStorage.begin());
6617 }
6618 bool operator==(const Properties &rhs) const {
6619 return
6620 rhs.operandSegmentSizes == this->operandSegmentSizes &&
6621 true;
6622 }
6623 bool operator!=(const Properties &rhs) const {
6624 return !(*this == rhs);
6625 }
6626 };
6627protected:
6628 ::mlir::DictionaryAttr odsAttrs;
6629 ::std::optional<::mlir::OperationName> odsOpName;
6630 Properties properties;
6631 ::mlir::RegionRange odsRegions;
6632public:
6633 UsMopa4WayOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
6634 odsOpName.emplace(args: "arm_sme.usmopa_4way", args: odsAttrs.getContext());
6635 }
6636
6637 UsMopa4WayOpGenericAdaptorBase(UsMopa4WayOp op);
6638
6639 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
6640 const Properties &getProperties() {
6641 return properties;
6642 }
6643
6644 ::mlir::DictionaryAttr getAttributes() {
6645 return odsAttrs;
6646 }
6647
6648};
6649
6650} // namespace detail
6651template <typename RangeT>
6652class UsMopa4WayOpGenericAdaptor : public detail::UsMopa4WayOpGenericAdaptorBase {
6653 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
6654 using Base = detail::UsMopa4WayOpGenericAdaptorBase;
6655 static constexpr int odsIndex_lhs = 0;
6656 static constexpr int odsIndex_rhs = 1;
6657 static constexpr int odsIndex_lhsMask = 2;
6658 static constexpr int odsIndex_rhsMask = 3;
6659 static constexpr int odsIndex_acc = 4;
6660public:
6661 UsMopa4WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
6662
6663 UsMopa4WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : UsMopa4WayOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
6664
6665 UsMopa4WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs) : UsMopa4WayOpGenericAdaptor(values, attrs, Properties{}, {}) {}
6666
6667 UsMopa4WayOpGenericAdaptor(RangeT values, const UsMopa4WayOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
6668
6669 template <typename LateInst = UsMopa4WayOp, typename = std::enable_if_t<std::is_same_v<LateInst, UsMopa4WayOp>>>
6670 UsMopa4WayOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
6671
6672 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
6673 return Base::getODSOperandIndexAndLength(index, odsOperandsSize: odsOperands.size());
6674 }
6675
6676 RangeT getODSOperands(unsigned index) {
6677 auto valueRange = getODSOperandIndexAndLength(index);
6678 return {std::next(odsOperands.begin(), valueRange.first),
6679 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
6680 }
6681
6682 ValueT getLhs() {
6683 return (*getODSOperands(index: 0).begin());
6684 }
6685
6686 ValueT getRhs() {
6687 return (*getODSOperands(index: 1).begin());
6688 }
6689
6690 ValueT getLhsMask() {
6691 auto operands = getODSOperands(index: 2);
6692 return operands.empty() ? ValueT{} : (*operands.begin());
6693 }
6694
6695 ValueT getRhsMask() {
6696 auto operands = getODSOperands(index: 3);
6697 return operands.empty() ? ValueT{} : (*operands.begin());
6698 }
6699
6700 ValueT getAcc() {
6701 auto operands = getODSOperands(index: 4);
6702 return operands.empty() ? ValueT{} : (*operands.begin());
6703 }
6704
6705 RangeT getOperands() {
6706 return odsOperands;
6707 }
6708
6709private:
6710 RangeT odsOperands;
6711};
6712class UsMopa4WayOpAdaptor : public UsMopa4WayOpGenericAdaptor<::mlir::ValueRange> {
6713public:
6714 using UsMopa4WayOpGenericAdaptor::UsMopa4WayOpGenericAdaptor;
6715 UsMopa4WayOpAdaptor(UsMopa4WayOp op);
6716
6717 ::llvm::LogicalResult verify(::mlir::Location loc);
6718};
6719class UsMopa4WayOp : public ::mlir::Op<UsMopa4WayOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<2>::Impl, ::mlir::OpTrait::AttrSizedOperandSegments, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::arm_sme::ArmSMETileOpInterface::Trait> {
6720public:
6721 using Op::Op;
6722 using Op::print;
6723 using Adaptor = UsMopa4WayOpAdaptor;
6724 template <typename RangeT>
6725 using GenericAdaptor = UsMopa4WayOpGenericAdaptor<RangeT>;
6726 using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
6727 static constexpr int odsIndex_lhs = 0;
6728 static constexpr int odsIndex_rhs = 1;
6729 static constexpr int odsIndex_lhsMask = 2;
6730 static constexpr int odsIndex_rhsMask = 3;
6731 static constexpr int odsIndex_acc = 4;
6732 static constexpr int odsIndex_result = 0;
6733 using Properties = FoldAdaptor::Properties;
6734 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
6735 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("operandSegmentSizes")};
6736 return ::llvm::ArrayRef(attrNames);
6737 }
6738
6739 ::mlir::StringAttr getOperandSegmentSizesAttrName() {
6740 return (*this)->getName().getAttributeNames().back();
6741 }
6742
6743 static ::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name) {
6744 return name.getAttributeNames().back();
6745 }
6746
6747 static constexpr ::llvm::StringLiteral getOperationName() {
6748 return ::llvm::StringLiteral("arm_sme.usmopa_4way");
6749 }
6750
6751 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
6752 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
6753 auto [start, length] = getODSOperandIndexAndLength(index);
6754 return getOperation()->getOperands().slice(n: start, m: length);
6755 }
6756
6757 ::mlir::TypedValue<::mlir::Type> getLhs() {
6758 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(Val: *getODSOperands(index: 0).begin());
6759 }
6760
6761 ::mlir::TypedValue<::mlir::VectorType> getRhs() {
6762 return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *getODSOperands(index: 1).begin());
6763 }
6764
6765 ::mlir::TypedValue<::mlir::VectorType> getLhsMask() {
6766 auto operands = getODSOperands(index: 2);
6767 return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *operands.begin());
6768 }
6769
6770 ::mlir::TypedValue<::mlir::VectorType> getRhsMask() {
6771 auto operands = getODSOperands(index: 3);
6772 return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *operands.begin());
6773 }
6774
6775 ::mlir::TypedValue<::mlir::VectorType> getAcc() {
6776 auto operands = getODSOperands(index: 4);
6777 return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *operands.begin());
6778 }
6779
6780 ::mlir::OpOperand &getLhsMutable() {
6781 auto range = getODSOperandIndexAndLength(index: 0);
6782 return getOperation()->getOpOperand(idx: range.first);
6783 }
6784
6785 ::mlir::OpOperand &getRhsMutable() {
6786 auto range = getODSOperandIndexAndLength(index: 1);
6787 return getOperation()->getOpOperand(idx: range.first);
6788 }
6789
6790 ::mlir::MutableOperandRange getLhsMaskMutable();
6791 ::mlir::MutableOperandRange getRhsMaskMutable();
6792 ::mlir::MutableOperandRange getAccMutable();
6793 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
6794 return {index, 1};
6795 }
6796
6797 ::mlir::Operation::result_range getODSResults(unsigned index) {
6798 auto valueRange = getODSResultIndexAndLength(index);
6799 return {std::next(x: getOperation()->result_begin(), n: valueRange.first),
6800 std::next(x: getOperation()->result_begin(), n: valueRange.first + valueRange.second)};
6801 }
6802
6803 ::mlir::TypedValue<::mlir::Type> getResult() {
6804 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(Val: *getODSResults(index: 0).begin());
6805 }
6806
6807 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
6808 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
6809 static llvm::hash_code computePropertiesHash(const Properties &prop);
6810 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
6811 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
6812 static void walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor);
6813 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
6814 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
6815 void writeProperties(::mlir::DialectBytecodeWriter &writer);
6816 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
6817 static UsMopa4WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
6818 static UsMopa4WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
6819 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
6820 static UsMopa4WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
6821 static UsMopa4WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
6822 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
6823 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
6824 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
6825 static UsMopa4WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
6826 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
6827 static UsMopa4WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
6828 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
6829 static UsMopa4WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
6830 static UsMopa4WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
6831 ::llvm::LogicalResult verifyInvariantsImpl();
6832 ::llvm::LogicalResult verifyInvariants();
6833 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
6834 LLVM_ATTRIBUTE_MINSIZE void print(::mlir::OpAsmPrinter &_odsPrinter);
6835 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
6836private:
6837 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
6838 return getAttributeNameForIndex(name: (*this)->getName(), index);
6839 }
6840
6841 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
6842 return {};
6843 }
6844
6845 static void buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes);
6846public:
6847 VectorType getLhsType() { return llvm::cast<VectorType>(Val: getLhs().getType()); }
6848 VectorType getRhsType() { return llvm::cast<VectorType>(Val: getRhs().getType()); }
6849 VectorType getResultType() { return llvm::cast<VectorType>(Val: getResult().getType()); }
6850 VectorType getTileType() {
6851 return getResultType();
6852 }
6853};
6854
6855} // namespace mlir::arm_sme
6856MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::UsMopa4WayOp)
6857MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::UsMopa4WayOpGenericAdaptorBase::Properties)
6858
6859namespace mlir::arm_sme {
6860
6861
6862//===----------------------------------------------------------------------===//
6863// ::mlir::arm_sme::UsMops4WayOp declarations
6864//===----------------------------------------------------------------------===//
6865
6866namespace detail {
6867
6868class UsMops4WayOpGenericAdaptorBase {
6869public:
6870 struct Properties {
6871 using operandSegmentSizesTy = std::array<int32_t, 5>;
6872 operandSegmentSizesTy operandSegmentSizes;
6873 ::llvm::ArrayRef<int32_t> getOperandSegmentSizes() const {
6874 auto &propStorage = this->operandSegmentSizes;
6875 return propStorage;
6876 }
6877 void setOperandSegmentSizes(::llvm::ArrayRef<int32_t> propValue) {
6878 auto &propStorage = this->operandSegmentSizes;
6879 ::llvm::copy(Range&: propValue, Out: propStorage.begin());
6880 }
6881 bool operator==(const Properties &rhs) const {
6882 return
6883 rhs.operandSegmentSizes == this->operandSegmentSizes &&
6884 true;
6885 }
6886 bool operator!=(const Properties &rhs) const {
6887 return !(*this == rhs);
6888 }
6889 };
6890protected:
6891 ::mlir::DictionaryAttr odsAttrs;
6892 ::std::optional<::mlir::OperationName> odsOpName;
6893 Properties properties;
6894 ::mlir::RegionRange odsRegions;
6895public:
6896 UsMops4WayOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
6897 odsOpName.emplace(args: "arm_sme.usmops_4way", args: odsAttrs.getContext());
6898 }
6899
6900 UsMops4WayOpGenericAdaptorBase(UsMops4WayOp op);
6901
6902 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
6903 const Properties &getProperties() {
6904 return properties;
6905 }
6906
6907 ::mlir::DictionaryAttr getAttributes() {
6908 return odsAttrs;
6909 }
6910
6911};
6912
6913} // namespace detail
6914template <typename RangeT>
6915class UsMops4WayOpGenericAdaptor : public detail::UsMops4WayOpGenericAdaptorBase {
6916 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
6917 using Base = detail::UsMops4WayOpGenericAdaptorBase;
6918 static constexpr int odsIndex_lhs = 0;
6919 static constexpr int odsIndex_rhs = 1;
6920 static constexpr int odsIndex_lhsMask = 2;
6921 static constexpr int odsIndex_rhsMask = 3;
6922 static constexpr int odsIndex_acc = 4;
6923public:
6924 UsMops4WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
6925
6926 UsMops4WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : UsMops4WayOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
6927
6928 UsMops4WayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs) : UsMops4WayOpGenericAdaptor(values, attrs, Properties{}, {}) {}
6929
6930 UsMops4WayOpGenericAdaptor(RangeT values, const UsMops4WayOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
6931
6932 template <typename LateInst = UsMops4WayOp, typename = std::enable_if_t<std::is_same_v<LateInst, UsMops4WayOp>>>
6933 UsMops4WayOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
6934
6935 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
6936 return Base::getODSOperandIndexAndLength(index, odsOperandsSize: odsOperands.size());
6937 }
6938
6939 RangeT getODSOperands(unsigned index) {
6940 auto valueRange = getODSOperandIndexAndLength(index);
6941 return {std::next(odsOperands.begin(), valueRange.first),
6942 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
6943 }
6944
6945 ValueT getLhs() {
6946 return (*getODSOperands(index: 0).begin());
6947 }
6948
6949 ValueT getRhs() {
6950 return (*getODSOperands(index: 1).begin());
6951 }
6952
6953 ValueT getLhsMask() {
6954 auto operands = getODSOperands(index: 2);
6955 return operands.empty() ? ValueT{} : (*operands.begin());
6956 }
6957
6958 ValueT getRhsMask() {
6959 auto operands = getODSOperands(index: 3);
6960 return operands.empty() ? ValueT{} : (*operands.begin());
6961 }
6962
6963 ValueT getAcc() {
6964 auto operands = getODSOperands(index: 4);
6965 return operands.empty() ? ValueT{} : (*operands.begin());
6966 }
6967
6968 RangeT getOperands() {
6969 return odsOperands;
6970 }
6971
6972private:
6973 RangeT odsOperands;
6974};
6975class UsMops4WayOpAdaptor : public UsMops4WayOpGenericAdaptor<::mlir::ValueRange> {
6976public:
6977 using UsMops4WayOpGenericAdaptor::UsMops4WayOpGenericAdaptor;
6978 UsMops4WayOpAdaptor(UsMops4WayOp op);
6979
6980 ::llvm::LogicalResult verify(::mlir::Location loc);
6981};
6982class UsMops4WayOp : public ::mlir::Op<UsMops4WayOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<2>::Impl, ::mlir::OpTrait::AttrSizedOperandSegments, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::arm_sme::ArmSMETileOpInterface::Trait> {
6983public:
6984 using Op::Op;
6985 using Op::print;
6986 using Adaptor = UsMops4WayOpAdaptor;
6987 template <typename RangeT>
6988 using GenericAdaptor = UsMops4WayOpGenericAdaptor<RangeT>;
6989 using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
6990 static constexpr int odsIndex_lhs = 0;
6991 static constexpr int odsIndex_rhs = 1;
6992 static constexpr int odsIndex_lhsMask = 2;
6993 static constexpr int odsIndex_rhsMask = 3;
6994 static constexpr int odsIndex_acc = 4;
6995 static constexpr int odsIndex_result = 0;
6996 using Properties = FoldAdaptor::Properties;
6997 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
6998 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("operandSegmentSizes")};
6999 return ::llvm::ArrayRef(attrNames);
7000 }
7001
7002 ::mlir::StringAttr getOperandSegmentSizesAttrName() {
7003 return (*this)->getName().getAttributeNames().back();
7004 }
7005
7006 static ::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name) {
7007 return name.getAttributeNames().back();
7008 }
7009
7010 static constexpr ::llvm::StringLiteral getOperationName() {
7011 return ::llvm::StringLiteral("arm_sme.usmops_4way");
7012 }
7013
7014 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
7015 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
7016 auto [start, length] = getODSOperandIndexAndLength(index);
7017 return getOperation()->getOperands().slice(n: start, m: length);
7018 }
7019
7020 ::mlir::TypedValue<::mlir::Type> getLhs() {
7021 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(Val: *getODSOperands(index: 0).begin());
7022 }
7023
7024 ::mlir::TypedValue<::mlir::VectorType> getRhs() {
7025 return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *getODSOperands(index: 1).begin());
7026 }
7027
7028 ::mlir::TypedValue<::mlir::VectorType> getLhsMask() {
7029 auto operands = getODSOperands(index: 2);
7030 return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *operands.begin());
7031 }
7032
7033 ::mlir::TypedValue<::mlir::VectorType> getRhsMask() {
7034 auto operands = getODSOperands(index: 3);
7035 return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *operands.begin());
7036 }
7037
7038 ::mlir::TypedValue<::mlir::VectorType> getAcc() {
7039 auto operands = getODSOperands(index: 4);
7040 return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(Val: *operands.begin());
7041 }
7042
7043 ::mlir::OpOperand &getLhsMutable() {
7044 auto range = getODSOperandIndexAndLength(index: 0);
7045 return getOperation()->getOpOperand(idx: range.first);
7046 }
7047
7048 ::mlir::OpOperand &getRhsMutable() {
7049 auto range = getODSOperandIndexAndLength(index: 1);
7050 return getOperation()->getOpOperand(idx: range.first);
7051 }
7052
7053 ::mlir::MutableOperandRange getLhsMaskMutable();
7054 ::mlir::MutableOperandRange getRhsMaskMutable();
7055 ::mlir::MutableOperandRange getAccMutable();
7056 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
7057 return {index, 1};
7058 }
7059
7060 ::mlir::Operation::result_range getODSResults(unsigned index) {
7061 auto valueRange = getODSResultIndexAndLength(index);
7062 return {std::next(x: getOperation()->result_begin(), n: valueRange.first),
7063 std::next(x: getOperation()->result_begin(), n: valueRange.first + valueRange.second)};
7064 }
7065
7066 ::mlir::TypedValue<::mlir::Type> getResult() {
7067 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(Val: *getODSResults(index: 0).begin());
7068 }
7069
7070 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
7071 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
7072 static llvm::hash_code computePropertiesHash(const Properties &prop);
7073 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
7074 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
7075 static void walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor);
7076 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
7077 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
7078 void writeProperties(::mlir::DialectBytecodeWriter &writer);
7079 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
7080 static UsMops4WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
7081 static UsMops4WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
7082 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
7083 static UsMops4WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
7084 static UsMops4WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, /*optional*/::mlir::Value lhsMask, /*optional*/::mlir::Value rhsMask, /*optional*/::mlir::Value acc);
7085 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
7086 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
7087 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
7088 static UsMops4WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
7089 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
7090 static UsMops4WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
7091 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
7092 static UsMops4WayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
7093 static UsMops4WayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
7094 ::llvm::LogicalResult verifyInvariantsImpl();
7095 ::llvm::LogicalResult verifyInvariants();
7096 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
7097 LLVM_ATTRIBUTE_MINSIZE void print(::mlir::OpAsmPrinter &_odsPrinter);
7098 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
7099private:
7100 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
7101 return getAttributeNameForIndex(name: (*this)->getName(), index);
7102 }
7103
7104 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
7105 return {};
7106 }
7107
7108 static void buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes);
7109public:
7110 VectorType getLhsType() { return llvm::cast<VectorType>(Val: getLhs().getType()); }
7111 VectorType getRhsType() { return llvm::cast<VectorType>(Val: getRhs().getType()); }
7112 VectorType getResultType() { return llvm::cast<VectorType>(Val: getResult().getType()); }
7113 VectorType getTileType() {
7114 return getResultType();
7115 }
7116};
7117
7118} // namespace mlir::arm_sme
7119MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::UsMops4WayOp)
7120MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::UsMops4WayOpGenericAdaptorBase::Properties)
7121
7122namespace mlir::arm_sme {
7123
7124
7125//===----------------------------------------------------------------------===//
7126// ::mlir::arm_sme::ZeroOp declarations
7127//===----------------------------------------------------------------------===//
7128
7129namespace detail {
7130
7131class ZeroOpGenericAdaptorBase {
7132public:
7133 using Properties = ::mlir::EmptyProperties;
7134protected:
7135 ::mlir::DictionaryAttr odsAttrs;
7136 ::std::optional<::mlir::OperationName> odsOpName;
7137 Properties properties;
7138 ::mlir::RegionRange odsRegions;
7139public:
7140 ZeroOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
7141 odsOpName.emplace(args: "arm_sme.zero", args: odsAttrs.getContext());
7142 }
7143
7144 ZeroOpGenericAdaptorBase(ZeroOp op);
7145
7146 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
7147 return {index, 1};
7148 }
7149
7150 const Properties &getProperties() {
7151 return properties;
7152 }
7153
7154 ::mlir::DictionaryAttr getAttributes() {
7155 return odsAttrs;
7156 }
7157
7158};
7159
7160} // namespace detail
7161template <typename RangeT>
7162class ZeroOpGenericAdaptor : public detail::ZeroOpGenericAdaptorBase {
7163 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
7164 using Base = detail::ZeroOpGenericAdaptorBase;
7165public:
7166 ZeroOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
7167
7168 ZeroOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ZeroOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
7169
7170 ZeroOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ZeroOpGenericAdaptor(values, attrs, Properties{}, {}) {}
7171
7172 ZeroOpGenericAdaptor(RangeT values, const ZeroOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
7173
7174 template <typename LateInst = ZeroOp, typename = std::enable_if_t<std::is_same_v<LateInst, ZeroOp>>>
7175 ZeroOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
7176
7177 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
7178 return Base::getODSOperandIndexAndLength(index, odsOperandsSize: odsOperands.size());
7179 }
7180
7181 RangeT getODSOperands(unsigned index) {
7182 auto valueRange = getODSOperandIndexAndLength(index);
7183 return {std::next(odsOperands.begin(), valueRange.first),
7184 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
7185 }
7186
7187 RangeT getOperands() {
7188 return odsOperands;
7189 }
7190
7191private:
7192 RangeT odsOperands;
7193};
7194class ZeroOpAdaptor : public ZeroOpGenericAdaptor<::mlir::ValueRange> {
7195public:
7196 using ZeroOpGenericAdaptor::ZeroOpGenericAdaptor;
7197 ZeroOpAdaptor(ZeroOp op);
7198
7199 ::llvm::LogicalResult verify(::mlir::Location loc);
7200};
7201class ZeroOp : public ::mlir::Op<ZeroOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<VectorType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::arm_sme::ArmSMETileOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> {
7202public:
7203 using Op::Op;
7204 using Op::print;
7205 using Adaptor = ZeroOpAdaptor;
7206 template <typename RangeT>
7207 using GenericAdaptor = ZeroOpGenericAdaptor<RangeT>;
7208 using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
7209 static constexpr int odsIndex_res = 0;
7210 using Properties = FoldAdaptor::Properties;
7211 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
7212 return {};
7213 }
7214
7215 static constexpr ::llvm::StringLiteral getOperationName() {
7216 return ::llvm::StringLiteral("arm_sme.zero");
7217 }
7218
7219 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
7220 return {index, 1};
7221 }
7222
7223 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
7224 auto [start, length] = getODSOperandIndexAndLength(index);
7225 return getOperation()->getOperands().slice(n: start, m: length);
7226 }
7227
7228 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
7229 return {index, 1};
7230 }
7231
7232 ::mlir::Operation::result_range getODSResults(unsigned index) {
7233 auto valueRange = getODSResultIndexAndLength(index);
7234 return {std::next(x: getOperation()->result_begin(), n: valueRange.first),
7235 std::next(x: getOperation()->result_begin(), n: valueRange.first + valueRange.second)};
7236 }
7237
7238 ::mlir::TypedValue<VectorType> getRes() {
7239 return ::llvm::cast<::mlir::TypedValue<VectorType>>(Val: *getODSResults(index: 0).begin());
7240 }
7241
7242 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
7243 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
7244 static llvm::hash_code computePropertiesHash(const Properties &prop);
7245 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
7246 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
7247 static void walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor);
7248 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
7249 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
7250 static ZeroOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res);
7251 static ZeroOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res);
7252 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
7253 static ZeroOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
7254 static ZeroOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
7255 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
7256 static ZeroOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
7257 static ZeroOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
7258 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
7259 static ZeroOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
7260 static ZeroOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
7261 ::llvm::LogicalResult verifyInvariantsImpl();
7262 ::llvm::LogicalResult verifyInvariants();
7263 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
7264 LLVM_ATTRIBUTE_MINSIZE void print(::mlir::OpAsmPrinter &_odsPrinter);
7265 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
7266public:
7267 VectorType getVectorType() {
7268 return ::llvm::cast<VectorType>(Val: getRes().getType());
7269 }
7270 VectorType getTileType() {
7271 return getVectorType();
7272 }
7273};
7274
7275} // namespace mlir::arm_sme
7276MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_sme::ZeroOp)
7277
7278
7279#endif // GET_OP_CLASSES
7280
7281