Skip to content

Commit 66b0b04

Browse files
authored
[MLIR][NFC] Fix incomplete boundary comments. (llvm#133516)
I observed that we have the boundary comments in the codebase like: ``` //===----------------------------------------------------------------------===// // ... //===----------------------------------------------------------------------===// ``` I also observed that there are incomplete boundary comments. The revision is generated by a script that completes the boundary comments. ``` //===----------------------------------------------------------------------===// // ... ... ``` Signed-off-by: hanhanW <[email protected]>
1 parent c180e24 commit 66b0b04

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+257
-0
lines changed

mlir/include/mlir-c/Rewrite.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ mlirRewriterBaseGetContext(MlirRewriterBase rewriter);
4848

4949
//===----------------------------------------------------------------------===//
5050
/// Insertion points methods
51+
//===----------------------------------------------------------------------===//
5152

5253
// These do not include functions using Block::iterator or Region::iterator, as
5354
// they are not exposed by the C API yet. Similarly for methods using
@@ -101,6 +102,7 @@ mlirRewriterBaseGetBlock(MlirRewriterBase rewriter);
101102

102103
//===----------------------------------------------------------------------===//
103104
/// Block and operation creation/insertion/cloning
105+
//===----------------------------------------------------------------------===//
104106

105107
// These functions do not include the IRMapper, as it is not yet exposed by the
106108
// C API.

mlir/include/mlir/Dialect/LLVMIR/ROCDLOps.td

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ class ROCDL_DimGetterFunctionOp<string mnemonic, string device_function,
145145

146146
//===----------------------------------------------------------------------===//
147147
// Wave-level primitives
148+
//===----------------------------------------------------------------------===//
148149

149150
class ROCDL_MbcntOp<string mnemonic> :
150151
ROCDL_IntrPure1Op<"mbcnt." # mnemonic>,
@@ -205,6 +206,7 @@ def ROCDL_ReadlaneOp : ROCDL_IntrOp<"readlane", [], [0], [AllTypesMatch<["res",
205206

206207
//===----------------------------------------------------------------------===//
207208
// Thread index and Block index
209+
//===----------------------------------------------------------------------===//
208210

209211
def ROCDL_ThreadIdXOp : ROCDL_SpecialIdRegisterOp<"workitem.id.x">;
210212
def ROCDL_ThreadIdYOp : ROCDL_SpecialIdRegisterOp<"workitem.id.y">;
@@ -216,6 +218,7 @@ def ROCDL_BlockIdZOp : ROCDL_SpecialIdRegisterOp<"workgroup.id.z">;
216218

217219
//===----------------------------------------------------------------------===//
218220
// Thread range and Block range
221+
//===----------------------------------------------------------------------===//
219222

220223
def ROCDL_BlockDimXOp : ROCDL_DimGetterFunctionOp<"workgroup.dim.x",
221224
"__ockl_get_local_size", 0>;
@@ -237,6 +240,7 @@ def ROCDL_GridDimZOp : ROCDL_DimGetterFunctionOp<"grid.dim.z",
237240

238241
//===----------------------------------------------------------------------===//
239242
// Synchronization primitives
243+
//===----------------------------------------------------------------------===//
240244

241245
// Emits the waintcnt instruction. The bitfield's semantics depend
242246
// on the target chipset

mlir/include/mlir/Dialect/PDLInterp/IR/PDLInterpOps.td

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ class PDLInterp_Op<string mnemonic, list<Trait> traits = []> :
6060

6161
//===----------------------------------------------------------------------===//
6262
// PDLInterp_PredicateOp
63+
//===----------------------------------------------------------------------===//
6364

6465
// Check operations evaluate a predicate on a positional value and then
6566
// conditionally branch on the result.
@@ -70,6 +71,7 @@ class PDLInterp_PredicateOp<string mnemonic, list<Trait> traits = []> :
7071

7172
//===----------------------------------------------------------------------===//
7273
// PDLInterp_SwitchOp
74+
//===----------------------------------------------------------------------===//
7375

7476
// Switch operations evaluate a predicate on a positional value and then
7577
// conditionally branch on the result.

mlir/include/mlir/IR/AsmState.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ class AsmStateImpl;
8181

8282
//===----------------------------------------------------------------------===//
8383
// Resource Entry
84+
//===----------------------------------------------------------------------===//
8485

8586
class HeapAsmResourceBlob;
8687

@@ -330,6 +331,7 @@ class AsmParsedResourceEntry {
330331

331332
//===----------------------------------------------------------------------===//
332333
// Resource Parser/Printer
334+
//===----------------------------------------------------------------------===//
333335

334336
/// This class represents an instance of a resource parser. This class should be
335337
/// implemented by non-dialect clients that want to inject additional resources

mlir/include/mlir/IR/BuiltinAttributes.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -717,6 +717,7 @@ using DenseResourceElementsHandle = DialectResourceBlobHandle<BuiltinDialect>;
717717
namespace mlir {
718718
//===----------------------------------------------------------------------===//
719719
// DenseArrayAttr
720+
//===----------------------------------------------------------------------===//
720721

721722
namespace detail {
722723
/// Base class for DenseArrayAttr that is instantiated and specialized for each
@@ -772,6 +773,7 @@ using DenseF64ArrayAttr = detail::DenseArrayAttrImpl<double>;
772773

773774
//===----------------------------------------------------------------------===//
774775
// DenseResourceElementsAttr
776+
//===----------------------------------------------------------------------===//
775777

776778
namespace detail {
777779
/// Base class for DenseResourceElementsAttr that is instantiated and

mlir/include/mlir/IR/BuiltinTypes.td

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ class Builtin_CachedFloatType<string name, string mnemonic,
9898

9999
//===----------------------------------------------------------------------===//
100100
// Float8E5M2Type
101+
//===----------------------------------------------------------------------===//
101102

102103
def Builtin_Float8E5M2 : Builtin_FloatType<"Float8E5M2", "f8E5M2"> {
103104
let summary = "8-bit floating point with 2 bit mantissa";
@@ -119,6 +120,7 @@ def Builtin_Float8E5M2 : Builtin_FloatType<"Float8E5M2", "f8E5M2"> {
119120

120121
//===----------------------------------------------------------------------===//
121122
// Float8E4M3Type
123+
//===----------------------------------------------------------------------===//
122124

123125
def Builtin_Float8E4M3 : Builtin_FloatType<"Float8E4M3", "f8E4M3"> {
124126
let summary = "8-bit floating point with 3 bit mantissa";
@@ -138,6 +140,7 @@ def Builtin_Float8E4M3 : Builtin_FloatType<"Float8E4M3", "f8E4M3"> {
138140

139141
//===----------------------------------------------------------------------===//
140142
// Float8E4M3FNType
143+
//===----------------------------------------------------------------------===//
141144

142145
def Builtin_Float8E4M3FN : Builtin_FloatType<"Float8E4M3FN", "f8E4M3FN"> {
143146
let summary = "8-bit floating point with 3 bit mantissa";
@@ -160,6 +163,7 @@ def Builtin_Float8E4M3FN : Builtin_FloatType<"Float8E4M3FN", "f8E4M3FN"> {
160163

161164
//===----------------------------------------------------------------------===//
162165
// Float8E5M2FNUZType
166+
//===----------------------------------------------------------------------===//
163167

164168
def Builtin_Float8E5M2FNUZ : Builtin_FloatType<"Float8E5M2FNUZ", "f8E5M2FNUZ"> {
165169
let summary = "8-bit floating point with 2 bit mantissa";
@@ -182,6 +186,7 @@ def Builtin_Float8E5M2FNUZ : Builtin_FloatType<"Float8E5M2FNUZ", "f8E5M2FNUZ"> {
182186

183187
//===----------------------------------------------------------------------===//
184188
// Float8E4M3FNUZType
189+
//===----------------------------------------------------------------------===//
185190

186191
def Builtin_Float8E4M3FNUZ : Builtin_FloatType<"Float8E4M3FNUZ", "f8E4M3FNUZ"> {
187192
let summary = "8-bit floating point with 3 bit mantissa";
@@ -204,6 +209,7 @@ def Builtin_Float8E4M3FNUZ : Builtin_FloatType<"Float8E4M3FNUZ", "f8E4M3FNUZ"> {
204209

205210
//===----------------------------------------------------------------------===//
206211
// Float8E4M3B11FNUZType
212+
//===----------------------------------------------------------------------===//
207213

208214
def Builtin_Float8E4M3B11FNUZ : Builtin_FloatType<"Float8E4M3B11FNUZ", "f8E4M3B11FNUZ"> {
209215
let summary = "8-bit floating point with 3 bit mantissa";
@@ -226,6 +232,7 @@ def Builtin_Float8E4M3B11FNUZ : Builtin_FloatType<"Float8E4M3B11FNUZ", "f8E4M3B1
226232

227233
//===----------------------------------------------------------------------===//
228234
// Float8E3M4Type
235+
//===----------------------------------------------------------------------===//
229236

230237
def Builtin_Float8E3M4 : Builtin_FloatType<"Float8E3M4", "f8E3M4"> {
231238
let summary = "8-bit floating point with 3 bits exponent and 4 bit mantissa";
@@ -245,6 +252,7 @@ def Builtin_Float8E3M4 : Builtin_FloatType<"Float8E3M4", "f8E3M4"> {
245252

246253
//===----------------------------------------------------------------------===//
247254
// Float4E2M1FNType
255+
//===----------------------------------------------------------------------===//
248256

249257
def Builtin_Float4E2M1FN : Builtin_FloatType<"Float4E2M1FN", "f4E2M1FN"> {
250258
let summary = "4-bit floating point with 2-bit exponent and 1-bit mantissa";
@@ -266,6 +274,7 @@ def Builtin_Float4E2M1FN : Builtin_FloatType<"Float4E2M1FN", "f4E2M1FN"> {
266274

267275
//===----------------------------------------------------------------------===//
268276
// Float6E2M3FNType
277+
//===----------------------------------------------------------------------===//
269278

270279
def Builtin_Float6E2M3FN : Builtin_FloatType<"Float6E2M3FN", "f6E2M3FN"> {
271280
let summary = "6-bit floating point with 2-bit exponent and 3-bit mantissa";
@@ -287,6 +296,7 @@ def Builtin_Float6E2M3FN : Builtin_FloatType<"Float6E2M3FN", "f6E2M3FN"> {
287296

288297
//===----------------------------------------------------------------------===//
289298
// Float6E3M2FNType
299+
//===----------------------------------------------------------------------===//
290300

291301
def Builtin_Float6E3M2FN : Builtin_FloatType<"Float6E3M2FN", "f6E3M2FN"> {
292302
let summary = "6-bit floating point with 3-bit exponent and 2-bit mantissa";
@@ -308,6 +318,7 @@ def Builtin_Float6E3M2FN : Builtin_FloatType<"Float6E3M2FN", "f6E3M2FN"> {
308318

309319
//===----------------------------------------------------------------------===//
310320
// Float8E8M0FNUType
321+
//===----------------------------------------------------------------------===//
311322

312323
def Builtin_Float8E8M0FNU : Builtin_FloatType<"Float8E8M0FNU", "f8E8M0FNU"> {
313324
let summary = "8-bit floating point with 8-bit exponent, no mantissa or sign";
@@ -331,6 +342,7 @@ def Builtin_Float8E8M0FNU : Builtin_FloatType<"Float8E8M0FNU", "f8E8M0FNU"> {
331342

332343
//===----------------------------------------------------------------------===//
333344
// BFloat16Type
345+
//===----------------------------------------------------------------------===//
334346

335347
def Builtin_BFloat16 : Builtin_CachedFloatType<"BFloat16", "bf16",
336348
/*declaredInterfaceMethods=*/["scaleElementBitwidth"]> {
@@ -339,6 +351,7 @@ def Builtin_BFloat16 : Builtin_CachedFloatType<"BFloat16", "bf16",
339351

340352
//===----------------------------------------------------------------------===//
341353
// Float16Type
354+
//===----------------------------------------------------------------------===//
342355

343356
def Builtin_Float16 : Builtin_CachedFloatType<"Float16", "f16",
344357
/*declaredInterfaceMethods=*/["scaleElementBitwidth"]> {
@@ -347,13 +360,15 @@ def Builtin_Float16 : Builtin_CachedFloatType<"Float16", "f16",
347360

348361
//===----------------------------------------------------------------------===//
349362
// FloatTF32Type
363+
//===----------------------------------------------------------------------===//
350364

351365
def Builtin_FloatTF32 : Builtin_CachedFloatType<"FloatTF32", "tf32"> {
352366
let summary = "TF32 floating-point type";
353367
}
354368

355369
//===----------------------------------------------------------------------===//
356370
// Float32Type
371+
//===----------------------------------------------------------------------===//
357372

358373
def Builtin_Float32 : Builtin_CachedFloatType<"Float32", "f32",
359374
/*declaredInterfaceMethods=*/["scaleElementBitwidth"]> {
@@ -362,20 +377,23 @@ def Builtin_Float32 : Builtin_CachedFloatType<"Float32", "f32",
362377

363378
//===----------------------------------------------------------------------===//
364379
// Float64Type
380+
//===----------------------------------------------------------------------===//
365381

366382
def Builtin_Float64 : Builtin_CachedFloatType<"Float64", "f64"> {
367383
let summary = "64-bit floating-point type";
368384
}
369385

370386
//===----------------------------------------------------------------------===//
371387
// Float80Type
388+
//===----------------------------------------------------------------------===//
372389

373390
def Builtin_Float80 : Builtin_CachedFloatType<"Float80", "f80"> {
374391
let summary = "80-bit floating-point type";
375392
}
376393

377394
//===----------------------------------------------------------------------===//
378395
// Float128Type
396+
//===----------------------------------------------------------------------===//
379397

380398
def Builtin_Float128 : Builtin_CachedFloatType<"Float128", "f128"> {
381399
let summary = "128-bit floating-point type";

mlir/include/mlir/IR/CommonAttrConstraints.td

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ include "mlir/IR/DialectBase.td"
2323

2424
//===----------------------------------------------------------------------===//
2525
// Base attribute definition
26+
//===----------------------------------------------------------------------===//
2627

2728
// Base class for all attributes.
2829
class Attr<Pred condition, string summary = ""> :
@@ -91,6 +92,7 @@ class DialectAttr<Dialect d, Pred condition, string summary = ""> :
9192

9293
//===----------------------------------------------------------------------===//
9394
// Attribute modifier definition
95+
//===----------------------------------------------------------------------===//
9496

9597
// Decorates an attribute to have an (unvalidated) default value if not present.
9698
class DefaultValuedAttr<Attr attr, string val> :
@@ -150,6 +152,7 @@ class DefaultValuedOptionalStrAttr<Attr attr, string val>
150152

151153
//===----------------------------------------------------------------------===//
152154
// Primitive attribute kinds
155+
//===----------------------------------------------------------------------===//
153156

154157
// A generic attribute that must be constructed around a specific buildable type
155158
// `attrValType`. Backed by MLIR attribute kind `attrKind`.
@@ -395,6 +398,7 @@ def UnitAttr : Attr<CPred<"::llvm::isa<::mlir::UnitAttr>($_self)">, "unit attrib
395398

396399
//===----------------------------------------------------------------------===//
397400
// Composite attribute kinds
401+
//===----------------------------------------------------------------------===//
398402

399403
class DictionaryAttrBase<Pred condition, string summary> :
400404
Attr<condition, summary> {
@@ -681,6 +685,7 @@ def FlatSymbolRefArrayAttr :
681685

682686
//===----------------------------------------------------------------------===//
683687
// Derive attribute kinds
688+
//===----------------------------------------------------------------------===//
684689

685690
// DerivedAttr are attributes whose value is computed from properties
686691
// of the operation. They do not require additional storage and are
@@ -714,6 +719,7 @@ class DerivedTypeAttr<code body> : DerivedAttr<"::mlir::Type", body> {
714719

715720
//===----------------------------------------------------------------------===//
716721
// Constant attribute kinds
722+
//===----------------------------------------------------------------------===//
717723

718724
// Represents a constant attribute of specific Attr type. A constant
719725
// attribute can be specified only of attributes that have a constant

mlir/include/mlir/IR/CommonTypeConstraints.td

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,7 @@ def AnyShaped: ShapedContainerType<[AnyType], IsShapedTypePred, "shaped",
679679

680680
//===----------------------------------------------------------------------===//
681681
// Tensor types.
682+
//===----------------------------------------------------------------------===//
682683

683684
// Unranked tensor type whose element type is from the given `allowedTypes`
684685
// list, and which additionally satisfies an optional list of predicates.
@@ -755,6 +756,7 @@ def AnyStaticShapeTensor : StaticShapeTensorOf<[AnyType]>;
755756

756757
//===----------------------------------------------------------------------===//
757758
// Memref type.
759+
//===----------------------------------------------------------------------===//
758760

759761
// Any unranked memref whose element type is from the given `allowedTypes` list.
760762
class UnrankedMemRefOf<list<Type> allowedTypes> :

mlir/include/mlir/IR/EnumAttr.td

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ include "mlir/IR/AttrTypeBase.td"
1313

1414
//===----------------------------------------------------------------------===//
1515
// Enum attribute kinds
16+
//===----------------------------------------------------------------------===//
1617

1718
// Additional information for an enum case.
1819
class EnumCase<string sym, int intVal, string strVal, int widthVal> {

mlir/include/mlir/IR/OpDefinition.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,7 @@ class TraitBase {
385385

386386
//===----------------------------------------------------------------------===//
387387
// Operand Traits
388+
//===----------------------------------------------------------------------===//
388389

389390
namespace detail {
390391
/// Utility trait base that provides accessors for derived traits that have
@@ -514,6 +515,7 @@ class VariadicOperands
514515

515516
//===----------------------------------------------------------------------===//
516517
// Region Traits
518+
//===----------------------------------------------------------------------===//
517519

518520
/// This class provides verification for ops that are known to have zero
519521
/// regions.
@@ -606,6 +608,7 @@ class VariadicRegions
606608

607609
//===----------------------------------------------------------------------===//
608610
// Result Traits
611+
//===----------------------------------------------------------------------===//
609612

610613
/// This class provides return value APIs for ops that are known to have
611614
/// zero results.
@@ -757,6 +760,7 @@ class VariadicResults
757760

758761
//===----------------------------------------------------------------------===//
759762
// Terminator Traits
763+
//===----------------------------------------------------------------------===//
760764

761765
/// This class indicates that the regions associated with this op don't have
762766
/// terminators.
@@ -868,6 +872,7 @@ class VariadicSuccessors
868872

869873
//===----------------------------------------------------------------------===//
870874
// SingleBlock
875+
//===----------------------------------------------------------------------===//
871876

872877
/// This class provides APIs and verifiers for ops with regions having a single
873878
/// block.
@@ -949,6 +954,7 @@ struct SingleBlock : public TraitBase<ConcreteType, SingleBlock> {
949954

950955
//===----------------------------------------------------------------------===//
951956
// SingleBlockImplicitTerminator
957+
//===----------------------------------------------------------------------===//
952958

953959
/// This class provides APIs and verifiers for ops with regions having a single
954960
/// block that must terminate with `TerminatorOpType`.
@@ -1034,6 +1040,7 @@ struct hasSingleBlockImplicitTerminator<Op, false> {
10341040

10351041
//===----------------------------------------------------------------------===//
10361042
// Misc Traits
1043+
//===----------------------------------------------------------------------===//
10371044

10381045
/// This class provides verification for ops that are known to have the same
10391046
/// operand shape: all operands are scalars, vectors/tensors of the same
@@ -1514,6 +1521,7 @@ bool hasElementwiseMappableTraits(Operation *op);
15141521
namespace op_definition_impl {
15151522
//===----------------------------------------------------------------------===//
15161523
// Trait Existence
1524+
//===----------------------------------------------------------------------===//
15171525

15181526
/// Returns true if this given Trait ID matches the IDs of any of the provided
15191527
/// trait types `Traits`.
@@ -1532,6 +1540,7 @@ inline bool hasTrait<>(TypeID traitID) {
15321540

15331541
//===----------------------------------------------------------------------===//
15341542
// Trait Folding
1543+
//===----------------------------------------------------------------------===//
15351544

15361545
/// Trait to check if T provides a 'foldTrait' method for single result
15371546
/// operations.
@@ -1604,6 +1613,7 @@ static LogicalResult foldTraits(Operation *op, ArrayRef<Attribute> operands,
16041613

16051614
//===----------------------------------------------------------------------===//
16061615
// Trait Verification
1616+
//===----------------------------------------------------------------------===//
16071617

16081618
/// Trait to check if T provides a `verifyTrait` method.
16091619
template <typename T, typename... Args>

0 commit comments

Comments
 (0)