1- //===-- CGOps.td - FIR operation definitions -------- -------*- tablegen -*-===//
1+ //===-- CGOps.td - FIR CodeGen operation definitions -------*- tablegen -*-===//
22//
33// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44// See https://llvm.org/LICENSE.txt for license information.
@@ -28,7 +28,7 @@ def fircg_Dialect : Dialect {
2828// Base class for FIR CG operations.
2929// All operations automatically get a prefix of "fircg.".
3030class fircg_Op<string mnemonic, list<Trait> traits>
31- : Op<fircg_Dialect, mnemonic, traits>;
31+ : Op<fircg_Dialect, mnemonic, traits>;
3232
3333// Extended embox operation.
3434def fircg_XEmboxOp : fircg_Op<"ext_embox", [AttrSizedOperandSegments]> {
@@ -55,17 +55,12 @@ def fircg_XEmboxOp : fircg_Op<"ext_embox", [AttrSizedOperandSegments]> {
5555 The memref and shape arguments are mandatory. The rest are optional.
5656 }];
5757
58- let arguments = (ins
59- AnyReferenceLike:$memref,
60- Variadic<AnyIntegerType>:$shape,
61- Variadic<AnyIntegerType>:$shift,
62- Variadic<AnyIntegerType>:$slice,
63- Variadic<AnyCoordinateType>:$subcomponent,
64- Variadic<AnyIntegerType>:$substr,
65- Variadic<AnyIntegerType>:$lenParams,
66- Optional<fir_ClassType>:$sourceBox,
67- OptionalAttr<I32Attr>:$allocator_idx
68- );
58+ let arguments = (ins AnyReferenceLike:$memref,
59+ Variadic<AnyIntegerType>:$shape, Variadic<AnyIntegerType>:$shift,
60+ Variadic<AnyIntegerType>:$slice,
61+ Variadic<AnyCoordinateType>:$subcomponent,
62+ Variadic<AnyIntegerType>:$substr, Variadic<AnyIntegerType>:$lenParams,
63+ Optional<fir_ClassType>:$sourceBox, OptionalAttr<I32Attr>:$allocator_idx);
6964 let results = (outs BoxOrClassType);
7065
7166 let assemblyFormat = [{
@@ -125,14 +120,10 @@ def fircg_XReboxOp : fircg_Op<"ext_rebox", [AttrSizedOperandSegments]> {
125120 There must not both be a shape and slice/subcomponent arguments
126121 }];
127122
128- let arguments = (ins
129- BoxOrClassType:$box,
130- Variadic<AnyIntegerType>:$shape,
131- Variadic<AnyIntegerType>:$shift,
132- Variadic<AnyIntegerType>:$slice,
133- Variadic<AnyCoordinateType>:$subcomponent,
134- Variadic<AnyIntegerType>:$substr
135- );
123+ let arguments = (ins BoxOrClassType:$box, Variadic<AnyIntegerType>:$shape,
124+ Variadic<AnyIntegerType>:$shift, Variadic<AnyIntegerType>:$slice,
125+ Variadic<AnyCoordinateType>:$subcomponent,
126+ Variadic<AnyIntegerType>:$substr);
136127 let results = (outs BoxOrClassType);
137128
138129 let assemblyFormat = [{
@@ -163,9 +154,9 @@ def fircg_XReboxOp : fircg_Op<"ext_rebox", [AttrSizedOperandSegments]> {
163154 }];
164155}
165156
166-
167157// Extended array coordinate operation.
168- def fircg_XArrayCoorOp : fircg_Op<"ext_array_coor", [AttrSizedOperandSegments]> {
158+ def fircg_XArrayCoorOp
159+ : fircg_Op<"ext_array_coor", [AttrSizedOperandSegments]> {
169160 let summary = "for internal conversion only";
170161
171162 let description = [{
@@ -190,15 +181,11 @@ def fircg_XArrayCoorOp : fircg_Op<"ext_array_coor", [AttrSizedOperandSegments]>
190181 omitted otherwise. The rest of the arguments are optional.
191182 }];
192183
193- let arguments = (ins
194- AnyRefOrBox:$memref,
195- Variadic<AnyIntegerType>:$shape,
196- Variadic<AnyIntegerType>:$shift,
197- Variadic<AnyIntegerType>:$slice,
198- Variadic<AnyCoordinateType>:$subcomponent,
199- Variadic<AnyCoordinateType>:$indices,
200- Variadic<AnyIntegerType>:$lenParams
201- );
184+ let arguments = (ins AnyRefOrBox:$memref, Variadic<AnyIntegerType>:$shape,
185+ Variadic<AnyIntegerType>:$shift, Variadic<AnyIntegerType>:$slice,
186+ Variadic<AnyCoordinateType>:$subcomponent,
187+ Variadic<AnyCoordinateType>:$indices,
188+ Variadic<AnyIntegerType>:$lenParams);
202189 let results = (outs fir_ReferenceType);
203190
204191 let assemblyFormat = [{
@@ -239,14 +226,9 @@ def fircg_XDeclareOp : fircg_Op<"ext_declare", [AttrSizedOperandSegments]> {
239226 be converted to an extended DeclareOp.
240227 }];
241228
242- let arguments = (ins
243- AnyRefOrBox:$memref,
244- Variadic<AnyIntegerType>:$shape,
245- Variadic<AnyIntegerType>:$shift,
246- Variadic<AnyIntegerType>:$typeparams,
247- Optional<fir_DummyScopeType>:$dummy_scope,
248- Builtin_StringAttr:$uniq_name
249- );
229+ let arguments = (ins AnyRefOrBox:$memref, Variadic<AnyIntegerType>:$shape,
230+ Variadic<AnyIntegerType>:$shift, Variadic<AnyIntegerType>:$typeparams,
231+ Optional<fir_DummyScopeType>:$dummy_scope, Builtin_StringAttr:$uniq_name);
250232 let results = (outs AnyRefOrBox);
251233
252234 let assemblyFormat = [{
0 commit comments