@@ -369,24 +369,21 @@ def UnspecializedEncodingAttr :
369369 ]>
370370 ]> {
371371 let mnemonic = "unspecialized_encoding";
372+ let assemblyFormat = "`<` $seed `>`";
372373
373374 let summary = "An attribute that indicates the encoding is not yet specialized";
374375
375376 let description = [{
376377 This attribute indicates this is an unspecialized encoding. It implements
377- very basic interface methods of EncodingLayoutResolverAttrInterface that converts
378- it to the SpecializeEncodingAttr during encoding specialization. It is
379- mainly for testing purpose as some transformations do not depend on actual
380- dialects that implement the attribute interface.
381- }];
378+ very basic interface methods of EncodingLayoutResolverAttrInterface that
379+ converts it to the SpecializeEncodingAttr during encoding specialization.
380+ It is mainly for testing purpose as some transformations do not depend on
381+ actual dialects that implement the attribute interface.
382382
383- let parameters = (ins
384- AttrParameter<"IntegerAttr", "The seed that attached on the attribute. "
385- "Different seed values indicate different layouts.">:$seed
386- );
383+ Different seed values indicate different layouts.
384+ }];
387385
388- let hasCustomAssemblyFormat = 1;
389- let genVerifyDecl = 0;
386+ let parameters = (ins "int32_t":$seed);
390387}
391388
392389def SpecializedEncodingAttr :
@@ -397,6 +394,7 @@ def SpecializedEncodingAttr :
397394 IREEEncoding_SerializableEncodingAttrInterface
398395 ]> {
399396 let mnemonic = "specialized_encoding";
397+ let assemblyFormat = "`<` $seed (`,` $type^)? `>`";
400398
401399 let summary = "An attribute that indicates the encoding is specialized";
402400
@@ -405,16 +403,14 @@ def SpecializedEncodingAttr :
405403 type. The attribute denotes the layout of the type. Different seed values
406404 indicate different layouts, which can be used to emulate different encoding
407405 attributes.
406+
407+ Different seed values indicate different layouts.
408408 }];
409409
410410 let parameters = (ins
411- AttrParameter<"IntegerAttr", "The seed that attached on the attribute. "
412- "Different seed values indicate different layouts.">:$seed,
413- AttrParameter<"TypeAttr", "">:$type
411+ "int32_t":$seed,
412+ OptionalParameter<"TypeAttr", "">:$type
414413 );
415-
416- let hasCustomAssemblyFormat = 1;
417- let genVerifyDecl = 0;
418414}
419415
420416#endif // IREE_DIALECT_ENCODING_ATTRS
0 commit comments