@@ -60,6 +60,9 @@ def AttrSizedOperandsOp : TestOp<"attr_sized_operands",
60
60
Optional<AnyType>:$variadic2);
61
61
}
62
62
63
+ // CHECK: def attr_sized_operands(variadic1, non_variadic, *, variadic2=None, loc=None, ip=None)
64
+ // CHECK: return _get_op_result_or_op_results(AttrSizedOperandsOp(variadic1=variadic1, non_variadic=non_variadic, variadic2=variadic2, loc=loc, ip=ip))
65
+
63
66
// CHECK: @_ods_cext.register_operation(_Dialect)
64
67
// CHECK: class AttrSizedResultsOp(_ods_ir.OpView):
65
68
// CHECK-LABEL: OPERATION_NAME = "test.attr_sized_results"
@@ -104,6 +107,9 @@ def AttrSizedResultsOp : TestOp<"attr_sized_results",
104
107
Variadic<AnyType>:$variadic2);
105
108
}
106
109
110
+ // CHECK: def attr_sized_results(variadic1, non_variadic, variadic2, *, loc=None, ip=None)
111
+ // CHECK: return _get_op_result_or_op_results(AttrSizedResultsOp(variadic1=variadic1, non_variadic=non_variadic, variadic2=variadic2, loc=loc, ip=ip))
112
+
107
113
108
114
// CHECK: @_ods_cext.register_operation(_Dialect)
109
115
// CHECK: class AttributedOp(_ods_ir.OpView):
@@ -151,6 +157,9 @@ def AttributedOp : TestOp<"attributed_op"> {
151
157
UnitAttr:$unitAttr, I32Attr:$in);
152
158
}
153
159
160
+ // CHECK: def attributed_op(i32attr, in_, *, optional_f32_attr=None, unit_attr=None, loc=None, ip=None)
161
+ // CHECK: return _get_op_result_or_op_results(AttributedOp(i32attr=i32attr, in_=in_, optionalF32Attr=optional_f32_attr, unitAttr=unit_attr, loc=loc, ip=ip))
162
+
154
163
// CHECK: @_ods_cext.register_operation(_Dialect)
155
164
// CHECK: class AttributedOpWithOperands(_ods_ir.OpView):
156
165
// CHECK-LABEL: OPERATION_NAME = "test.attributed_op_with_operands"
@@ -184,6 +193,9 @@ def AttributedOpWithOperands : TestOp<"attributed_op_with_operands"> {
184
193
let arguments = (ins I32, UnitAttr:$in, F32, OptionalAttr<F32Attr>:$is);
185
194
}
186
195
196
+ // CHECK: def attributed_op_with_operands(_gen_arg_0, _gen_arg_2, *, in_=None, is_=None, loc=None, ip=None)
197
+ // CHECK: return _get_op_result_or_op_results(AttributedOpWithOperands(_gen_arg_0=_gen_arg_0, _gen_arg_2=_gen_arg_2, in_=in_, is_=is_, loc=loc, ip=ip))
198
+
187
199
// CHECK: @_ods_cext.register_operation(_Dialect)
188
200
// CHECK: class DefaultValuedAttrsOp(_ods_ir.OpView):
189
201
// CHECK-LABEL: OPERATION_NAME = "test.default_valued_attrs"
@@ -205,6 +217,9 @@ def DefaultValuedAttrsOp : TestOp<"default_valued_attrs"> {
205
217
let results = (outs);
206
218
}
207
219
220
+ // CHECK: def default_valued_attrs(*, arr=None, unsupported=None, loc=None, ip=None)
221
+ // CHECK: return _get_op_result_or_op_results(DefaultValuedAttrsOp(arr=arr, unsupported=unsupported, loc=loc, ip=ip))
222
+
208
223
// CHECK-LABEL: OPERATION_NAME = "test.derive_result_types_op"
209
224
def DeriveResultTypesOp : TestOp<"derive_result_types_op", [FirstAttrDerivedResultType]> {
210
225
// CHECK: def __init__(self, type_, *, loc=None, ip=None):
@@ -220,13 +235,19 @@ def DeriveResultTypesOp : TestOp<"derive_result_types_op", [FirstAttrDerivedResu
220
235
let results = (outs AnyType:$res, AnyType);
221
236
}
222
237
238
+ // CHECK: def derive_result_types_op(type_, *, loc=None, ip=None)
239
+ // CHECK: return _get_op_result_or_op_results(DeriveResultTypesOp(type_=type_, loc=loc, ip=ip))
240
+
223
241
// CHECK-LABEL: OPERATION_NAME = "test.derive_result_types_variadic_op"
224
242
def DeriveResultTypesVariadicOp : TestOp<"derive_result_types_variadic_op", [FirstAttrDerivedResultType]> {
225
243
// CHECK: def __init__(self, res, _gen_res_1, type_, *, loc=None, ip=None):
226
244
let arguments = (ins TypeAttr:$type);
227
245
let results = (outs AnyType:$res, Variadic<AnyType>);
228
246
}
229
247
248
+ // CHECK: def derive_result_types_variadic_op(res, _gen_res_1, type_, *, loc=None, ip=None)
249
+ // CHECK: return _get_op_result_or_op_results(DeriveResultTypesVariadicOp(res=res, _gen_res_1=_gen_res_1, type_=type_, loc=loc, ip=ip))
250
+
230
251
// CHECK: @_ods_cext.register_operation(_Dialect)
231
252
// CHECK: class EmptyOp(_ods_ir.OpView):
232
253
// CHECK-LABEL: OPERATION_NAME = "test.empty"
@@ -241,6 +262,8 @@ def EmptyOp : TestOp<"empty">;
241
262
// CHECK: attributes=attributes, results=results, operands=operands,
242
263
// CHECK: successors=_ods_successors, regions=regions, loc=loc, ip=ip))
243
264
265
+ // CHECK: def empty(*, loc=None, ip=None)
266
+ // CHECK: return _get_op_result_or_op_results(EmptyOp(loc=loc, ip=ip))
244
267
245
268
// CHECK-LABEL: OPERATION_NAME = "test.infer_result_types_implied_op"
246
269
def InferResultTypesImpliedOp : TestOp<"infer_result_types_implied_op"> {
@@ -252,6 +275,9 @@ def InferResultTypesImpliedOp : TestOp<"infer_result_types_implied_op"> {
252
275
let results = (outs I32:$i32, F32:$f32);
253
276
}
254
277
278
+ // CHECK: def infer_result_types_implied_op(*, loc=None, ip=None)
279
+ // CHECK: return _get_op_result_or_op_results(InferResultTypesImpliedOp(loc=loc, ip=ip))
280
+
255
281
// CHECK-LABEL: OPERATION_NAME = "test.infer_result_types_op"
256
282
def InferResultTypesOp : TestOp<"infer_result_types_op", [InferTypeOpInterface]> {
257
283
// CHECK: def __init__(self, *, loc=None, ip=None):
@@ -262,6 +288,9 @@ def InferResultTypesOp : TestOp<"infer_result_types_op", [InferTypeOpInterface]>
262
288
let results = (outs AnyType, AnyType, AnyType);
263
289
}
264
290
291
+ // CHECK: def infer_result_types_op(*, loc=None, ip=None)
292
+ // CHECK: return _get_op_result_or_op_results(InferResultTypesOp(loc=loc, ip=ip))
293
+
265
294
// CHECK: @_ods_cext.register_operation(_Dialect)
266
295
// CHECK: class MissingNamesOp(_ods_ir.OpView):
267
296
// CHECK-LABEL: OPERATION_NAME = "test.missing_names"
@@ -297,6 +326,9 @@ def MissingNamesOp : TestOp<"missing_names"> {
297
326
let results = (outs I32:$i32, AnyFloat, I64:$i64);
298
327
}
299
328
329
+ // CHECK: def missing_names(i32, _gen_res_1, i64, _gen_arg_0, f32, _gen_arg_2, *, loc=None, ip=None)
330
+ // CHECK: return _get_op_result_or_op_results(MissingNamesOp(i32=i32, _gen_res_1=_gen_res_1, i64=i64, _gen_arg_0=_gen_arg_0, f32=f32, _gen_arg_2=_gen_arg_2, loc=loc, ip=ip))
331
+
300
332
// CHECK: @_ods_cext.register_operation(_Dialect)
301
333
// CHECK: class OneOptionalOperandOp(_ods_ir.OpView):
302
334
// CHECK-LABEL: OPERATION_NAME = "test.one_optional_operand"
@@ -323,9 +355,11 @@ def OneOptionalOperandOp : TestOp<"one_optional_operand"> {
323
355
// CHECK: @builtins.property
324
356
// CHECK: def optional(self):
325
357
// CHECK: return None if len(self.operation.operands) < 2 else self.operation.operands[1]
326
-
327
358
}
328
359
360
+ // CHECK: def one_optional_operand(non_optional, *, optional=None, loc=None, ip=None)
361
+ // CHECK: return _get_op_result_or_op_results(OneOptionalOperandOp(non_optional=non_optional, optional=optional, loc=loc, ip=ip))
362
+
329
363
// CHECK: @_ods_cext.register_operation(_Dialect)
330
364
// CHECK: class OneVariadicOperandOp(_ods_ir.OpView):
331
365
// CHECK-LABEL: OPERATION_NAME = "test.one_variadic_operand"
@@ -355,6 +389,9 @@ def OneVariadicOperandOp : TestOp<"one_variadic_operand"> {
355
389
let arguments = (ins AnyType:$non_variadic, Variadic<AnyType>:$variadic);
356
390
}
357
391
392
+ // CHECK: def one_variadic_operand(non_variadic, variadic, *, loc=None, ip=None)
393
+ // CHECK: return _get_op_result_or_op_results(OneVariadicOperandOp(non_variadic=non_variadic, variadic=variadic, loc=loc, ip=ip))
394
+
358
395
// CHECK: @_ods_cext.register_operation(_Dialect)
359
396
// CHECK: class OneVariadicResultOp(_ods_ir.OpView):
360
397
// CHECK-LABEL: OPERATION_NAME = "test.one_variadic_result"
@@ -385,6 +422,9 @@ def OneVariadicResultOp : TestOp<"one_variadic_result"> {
385
422
let results = (outs Variadic<AnyType>:$variadic, AnyType:$non_variadic);
386
423
}
387
424
425
+ // CHECK: def one_variadic_result(variadic, non_variadic, *, loc=None, ip=None)
426
+ // CHECK: return _get_op_result_or_op_results(OneVariadicResultOp(variadic=variadic, non_variadic=non_variadic, loc=loc, ip=ip))
427
+
388
428
// CHECK: @_ods_cext.register_operation(_Dialect)
389
429
// CHECK: class PythonKeywordOp(_ods_ir.OpView):
390
430
// CHECK-LABEL: OPERATION_NAME = "test.python_keyword"
@@ -405,6 +445,10 @@ def PythonKeywordOp : TestOp<"python_keyword"> {
405
445
// CHECK: return self.operation.operands[0]
406
446
let arguments = (ins AnyType:$in);
407
447
}
448
+
449
+ // CHECK: def python_keyword(in_, *, loc=None, ip=None)
450
+ // CHECK: return _get_op_result_or_op_results(PythonKeywordOp(in_=in_, loc=loc, ip=ip))
451
+
408
452
// CHECK-LABEL: OPERATION_NAME = "test.same_results"
409
453
def SameResultsOp : TestOp<"same_results", [SameOperandsAndResultType]> {
410
454
// CHECK: def __init__(self, in1, in2, *, loc=None, ip=None):
@@ -416,13 +460,19 @@ def SameResultsOp : TestOp<"same_results", [SameOperandsAndResultType]> {
416
460
let results = (outs AnyType:$res);
417
461
}
418
462
463
+ // CHECK: def same_results(in1, in2, *, loc=None, ip=None)
464
+ // CHECK: return _get_op_result_or_op_results(SameResultsOp(in1=in1, in2=in2, loc=loc, ip=ip))
465
+
419
466
// CHECK-LABEL: OPERATION_NAME = "test.same_results_variadic"
420
467
def SameResultsVariadicOp : TestOp<"same_results_variadic", [SameOperandsAndResultType]> {
421
468
// CHECK: def __init__(self, res, in1, in2, *, loc=None, ip=None):
422
469
let arguments = (ins AnyType:$in1, AnyType:$in2);
423
470
let results = (outs Variadic<AnyType>:$res);
424
471
}
425
472
473
+ // CHECK: def same_results_variadic(res, in1, in2, *, loc=None, ip=None)
474
+ // CHECK: return _get_op_result_or_op_results(SameResultsVariadicOp(res=res, in1=in1, in2=in2, loc=loc, ip=ip))
475
+
426
476
427
477
// CHECK: @_ods_cext.register_operation(_Dialect)
428
478
// CHECK: class SameVariadicOperandSizeOp(_ods_ir.OpView):
@@ -447,6 +497,9 @@ def SameVariadicOperandSizeOp : TestOp<"same_variadic_operand",
447
497
Variadic<AnyType>:$variadic2);
448
498
}
449
499
500
+ // CHECK: def same_variadic_operand(variadic1, non_variadic, variadic2, *, loc=None, ip=None)
501
+ // CHECK: return _get_op_result_or_op_results(SameVariadicOperandSizeOp(variadic1=variadic1, non_variadic=non_variadic, variadic2=variadic2, loc=loc, ip=ip))
502
+
450
503
// CHECK: @_ods_cext.register_operation(_Dialect)
451
504
// CHECK: class SameVariadicResultSizeOp(_ods_ir.OpView):
452
505
// CHECK-LABEL: OPERATION_NAME = "test.same_variadic_result"
@@ -470,6 +523,9 @@ def SameVariadicResultSizeOp : TestOp<"same_variadic_result",
470
523
Variadic<AnyType>:$variadic2);
471
524
}
472
525
526
+ // CHECK: def same_variadic_result(variadic1, non_variadic, variadic2, *, loc=None, ip=None)
527
+ // CHECK: return _get_op_result_or_op_results(SameVariadicResultSizeOp(variadic1=variadic1, non_variadic=non_variadic, variadic2=variadic2, loc=loc, ip=ip))
528
+
473
529
// CHECK: @_ods_cext.register_operation(_Dialect)
474
530
// CHECK: class SimpleOp(_ods_ir.OpView):
475
531
// CHECK-LABEL: OPERATION_NAME = "test.simple"
@@ -507,6 +563,9 @@ def SimpleOp : TestOp<"simple"> {
507
563
let results = (outs I64:$i64, AnyFloat:$f64);
508
564
}
509
565
566
+ // CHECK: def simple(i64, f64, i32, f32, *, loc=None, ip=None)
567
+ // CHECK: return _get_op_result_or_op_results(SimpleOp(i64=i64, f64=f64, i32=i32, f32=f32, loc=loc, ip=ip))
568
+
510
569
// CHECK: class VariadicAndNormalRegionOp(_ods_ir.OpView):
511
570
// CHECK-LABEL: OPERATION_NAME = "test.variadic_and_normal_region"
512
571
def VariadicAndNormalRegionOp : TestOp<"variadic_and_normal_region"> {
@@ -531,6 +590,9 @@ def VariadicAndNormalRegionOp : TestOp<"variadic_and_normal_region"> {
531
590
// CHECK: return self.regions[2:]
532
591
}
533
592
593
+ // CHECK: def variadic_and_normal_region(num_variadic, *, loc=None, ip=None)
594
+ // CHECK: return _get_op_result_or_op_results(VariadicAndNormalRegionOp(num_variadic=num_variadic, loc=loc, ip=ip))
595
+
534
596
// CHECK: class VariadicRegionOp(_ods_ir.OpView):
535
597
// CHECK-LABEL: OPERATION_NAME = "test.variadic_region"
536
598
def VariadicRegionOp : TestOp<"variadic_region"> {
@@ -551,6 +613,9 @@ def VariadicRegionOp : TestOp<"variadic_region"> {
551
613
// CHECK: return self.regions[0:]
552
614
}
553
615
616
+ // CHECK: def variadic_region(num_variadic, *, loc=None, ip=None)
617
+ // CHECK: return _get_op_result_or_op_results(VariadicRegionOp(num_variadic=num_variadic, loc=loc, ip=ip))
618
+
554
619
// CHECK: @_ods_cext.register_operation(_Dialect)
555
620
// CHECK: class WithSuccessorsOp(_ods_ir.OpView):
556
621
// CHECK-LABEL: OPERATION_NAME = "test.with_successors"
@@ -562,3 +627,6 @@ def WithSuccessorsOp : TestOp<"with_successors"> {
562
627
let successors = (successor AnySuccessor:$successor,
563
628
VariadicSuccessor<AnySuccessor>:$successors);
564
629
}
630
+
631
+ // CHECK: def with_successors(successor, successors, *, loc=None, ip=None)
632
+ // CHECK: return _get_op_result_or_op_results(WithSuccessorsOp(successor=successor, successors=successors, loc=loc, ip=ip))
0 commit comments