diff --git a/mlir/include/mlir-c/Rewrite.h b/mlir/include/mlir-c/Rewrite.h index d8f2275b61532..61d3446317550 100644 --- a/mlir/include/mlir-c/Rewrite.h +++ b/mlir/include/mlir-c/Rewrite.h @@ -48,6 +48,7 @@ mlirRewriterBaseGetContext(MlirRewriterBase rewriter); //===----------------------------------------------------------------------===// /// Insertion points methods +//===----------------------------------------------------------------------===// // These do not include functions using Block::iterator or Region::iterator, as // they are not exposed by the C API yet. Similarly for methods using @@ -101,6 +102,7 @@ mlirRewriterBaseGetBlock(MlirRewriterBase rewriter); //===----------------------------------------------------------------------===// /// Block and operation creation/insertion/cloning +//===----------------------------------------------------------------------===// // These functions do not include the IRMapper, as it is not yet exposed by the // C API. diff --git a/mlir/include/mlir/Dialect/LLVMIR/ROCDLOps.td b/mlir/include/mlir/Dialect/LLVMIR/ROCDLOps.td index 18177b9e24f7d..8945466f5ef5b 100644 --- a/mlir/include/mlir/Dialect/LLVMIR/ROCDLOps.td +++ b/mlir/include/mlir/Dialect/LLVMIR/ROCDLOps.td @@ -145,6 +145,7 @@ class ROCDL_DimGetterFunctionOp : ROCDL_IntrPure1Op<"mbcnt." # mnemonic>, @@ -205,6 +206,7 @@ def ROCDL_ReadlaneOp : ROCDL_IntrOp<"readlane", [], [0], [AllTypesMatch<["res", //===----------------------------------------------------------------------===// // Thread index and Block index +//===----------------------------------------------------------------------===// def ROCDL_ThreadIdXOp : ROCDL_SpecialIdRegisterOp<"workitem.id.x">; def ROCDL_ThreadIdYOp : ROCDL_SpecialIdRegisterOp<"workitem.id.y">; @@ -216,6 +218,7 @@ def ROCDL_BlockIdZOp : ROCDL_SpecialIdRegisterOp<"workgroup.id.z">; //===----------------------------------------------------------------------===// // Thread range and Block range +//===----------------------------------------------------------------------===// def ROCDL_BlockDimXOp : ROCDL_DimGetterFunctionOp<"workgroup.dim.x", "__ockl_get_local_size", 0>; @@ -237,6 +240,7 @@ def ROCDL_GridDimZOp : ROCDL_DimGetterFunctionOp<"grid.dim.z", //===----------------------------------------------------------------------===// // Synchronization primitives +//===----------------------------------------------------------------------===// // Emits the waintcnt instruction. The bitfield's semantics depend // on the target chipset diff --git a/mlir/include/mlir/Dialect/PDLInterp/IR/PDLInterpOps.td b/mlir/include/mlir/Dialect/PDLInterp/IR/PDLInterpOps.td index 901acc0e6733b..b8ad86b62e827 100644 --- a/mlir/include/mlir/Dialect/PDLInterp/IR/PDLInterpOps.td +++ b/mlir/include/mlir/Dialect/PDLInterp/IR/PDLInterpOps.td @@ -60,6 +60,7 @@ class PDLInterp_Op traits = []> : //===----------------------------------------------------------------------===// // PDLInterp_PredicateOp +//===----------------------------------------------------------------------===// // Check operations evaluate a predicate on a positional value and then // conditionally branch on the result. @@ -70,6 +71,7 @@ class PDLInterp_PredicateOp traits = []> : //===----------------------------------------------------------------------===// // PDLInterp_SwitchOp +//===----------------------------------------------------------------------===// // Switch operations evaluate a predicate on a positional value and then // conditionally branch on the result. diff --git a/mlir/include/mlir/IR/AsmState.h b/mlir/include/mlir/IR/AsmState.h index edbd3bb6fc15d..5e9311742bd94 100644 --- a/mlir/include/mlir/IR/AsmState.h +++ b/mlir/include/mlir/IR/AsmState.h @@ -81,6 +81,7 @@ class AsmStateImpl; //===----------------------------------------------------------------------===// // Resource Entry +//===----------------------------------------------------------------------===// class HeapAsmResourceBlob; @@ -330,6 +331,7 @@ class AsmParsedResourceEntry { //===----------------------------------------------------------------------===// // Resource Parser/Printer +//===----------------------------------------------------------------------===// /// This class represents an instance of a resource parser. This class should be /// implemented by non-dialect clients that want to inject additional resources diff --git a/mlir/include/mlir/IR/BuiltinAttributes.h b/mlir/include/mlir/IR/BuiltinAttributes.h index 901df3a25a46f..67fab7ebc13ba 100644 --- a/mlir/include/mlir/IR/BuiltinAttributes.h +++ b/mlir/include/mlir/IR/BuiltinAttributes.h @@ -717,6 +717,7 @@ using DenseResourceElementsHandle = DialectResourceBlobHandle; namespace mlir { //===----------------------------------------------------------------------===// // DenseArrayAttr +//===----------------------------------------------------------------------===// namespace detail { /// Base class for DenseArrayAttr that is instantiated and specialized for each @@ -772,6 +773,7 @@ using DenseF64ArrayAttr = detail::DenseArrayAttrImpl; //===----------------------------------------------------------------------===// // DenseResourceElementsAttr +//===----------------------------------------------------------------------===// namespace detail { /// Base class for DenseResourceElementsAttr that is instantiated and diff --git a/mlir/include/mlir/IR/BuiltinTypes.td b/mlir/include/mlir/IR/BuiltinTypes.td index af474b3e3ec47..bcd76d928cf83 100644 --- a/mlir/include/mlir/IR/BuiltinTypes.td +++ b/mlir/include/mlir/IR/BuiltinTypes.td @@ -98,6 +98,7 @@ class Builtin_CachedFloatType { let summary = "8-bit floating point with 2 bit mantissa"; @@ -119,6 +120,7 @@ def Builtin_Float8E5M2 : Builtin_FloatType<"Float8E5M2", "f8E5M2"> { //===----------------------------------------------------------------------===// // Float8E4M3Type +//===----------------------------------------------------------------------===// def Builtin_Float8E4M3 : Builtin_FloatType<"Float8E4M3", "f8E4M3"> { let summary = "8-bit floating point with 3 bit mantissa"; @@ -138,6 +140,7 @@ def Builtin_Float8E4M3 : Builtin_FloatType<"Float8E4M3", "f8E4M3"> { //===----------------------------------------------------------------------===// // Float8E4M3FNType +//===----------------------------------------------------------------------===// def Builtin_Float8E4M3FN : Builtin_FloatType<"Float8E4M3FN", "f8E4M3FN"> { let summary = "8-bit floating point with 3 bit mantissa"; @@ -160,6 +163,7 @@ def Builtin_Float8E4M3FN : Builtin_FloatType<"Float8E4M3FN", "f8E4M3FN"> { //===----------------------------------------------------------------------===// // Float8E5M2FNUZType +//===----------------------------------------------------------------------===// def Builtin_Float8E5M2FNUZ : Builtin_FloatType<"Float8E5M2FNUZ", "f8E5M2FNUZ"> { let summary = "8-bit floating point with 2 bit mantissa"; @@ -182,6 +186,7 @@ def Builtin_Float8E5M2FNUZ : Builtin_FloatType<"Float8E5M2FNUZ", "f8E5M2FNUZ"> { //===----------------------------------------------------------------------===// // Float8E4M3FNUZType +//===----------------------------------------------------------------------===// def Builtin_Float8E4M3FNUZ : Builtin_FloatType<"Float8E4M3FNUZ", "f8E4M3FNUZ"> { let summary = "8-bit floating point with 3 bit mantissa"; @@ -204,6 +209,7 @@ def Builtin_Float8E4M3FNUZ : Builtin_FloatType<"Float8E4M3FNUZ", "f8E4M3FNUZ"> { //===----------------------------------------------------------------------===// // Float8E4M3B11FNUZType +//===----------------------------------------------------------------------===// def Builtin_Float8E4M3B11FNUZ : Builtin_FloatType<"Float8E4M3B11FNUZ", "f8E4M3B11FNUZ"> { let summary = "8-bit floating point with 3 bit mantissa"; @@ -226,6 +232,7 @@ def Builtin_Float8E4M3B11FNUZ : Builtin_FloatType<"Float8E4M3B11FNUZ", "f8E4M3B1 //===----------------------------------------------------------------------===// // Float8E3M4Type +//===----------------------------------------------------------------------===// def Builtin_Float8E3M4 : Builtin_FloatType<"Float8E3M4", "f8E3M4"> { 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"> { //===----------------------------------------------------------------------===// // Float4E2M1FNType +//===----------------------------------------------------------------------===// def Builtin_Float4E2M1FN : Builtin_FloatType<"Float4E2M1FN", "f4E2M1FN"> { 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"> { //===----------------------------------------------------------------------===// // Float6E2M3FNType +//===----------------------------------------------------------------------===// def Builtin_Float6E2M3FN : Builtin_FloatType<"Float6E2M3FN", "f6E2M3FN"> { 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"> { //===----------------------------------------------------------------------===// // Float6E3M2FNType +//===----------------------------------------------------------------------===// def Builtin_Float6E3M2FN : Builtin_FloatType<"Float6E3M2FN", "f6E3M2FN"> { 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"> { //===----------------------------------------------------------------------===// // Float8E8M0FNUType +//===----------------------------------------------------------------------===// def Builtin_Float8E8M0FNU : Builtin_FloatType<"Float8E8M0FNU", "f8E8M0FNU"> { 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"> { //===----------------------------------------------------------------------===// // BFloat16Type +//===----------------------------------------------------------------------===// def Builtin_BFloat16 : Builtin_CachedFloatType<"BFloat16", "bf16", /*declaredInterfaceMethods=*/["scaleElementBitwidth"]> { @@ -339,6 +351,7 @@ def Builtin_BFloat16 : Builtin_CachedFloatType<"BFloat16", "bf16", //===----------------------------------------------------------------------===// // Float16Type +//===----------------------------------------------------------------------===// def Builtin_Float16 : Builtin_CachedFloatType<"Float16", "f16", /*declaredInterfaceMethods=*/["scaleElementBitwidth"]> { @@ -347,6 +360,7 @@ def Builtin_Float16 : Builtin_CachedFloatType<"Float16", "f16", //===----------------------------------------------------------------------===// // FloatTF32Type +//===----------------------------------------------------------------------===// def Builtin_FloatTF32 : Builtin_CachedFloatType<"FloatTF32", "tf32"> { let summary = "TF32 floating-point type"; @@ -354,6 +368,7 @@ def Builtin_FloatTF32 : Builtin_CachedFloatType<"FloatTF32", "tf32"> { //===----------------------------------------------------------------------===// // Float32Type +//===----------------------------------------------------------------------===// def Builtin_Float32 : Builtin_CachedFloatType<"Float32", "f32", /*declaredInterfaceMethods=*/["scaleElementBitwidth"]> { @@ -362,6 +377,7 @@ def Builtin_Float32 : Builtin_CachedFloatType<"Float32", "f32", //===----------------------------------------------------------------------===// // Float64Type +//===----------------------------------------------------------------------===// def Builtin_Float64 : Builtin_CachedFloatType<"Float64", "f64"> { let summary = "64-bit floating-point type"; @@ -369,6 +385,7 @@ def Builtin_Float64 : Builtin_CachedFloatType<"Float64", "f64"> { //===----------------------------------------------------------------------===// // Float80Type +//===----------------------------------------------------------------------===// def Builtin_Float80 : Builtin_CachedFloatType<"Float80", "f80"> { let summary = "80-bit floating-point type"; @@ -376,6 +393,7 @@ def Builtin_Float80 : Builtin_CachedFloatType<"Float80", "f80"> { //===----------------------------------------------------------------------===// // Float128Type +//===----------------------------------------------------------------------===// def Builtin_Float128 : Builtin_CachedFloatType<"Float128", "f128"> { let summary = "128-bit floating-point type"; diff --git a/mlir/include/mlir/IR/CommonAttrConstraints.td b/mlir/include/mlir/IR/CommonAttrConstraints.td index 2beb1e8110afe..e91a13fea5c7f 100644 --- a/mlir/include/mlir/IR/CommonAttrConstraints.td +++ b/mlir/include/mlir/IR/CommonAttrConstraints.td @@ -23,6 +23,7 @@ include "mlir/IR/DialectBase.td" //===----------------------------------------------------------------------===// // Base attribute definition +//===----------------------------------------------------------------------===// // Base class for all attributes. class Attr : @@ -91,6 +92,7 @@ class DialectAttr : //===----------------------------------------------------------------------===// // Attribute modifier definition +//===----------------------------------------------------------------------===// // Decorates an attribute to have an (unvalidated) default value if not present. class DefaultValuedAttr : @@ -150,6 +152,7 @@ class DefaultValuedOptionalStrAttr //===----------------------------------------------------------------------===// // Primitive attribute kinds +//===----------------------------------------------------------------------===// // A generic attribute that must be constructed around a specific buildable type // `attrValType`. Backed by MLIR attribute kind `attrKind`. @@ -395,6 +398,7 @@ def UnitAttr : Attr($_self)">, "unit attrib //===----------------------------------------------------------------------===// // Composite attribute kinds +//===----------------------------------------------------------------------===// class DictionaryAttrBase : Attr { @@ -681,6 +685,7 @@ def FlatSymbolRefArrayAttr : //===----------------------------------------------------------------------===// // Derive attribute kinds +//===----------------------------------------------------------------------===// // DerivedAttr are attributes whose value is computed from properties // of the operation. They do not require additional storage and are @@ -714,6 +719,7 @@ class DerivedTypeAttr : DerivedAttr<"::mlir::Type", body> { //===----------------------------------------------------------------------===// // Constant attribute kinds +//===----------------------------------------------------------------------===// // Represents a constant attribute of specific Attr type. A constant // attribute can be specified only of attributes that have a constant diff --git a/mlir/include/mlir/IR/CommonTypeConstraints.td b/mlir/include/mlir/IR/CommonTypeConstraints.td index 601517717978e..e6f17ded4628b 100644 --- a/mlir/include/mlir/IR/CommonTypeConstraints.td +++ b/mlir/include/mlir/IR/CommonTypeConstraints.td @@ -679,6 +679,7 @@ def AnyShaped: ShapedContainerType<[AnyType], IsShapedTypePred, "shaped", //===----------------------------------------------------------------------===// // Tensor types. +//===----------------------------------------------------------------------===// // Unranked tensor type whose element type is from the given `allowedTypes` // list, and which additionally satisfies an optional list of predicates. @@ -755,6 +756,7 @@ def AnyStaticShapeTensor : StaticShapeTensorOf<[AnyType]>; //===----------------------------------------------------------------------===// // Memref type. +//===----------------------------------------------------------------------===// // Any unranked memref whose element type is from the given `allowedTypes` list. class UnrankedMemRefOf allowedTypes> : diff --git a/mlir/include/mlir/IR/EnumAttr.td b/mlir/include/mlir/IR/EnumAttr.td index e5406546b1950..931126a155fbb 100644 --- a/mlir/include/mlir/IR/EnumAttr.td +++ b/mlir/include/mlir/IR/EnumAttr.td @@ -13,6 +13,7 @@ include "mlir/IR/AttrTypeBase.td" //===----------------------------------------------------------------------===// // Enum attribute kinds +//===----------------------------------------------------------------------===// // Additional information for an enum case. class EnumCase { diff --git a/mlir/include/mlir/IR/OpDefinition.h b/mlir/include/mlir/IR/OpDefinition.h index 4fad61580b31a..237d48756c749 100644 --- a/mlir/include/mlir/IR/OpDefinition.h +++ b/mlir/include/mlir/IR/OpDefinition.h @@ -385,6 +385,7 @@ class TraitBase { //===----------------------------------------------------------------------===// // Operand Traits +//===----------------------------------------------------------------------===// namespace detail { /// Utility trait base that provides accessors for derived traits that have @@ -514,6 +515,7 @@ class VariadicOperands //===----------------------------------------------------------------------===// // Region Traits +//===----------------------------------------------------------------------===// /// This class provides verification for ops that are known to have zero /// regions. @@ -606,6 +608,7 @@ class VariadicRegions //===----------------------------------------------------------------------===// // Result Traits +//===----------------------------------------------------------------------===// /// This class provides return value APIs for ops that are known to have /// zero results. @@ -757,6 +760,7 @@ class VariadicResults //===----------------------------------------------------------------------===// // Terminator Traits +//===----------------------------------------------------------------------===// /// This class indicates that the regions associated with this op don't have /// terminators. @@ -868,6 +872,7 @@ class VariadicSuccessors //===----------------------------------------------------------------------===// // SingleBlock +//===----------------------------------------------------------------------===// /// This class provides APIs and verifiers for ops with regions having a single /// block. @@ -949,6 +954,7 @@ struct SingleBlock : public TraitBase { //===----------------------------------------------------------------------===// // SingleBlockImplicitTerminator +//===----------------------------------------------------------------------===// /// This class provides APIs and verifiers for ops with regions having a single /// block that must terminate with `TerminatorOpType`. @@ -1034,6 +1040,7 @@ struct hasSingleBlockImplicitTerminator { //===----------------------------------------------------------------------===// // Misc Traits +//===----------------------------------------------------------------------===// /// This class provides verification for ops that are known to have the same /// operand shape: all operands are scalars, vectors/tensors of the same @@ -1514,6 +1521,7 @@ bool hasElementwiseMappableTraits(Operation *op); namespace op_definition_impl { //===----------------------------------------------------------------------===// // Trait Existence +//===----------------------------------------------------------------------===// /// Returns true if this given Trait ID matches the IDs of any of the provided /// trait types `Traits`. @@ -1532,6 +1540,7 @@ inline bool hasTrait<>(TypeID traitID) { //===----------------------------------------------------------------------===// // Trait Folding +//===----------------------------------------------------------------------===// /// Trait to check if T provides a 'foldTrait' method for single result /// operations. @@ -1604,6 +1613,7 @@ static LogicalResult foldTraits(Operation *op, ArrayRef operands, //===----------------------------------------------------------------------===// // Trait Verification +//===----------------------------------------------------------------------===// /// Trait to check if T provides a `verifyTrait` method. template diff --git a/mlir/include/mlir/IR/Properties.td b/mlir/include/mlir/IR/Properties.td index 212b85876c8df..8bd8343790402 100644 --- a/mlir/include/mlir/IR/Properties.td +++ b/mlir/include/mlir/IR/Properties.td @@ -210,6 +210,7 @@ defvar writeMlirBytecodeWithConvertToAttribute = [{ //===----------------------------------------------------------------------===// // Primitive property kinds +//===----------------------------------------------------------------------===// // Any kind of integer stored as properties. class IntProp : @@ -360,6 +361,7 @@ def UnitProperty : _cls_UnitProp, Deprecated<"moved to shorter name UnitProp">; //===----------------------------------------------------------------------===// // Property field overwrites +//===----------------------------------------------------------------------===// /// Class for giving a property a default value. /// This doesn't change anything about the property other than giving it a default @@ -419,6 +421,7 @@ class ConfinedProperty //===----------------------------------------------------------------------===// // Primitive property combinators +//===----------------------------------------------------------------------===// /// Create a variable named `name` of `prop`'s storage type that is initialized /// to the correct default value, if there is one. diff --git a/mlir/include/mlir/IR/TypeRange.h b/mlir/include/mlir/IR/TypeRange.h index 9c2fbb3884188..3fb58d78617c0 100644 --- a/mlir/include/mlir/IR/TypeRange.h +++ b/mlir/include/mlir/IR/TypeRange.h @@ -23,6 +23,7 @@ namespace mlir { //===----------------------------------------------------------------------===// // TypeRange +//===----------------------------------------------------------------------===// /// This class provides an abstraction over the various different ranges of /// value types. In many cases, this prevents the need to explicitly materialize @@ -82,6 +83,7 @@ inline raw_ostream &operator<<(raw_ostream &os, const TypeRange &types) { //===----------------------------------------------------------------------===// // TypeRangeRange +//===----------------------------------------------------------------------===// using TypeRangeRangeIterator = llvm::mapped_iterator::iterator, @@ -111,6 +113,7 @@ class TypeRangeRange : public llvm::iterator_range { //===----------------------------------------------------------------------===// // ValueTypeRange +//===----------------------------------------------------------------------===// /// This class implements iteration on the types of a given range of values. template diff --git a/mlir/include/mlir/IR/ValueRange.h b/mlir/include/mlir/IR/ValueRange.h index a807b77ad077f..0c33e2b596b98 100644 --- a/mlir/include/mlir/IR/ValueRange.h +++ b/mlir/include/mlir/IR/ValueRange.h @@ -36,6 +36,7 @@ class MutableOperandRangeRange; //===----------------------------------------------------------------------===// // OperandRange +//===----------------------------------------------------------------------===// /// This class implements the operand iterators for the Operation class. class OperandRange final : public llvm::detail::indexed_accessor_range_base< @@ -73,6 +74,7 @@ class OperandRange final : public llvm::detail::indexed_accessor_range_base< //===----------------------------------------------------------------------===// // OperandRangeRange +//===----------------------------------------------------------------------===// /// This class represents a contiguous range of operand ranges, e.g. from a /// VariadicOfVariadic operand group. @@ -109,6 +111,7 @@ class OperandRangeRange final //===----------------------------------------------------------------------===// // MutableOperandRange +//===----------------------------------------------------------------------===// /// This class provides a mutable adaptor for a range of operands. It allows for /// setting, inserting, and erasing operands from the given range. @@ -196,6 +199,7 @@ class MutableOperandRange { //===----------------------------------------------------------------------===// // MutableOperandRangeRange +//===----------------------------------------------------------------------===// /// This class represents a contiguous range of mutable operand ranges, e.g. /// from a VariadicOfVariadic operand group. @@ -235,6 +239,7 @@ class MutableOperandRangeRange final //===----------------------------------------------------------------------===// // ResultRange +//===----------------------------------------------------------------------===// /// This class implements the result iterators for the Operation class. class ResultRange final @@ -368,6 +373,7 @@ class ResultRange::UseIterator final //===----------------------------------------------------------------------===// // ValueRange +//===----------------------------------------------------------------------===// /// This class provides an abstraction over the different types of ranges over /// Values. In many cases, this prevents the need to explicitly materialize a diff --git a/mlir/include/mlir/Interfaces/SideEffectInterfaces.td b/mlir/include/mlir/Interfaces/SideEffectInterfaces.td index b2ab4fee9d29c..b292174fccb36 100644 --- a/mlir/include/mlir/Interfaces/SideEffectInterfaces.td +++ b/mlir/include/mlir/Interfaces/SideEffectInterfaces.td @@ -45,6 +45,7 @@ class MemoryEffects effects = []> //===----------------------------------------------------------------------===// // Effects +//===----------------------------------------------------------------------===// // The following effect indicates that the operation allocates from some // resource. An 'allocate' effect implies only allocation of the resource, and diff --git a/mlir/include/mlir/Pass/PassOptions.h b/mlir/include/mlir/Pass/PassOptions.h index b5a9c25e3baca..68588279e2f5a 100644 --- a/mlir/include/mlir/Pass/PassOptions.h +++ b/mlir/include/mlir/Pass/PassOptions.h @@ -406,6 +406,7 @@ namespace llvm { namespace cl { //===----------------------------------------------------------------------===// // std::vector+SmallVector +//===----------------------------------------------------------------------===// namespace detail { template @@ -470,6 +471,7 @@ class parser> //===----------------------------------------------------------------------===// // OpPassManager: OptionValue +//===----------------------------------------------------------------------===// template <> struct OptionValue final : GenericOptionValue { @@ -514,6 +516,7 @@ struct OptionValue final : GenericOptionValue { //===----------------------------------------------------------------------===// // OpPassManager: Parser +//===----------------------------------------------------------------------===// extern template class basic_parser; diff --git a/mlir/include/mlir/Tools/PDLL/AST/Nodes.h b/mlir/include/mlir/Tools/PDLL/AST/Nodes.h index aed2562e4d30d..f174ac2f476f6 100644 --- a/mlir/include/mlir/Tools/PDLL/AST/Nodes.h +++ b/mlir/include/mlir/Tools/PDLL/AST/Nodes.h @@ -247,6 +247,7 @@ class OpRewriteStmt : public Stmt { //===----------------------------------------------------------------------===// // EraseStmt +//===----------------------------------------------------------------------===// /// This statement represents the `erase` statement in PDLL. This statement /// erases the given root operation, corresponding roughly to the @@ -261,6 +262,7 @@ class EraseStmt final : public Node::NodeBase { //===----------------------------------------------------------------------===// // ReplaceStmt +//===----------------------------------------------------------------------===// /// This statement represents the `replace` statement in PDLL. This statement /// replace the given root operation with a set of values, corresponding roughly @@ -292,6 +294,7 @@ class ReplaceStmt final : public Node::NodeBase, //===----------------------------------------------------------------------===// // RewriteStmt +//===----------------------------------------------------------------------===// /// This statement represents an operation rewrite that contains a block of /// nested rewrite commands. This allows for building more complex operation @@ -478,6 +481,7 @@ class MemberAccessExpr : public Node::NodeBase { //===----------------------------------------------------------------------===// // AllResultsMemberAccessExpr +//===----------------------------------------------------------------------===// /// This class represents an instance of MemberAccessExpr that references all /// results of an operation. @@ -742,6 +746,7 @@ class CoreConstraintDecl : public ConstraintDecl { //===----------------------------------------------------------------------===// // AttrConstraintDecl +//===----------------------------------------------------------------------===// /// The class represents an Attribute constraint, and constrains a variable to /// be an Attribute. @@ -765,6 +770,7 @@ class AttrConstraintDecl //===----------------------------------------------------------------------===// // OpConstraintDecl +//===----------------------------------------------------------------------===// /// The class represents an Operation constraint, and constrains a variable to /// be an Operation. @@ -790,6 +796,7 @@ class OpConstraintDecl //===----------------------------------------------------------------------===// // TypeConstraintDecl +//===----------------------------------------------------------------------===// /// The class represents a Type constraint, and constrains a variable to be a /// Type. @@ -804,6 +811,7 @@ class TypeConstraintDecl //===----------------------------------------------------------------------===// // TypeRangeConstraintDecl +//===----------------------------------------------------------------------===// /// The class represents a TypeRange constraint, and constrains a variable to be /// a TypeRange. @@ -818,6 +826,7 @@ class TypeRangeConstraintDecl //===----------------------------------------------------------------------===// // ValueConstraintDecl +//===----------------------------------------------------------------------===// /// The class represents a Value constraint, and constrains a variable to be a /// Value. @@ -840,6 +849,7 @@ class ValueConstraintDecl //===----------------------------------------------------------------------===// // ValueRangeConstraintDecl +//===----------------------------------------------------------------------===// /// The class represents a ValueRange constraint, and constrains a variable to /// be a ValueRange. diff --git a/mlir/include/mlir/Tools/PDLL/AST/Types.h b/mlir/include/mlir/Tools/PDLL/AST/Types.h index 89c8e193ddc32..08d15bd764dfe 100644 --- a/mlir/include/mlir/Tools/PDLL/AST/Types.h +++ b/mlir/include/mlir/Tools/PDLL/AST/Types.h @@ -198,6 +198,7 @@ class RangeType : public Type::TypeBase { //===----------------------------------------------------------------------===// // TypeRangeType +//===----------------------------------------------------------------------===// /// This class represents a PDLL type that corresponds to an mlir::TypeRange. class TypeRangeType : public RangeType { @@ -213,6 +214,7 @@ class TypeRangeType : public RangeType { //===----------------------------------------------------------------------===// // ValueRangeType +//===----------------------------------------------------------------------===// /// This class represents a PDLL type that corresponds to an mlir::ValueRange. class ValueRangeType : public RangeType { diff --git a/mlir/lib/Analysis/CallGraph.cpp b/mlir/lib/Analysis/CallGraph.cpp index 780c7caee767c..d6fe62d8e58d6 100644 --- a/mlir/lib/Analysis/CallGraph.cpp +++ b/mlir/lib/Analysis/CallGraph.cpp @@ -173,6 +173,7 @@ void CallGraph::eraseNode(CallGraphNode *node) { //===----------------------------------------------------------------------===// // Printing +//===----------------------------------------------------------------------===// /// Dump the graph in a human readable format. void CallGraph::dump() const { print(llvm::errs()); } diff --git a/mlir/lib/AsmParser/AsmParserState.cpp b/mlir/lib/AsmParser/AsmParserState.cpp index 9b2b686aee782..2684b42516670 100644 --- a/mlir/lib/AsmParser/AsmParserState.cpp +++ b/mlir/lib/AsmParser/AsmParserState.cpp @@ -119,6 +119,7 @@ AsmParserState &AsmParserState::operator=(AsmParserState &&other) { //===----------------------------------------------------------------------===// // Access State +//===----------------------------------------------------------------------===// auto AsmParserState::getBlockDefs() const -> iterator_range { return llvm::make_pointee_range(llvm::ArrayRef(impl->blocks)); @@ -216,6 +217,7 @@ SMRange AsmParserState::convertIdLocToRange(SMLoc loc) { //===----------------------------------------------------------------------===// // Populate State +//===----------------------------------------------------------------------===// void AsmParserState::initialize(Operation *topLevelOp) { startOperationDefinition(topLevelOp->getName()); diff --git a/mlir/lib/AsmParser/Parser.cpp b/mlir/lib/AsmParser/Parser.cpp index 168231af9b410..6240fdc833501 100644 --- a/mlir/lib/AsmParser/Parser.cpp +++ b/mlir/lib/AsmParser/Parser.cpp @@ -435,6 +435,7 @@ ParseResult Parser::parseOptionalKeywordOrString(std::string *result) { //===----------------------------------------------------------------------===// // Resource Parsing +//===----------------------------------------------------------------------===// FailureOr Parser::parseResourceHandle(const OpAsmDialectInterface *dialect, @@ -478,6 +479,7 @@ Parser::parseResourceHandle(Dialect *dialect) { //===----------------------------------------------------------------------===// // Code Completion +//===----------------------------------------------------------------------===// ParseResult Parser::codeCompleteDialectName() { state.codeCompleteContext->completeDialectName(); diff --git a/mlir/lib/Bytecode/Reader/BytecodeReader.cpp b/mlir/lib/Bytecode/Reader/BytecodeReader.cpp index 1204f1c069b1e..0f2057cb32ff1 100644 --- a/mlir/lib/Bytecode/Reader/BytecodeReader.cpp +++ b/mlir/lib/Bytecode/Reader/BytecodeReader.cpp @@ -1733,6 +1733,7 @@ LogicalResult BytecodeReader::Impl::parseVersion(EncodingReader &reader) { //===----------------------------------------------------------------------===// // Dialect Section +//===----------------------------------------------------------------------===// LogicalResult BytecodeDialect::load(const DialectReader &reader, MLIRContext *ctx) { @@ -1874,6 +1875,7 @@ BytecodeReader::Impl::parseOpName(EncodingReader &reader, //===----------------------------------------------------------------------===// // Resource Section +//===----------------------------------------------------------------------===// LogicalResult BytecodeReader::Impl::parseResourceSection( EncodingReader &reader, std::optional> resourceData, @@ -1902,6 +1904,7 @@ LogicalResult BytecodeReader::Impl::parseResourceSection( //===----------------------------------------------------------------------===// // UseListOrder Helpers +//===----------------------------------------------------------------------===// FailureOr BytecodeReader::Impl::parseUseListOrderForRange(EncodingReader &reader, @@ -2060,6 +2063,7 @@ LogicalResult BytecodeReader::Impl::processUseLists(Operation *topLevelOp) { //===----------------------------------------------------------------------===// // IR Section +//===----------------------------------------------------------------------===// LogicalResult BytecodeReader::Impl::parseIRSection(ArrayRef sectionData, @@ -2460,6 +2464,7 @@ LogicalResult BytecodeReader::Impl::parseBlockArguments(EncodingReader &reader, //===----------------------------------------------------------------------===// // Value Processing +//===----------------------------------------------------------------------===// Value BytecodeReader::Impl::parseOperand(EncodingReader &reader) { std::vector &values = valueScopes.back().values; diff --git a/mlir/lib/Bytecode/Writer/BytecodeWriter.cpp b/mlir/lib/Bytecode/Writer/BytecodeWriter.cpp index cc5aaed416512..404d361a50c1f 100644 --- a/mlir/lib/Bytecode/Writer/BytecodeWriter.cpp +++ b/mlir/lib/Bytecode/Writer/BytecodeWriter.cpp @@ -772,6 +772,7 @@ LogicalResult BytecodeWriter::write(Operation *rootOp, raw_ostream &os) { //===----------------------------------------------------------------------===// // Dialects +//===----------------------------------------------------------------------===// /// Write the given entries in contiguous groups with the same parent dialect. /// Each dialect sub-group is encoded with the parent dialect and number of @@ -855,6 +856,7 @@ void BytecodeWriter::writeDialectSection(EncodingEmitter &emitter) { //===----------------------------------------------------------------------===// // Attributes and Types +//===----------------------------------------------------------------------===// void BytecodeWriter::writeAttrTypeSection(EncodingEmitter &emitter) { EncodingEmitter attrTypeEmitter; @@ -936,6 +938,7 @@ void BytecodeWriter::writeAttrTypeSection(EncodingEmitter &emitter) { //===----------------------------------------------------------------------===// // Operations +//===----------------------------------------------------------------------===// LogicalResult BytecodeWriter::writeBlock(EncodingEmitter &emitter, Block *block) { @@ -1215,6 +1218,7 @@ LogicalResult BytecodeWriter::writeIRSection(EncodingEmitter &emitter, //===----------------------------------------------------------------------===// // Resources +//===----------------------------------------------------------------------===// namespace { /// This class represents a resource builder implementation for the MLIR @@ -1327,6 +1331,7 @@ void BytecodeWriter::writeResourceSection(Operation *op, //===----------------------------------------------------------------------===// // Strings +//===----------------------------------------------------------------------===// void BytecodeWriter::writeStringSection(EncodingEmitter &emitter) { EncodingEmitter stringEmitter; @@ -1336,6 +1341,7 @@ void BytecodeWriter::writeStringSection(EncodingEmitter &emitter) { //===----------------------------------------------------------------------===// // Properties +//===----------------------------------------------------------------------===// void BytecodeWriter::writePropertiesSection(EncodingEmitter &emitter) { EncodingEmitter propertiesEmitter; diff --git a/mlir/lib/CAPI/Transforms/Rewrite.cpp b/mlir/lib/CAPI/Transforms/Rewrite.cpp index c4717ca613319..a4df97f7beace 100644 --- a/mlir/lib/CAPI/Transforms/Rewrite.cpp +++ b/mlir/lib/CAPI/Transforms/Rewrite.cpp @@ -29,6 +29,7 @@ MlirContext mlirRewriterBaseGetContext(MlirRewriterBase rewriter) { //===----------------------------------------------------------------------===// /// Insertion points methods +//===----------------------------------------------------------------------===// void mlirRewriterBaseClearInsertionPoint(MlirRewriterBase rewriter) { unwrap(rewriter)->clearInsertionPoint(); @@ -69,6 +70,7 @@ MlirBlock mlirRewriterBaseGetBlock(MlirRewriterBase rewriter) { //===----------------------------------------------------------------------===// /// Block and operation creation/insertion/cloning +//===----------------------------------------------------------------------===// MlirBlock mlirRewriterBaseCreateBlockBefore(MlirRewriterBase rewriter, MlirBlock insertBefore, diff --git a/mlir/lib/Conversion/PDLToPDLInterp/Predicate.cpp b/mlir/lib/Conversion/PDLToPDLInterp/Predicate.cpp index a12f3171e7afa..92524723754af 100644 --- a/mlir/lib/Conversion/PDLToPDLInterp/Predicate.cpp +++ b/mlir/lib/Conversion/PDLToPDLInterp/Predicate.cpp @@ -26,6 +26,7 @@ unsigned Position::getOperationDepth() const { //===----------------------------------------------------------------------===// // AttributePosition +//===----------------------------------------------------------------------===// AttributePosition::AttributePosition(const KeyTy &key) : Base(key) { parent = key.first; @@ -33,6 +34,7 @@ AttributePosition::AttributePosition(const KeyTy &key) : Base(key) { //===----------------------------------------------------------------------===// // OperandPosition +//===----------------------------------------------------------------------===// OperandPosition::OperandPosition(const KeyTy &key) : Base(key) { parent = key.first; @@ -40,6 +42,7 @@ OperandPosition::OperandPosition(const KeyTy &key) : Base(key) { //===----------------------------------------------------------------------===// // OperandGroupPosition +//===----------------------------------------------------------------------===// OperandGroupPosition::OperandGroupPosition(const KeyTy &key) : Base(key) { parent = std::get<0>(key); @@ -47,6 +50,7 @@ OperandGroupPosition::OperandGroupPosition(const KeyTy &key) : Base(key) { //===----------------------------------------------------------------------===// // OperationPosition +//===----------------------------------------------------------------------===// bool OperationPosition::isOperandDefiningOp() const { return isa_and_nonnull(parent); diff --git a/mlir/lib/Conversion/PDLToPDLInterp/Predicate.h b/mlir/lib/Conversion/PDLToPDLInterp/Predicate.h index 5ad2c477573a5..12a752d4e7dbf 100644 --- a/mlir/lib/Conversion/PDLToPDLInterp/Predicate.h +++ b/mlir/lib/Conversion/PDLToPDLInterp/Predicate.h @@ -166,6 +166,7 @@ class Position : public StorageUniquer::BaseStorage { //===----------------------------------------------------------------------===// // AttributePosition +//===----------------------------------------------------------------------===// /// A position describing an attribute of an operation. struct AttributePosition @@ -180,6 +181,7 @@ struct AttributePosition //===----------------------------------------------------------------------===// // AttributeLiteralPosition +//===----------------------------------------------------------------------===// /// A position describing a literal attribute. struct AttributeLiteralPosition @@ -190,6 +192,7 @@ struct AttributeLiteralPosition //===----------------------------------------------------------------------===// // ForEachPosition +//===----------------------------------------------------------------------===// /// A position describing an iterative choice of an operation. struct ForEachPosition : public PredicateBase emitError, //===----------------------------------------------------------------------===// // DataLayoutTypeInterface +//===----------------------------------------------------------------------===// llvm::TypeSize LLVMArrayType::getTypeSizeInBits(const DataLayout &dataLayout, @@ -255,6 +256,7 @@ LLVMFunctionType::verify(function_ref emitError, //===----------------------------------------------------------------------===// // DataLayoutTypeInterface +//===----------------------------------------------------------------------===// constexpr const static uint64_t kDefaultPointerSizeBits = 64; constexpr const static uint64_t kDefaultPointerAlignment = 8; diff --git a/mlir/lib/IR/BuiltinAttributes.cpp b/mlir/lib/IR/BuiltinAttributes.cpp index 112e3f376bd41..daf79dc5de981 100644 --- a/mlir/lib/IR/BuiltinAttributes.cpp +++ b/mlir/lib/IR/BuiltinAttributes.cpp @@ -600,6 +600,7 @@ static bool hasSameElementsOrSplat(ShapedType type, const Values &values) { //===----------------------------------------------------------------------===// // AttributeElementIterator +//===----------------------------------------------------------------------===// DenseElementsAttr::AttributeElementIterator::AttributeElementIterator( DenseElementsAttr attr, size_t index) @@ -647,6 +648,7 @@ Attribute DenseElementsAttr::AttributeElementIterator::operator*() const { //===----------------------------------------------------------------------===// // BoolElementIterator +//===----------------------------------------------------------------------===// DenseElementsAttr::BoolElementIterator::BoolElementIterator( DenseElementsAttr attr, size_t dataIndex) @@ -659,6 +661,7 @@ bool DenseElementsAttr::BoolElementIterator::operator*() const { //===----------------------------------------------------------------------===// // IntElementIterator +//===----------------------------------------------------------------------===// DenseElementsAttr::IntElementIterator::IntElementIterator( DenseElementsAttr attr, size_t dataIndex) @@ -674,6 +677,7 @@ APInt DenseElementsAttr::IntElementIterator::operator*() const { //===----------------------------------------------------------------------===// // ComplexIntElementIterator +//===----------------------------------------------------------------------===// DenseElementsAttr::ComplexIntElementIterator::ComplexIntElementIterator( DenseElementsAttr attr, size_t dataIndex) @@ -1552,6 +1556,7 @@ ArrayRef DenseResourceElementsAttr::getData() { //===----------------------------------------------------------------------===// // DenseResourceElementsAttrBase +//===----------------------------------------------------------------------===// namespace { /// Instantiations of this class provide utilities for interacting with native diff --git a/mlir/lib/IR/BuiltinDialectBytecode.cpp b/mlir/lib/IR/BuiltinDialectBytecode.cpp index 6095c6bcb2ce3..31aff47ceaa67 100644 --- a/mlir/lib/IR/BuiltinDialectBytecode.cpp +++ b/mlir/lib/IR/BuiltinDialectBytecode.cpp @@ -29,6 +29,7 @@ namespace { //===----------------------------------------------------------------------===// // Utility functions +//===----------------------------------------------------------------------===// // TODO: Move these to separate file. diff --git a/mlir/lib/IR/OperationSupport.cpp b/mlir/lib/IR/OperationSupport.cpp index 1b2cda19de1e8..7c9e6c89d4d8e 100644 --- a/mlir/lib/IR/OperationSupport.cpp +++ b/mlir/lib/IR/OperationSupport.cpp @@ -383,6 +383,7 @@ MutableArrayRef detail::OperandStorage::resize(Operation *owner, //===----------------------------------------------------------------------===// // OperandRange +//===----------------------------------------------------------------------===// unsigned OperandRange::getBeginOperandIndex() const { assert(!empty() && "range must not be empty"); @@ -395,6 +396,7 @@ OperandRangeRange OperandRange::split(DenseI32ArrayAttr segmentSizes) const { //===----------------------------------------------------------------------===// // OperandRangeRange +//===----------------------------------------------------------------------===// OperandRangeRange::OperandRangeRange(OperandRange operands, Attribute operandSegments) @@ -419,6 +421,7 @@ OperandRange OperandRangeRange::dereference(const OwnerT &object, //===----------------------------------------------------------------------===// // MutableOperandRange +//===----------------------------------------------------------------------===// /// Construct a new mutable range from the given operand, operand start index, /// and range length. @@ -542,6 +545,7 @@ MutableArrayRef::iterator MutableOperandRange::end() const { //===----------------------------------------------------------------------===// // MutableOperandRangeRange +//===----------------------------------------------------------------------===// MutableOperandRangeRange::MutableOperandRangeRange( const MutableOperandRange &operands, NamedAttribute operandSegmentAttr) @@ -571,6 +575,7 @@ MutableOperandRange MutableOperandRangeRange::dereference(const OwnerT &object, //===----------------------------------------------------------------------===// // ResultRange +//===----------------------------------------------------------------------===// ResultRange::ResultRange(OpResult result) : ResultRange(static_cast(Value(result).getImpl()), @@ -637,6 +642,7 @@ void ResultRange::replaceUsesWithIf( //===----------------------------------------------------------------------===// // ValueRange +//===----------------------------------------------------------------------===// ValueRange::ValueRange(ArrayRef values) : ValueRange(values.data(), values.size()) {} diff --git a/mlir/lib/IR/PDL/PDLPatternMatch.cpp b/mlir/lib/IR/PDL/PDLPatternMatch.cpp index da07cc462a5a1..0d05153bf7dab 100644 --- a/mlir/lib/IR/PDL/PDLPatternMatch.cpp +++ b/mlir/lib/IR/PDL/PDLPatternMatch.cpp @@ -113,6 +113,7 @@ void PDLPatternModule::attachConfigToPatterns(ModuleOp module, //===----------------------------------------------------------------------===// // Function Registry +//===----------------------------------------------------------------------===// void PDLPatternModule::registerConstraintFunction( StringRef name, PDLConstraintFunction constraintFn) { diff --git a/mlir/lib/IR/PatternMatch.cpp b/mlir/lib/IR/PatternMatch.cpp index 3e3c06bebf142..1e6084822a99a 100644 --- a/mlir/lib/IR/PatternMatch.cpp +++ b/mlir/lib/IR/PatternMatch.cpp @@ -35,6 +35,7 @@ unsigned short PatternBenefit::getBenefit() const { //===----------------------------------------------------------------------===// // OperationName Root Constructors +//===----------------------------------------------------------------------===// Pattern::Pattern(StringRef rootName, PatternBenefit benefit, MLIRContext *context, ArrayRef generatedNames) @@ -43,6 +44,7 @@ Pattern::Pattern(StringRef rootName, PatternBenefit benefit, //===----------------------------------------------------------------------===// // MatchAnyOpTypeTag Root Constructors +//===----------------------------------------------------------------------===// Pattern::Pattern(MatchAnyOpTypeTag tag, PatternBenefit benefit, MLIRContext *context, ArrayRef generatedNames) @@ -50,6 +52,7 @@ Pattern::Pattern(MatchAnyOpTypeTag tag, PatternBenefit benefit, //===----------------------------------------------------------------------===// // MatchInterfaceOpTypeTag Root Constructors +//===----------------------------------------------------------------------===// Pattern::Pattern(MatchInterfaceOpTypeTag tag, TypeID interfaceID, PatternBenefit benefit, MLIRContext *context, @@ -59,6 +62,7 @@ Pattern::Pattern(MatchInterfaceOpTypeTag tag, TypeID interfaceID, //===----------------------------------------------------------------------===// // MatchTraitOpTypeTag Root Constructors +//===----------------------------------------------------------------------===// Pattern::Pattern(MatchTraitOpTypeTag tag, TypeID traitID, PatternBenefit benefit, MLIRContext *context, @@ -68,6 +72,7 @@ Pattern::Pattern(MatchTraitOpTypeTag tag, TypeID traitID, //===----------------------------------------------------------------------===// // General Constructors +//===----------------------------------------------------------------------===// Pattern::Pattern(const void *rootValue, RootKind rootKind, ArrayRef generatedNames, PatternBenefit benefit, diff --git a/mlir/lib/IR/SymbolTable.cpp b/mlir/lib/IR/SymbolTable.cpp index 71adfc467611b..71422191c1455 100644 --- a/mlir/lib/IR/SymbolTable.cpp +++ b/mlir/lib/IR/SymbolTable.cpp @@ -759,6 +759,7 @@ static bool isReferencePrefixOf(SymbolRefAttr subRef, SymbolRefAttr ref) { //===----------------------------------------------------------------------===// // SymbolTable::getSymbolUses +//===----------------------------------------------------------------------===// /// The implementation of SymbolTable::getSymbolUses below. template @@ -789,6 +790,7 @@ auto SymbolTable::getSymbolUses(Region *from) -> std::optional { //===----------------------------------------------------------------------===// // SymbolTable::getSymbolUses +//===----------------------------------------------------------------------===// /// The implementation of SymbolTable::getSymbolUses below. template @@ -828,6 +830,7 @@ auto SymbolTable::getSymbolUses(Operation *symbol, Region *from) //===----------------------------------------------------------------------===// // SymbolTable::symbolKnownUseEmpty +//===----------------------------------------------------------------------===// /// The implementation of SymbolTable::symbolKnownUseEmpty below. template @@ -863,6 +866,7 @@ bool SymbolTable::symbolKnownUseEmpty(Operation *symbol, Region *from) { //===----------------------------------------------------------------------===// // SymbolTable::replaceAllSymbolUses +//===----------------------------------------------------------------------===// /// Generates a new symbol reference attribute with a new leaf reference. static SymbolRefAttr generateNewRefAttr(SymbolRefAttr oldAttr, diff --git a/mlir/lib/IR/TypeRange.cpp b/mlir/lib/IR/TypeRange.cpp index f8878303727d4..26ffc0d5485de 100644 --- a/mlir/lib/IR/TypeRange.cpp +++ b/mlir/lib/IR/TypeRange.cpp @@ -13,6 +13,7 @@ using namespace mlir; //===----------------------------------------------------------------------===// // TypeRange +//===----------------------------------------------------------------------===// TypeRange::TypeRange(ArrayRef types) : TypeRange(types.data(), types.size()) { diff --git a/mlir/lib/IR/ValueRange.cpp b/mlir/lib/IR/ValueRange.cpp index bd2e10098e61d..a76c0c1f83cf1 100644 --- a/mlir/lib/IR/ValueRange.cpp +++ b/mlir/lib/IR/ValueRange.cpp @@ -13,6 +13,7 @@ using namespace mlir; //===----------------------------------------------------------------------===// // TypeRangeRange +//===----------------------------------------------------------------------===// TypeRangeRange OperandRangeRange::getTypes() const { return TypeRangeRange(*this); @@ -22,6 +23,7 @@ TypeRangeRange OperandRangeRange::getType() const { return getTypes(); } //===----------------------------------------------------------------------===// // OperandRange +//===----------------------------------------------------------------------===// OperandRange::type_range OperandRange::getTypes() const { return {begin(), end()}; @@ -31,6 +33,7 @@ OperandRange::type_range OperandRange::getType() const { return getTypes(); } //===----------------------------------------------------------------------===// // ResultRange +//===----------------------------------------------------------------------===// ResultRange::type_range ResultRange::getTypes() const { return {begin(), end()}; @@ -40,6 +43,7 @@ ResultRange::type_range ResultRange::getType() const { return getTypes(); } //===----------------------------------------------------------------------===// // ValueRange +//===----------------------------------------------------------------------===// ValueRange::type_range ValueRange::getTypes() const { return {begin(), end()}; } diff --git a/mlir/lib/Pass/PassRegistry.cpp b/mlir/lib/Pass/PassRegistry.cpp index ece2fdaed0dfd..7c294f08a32bb 100644 --- a/mlir/lib/Pass/PassRegistry.cpp +++ b/mlir/lib/Pass/PassRegistry.cpp @@ -418,6 +418,7 @@ size_t detail::PassOptions::getOptionWidth() const { //===----------------------------------------------------------------------===// // OpPassManager: OptionValue +//===----------------------------------------------------------------------===// llvm::cl::OptionValue::OptionValue() = default; llvm::cl::OptionValue::OptionValue( @@ -470,6 +471,7 @@ void llvm::cl::OptionValue::anchor() {} //===----------------------------------------------------------------------===// // OpPassManager: Parser +//===----------------------------------------------------------------------===// namespace llvm { namespace cl { @@ -1028,6 +1030,7 @@ LogicalResult PassPipelineCLParser::addToPipeline( //===----------------------------------------------------------------------===// // PassNameCLParser +//===----------------------------------------------------------------------===// /// Construct a pass pipeline parser with the given command line description. PassNameCLParser::PassNameCLParser(StringRef arg, StringRef description) diff --git a/mlir/lib/Rewrite/ByteCode.cpp b/mlir/lib/Rewrite/ByteCode.cpp index d2d9ec2787a28..26510f976efc9 100644 --- a/mlir/lib/Rewrite/ByteCode.cpp +++ b/mlir/lib/Rewrite/ByteCode.cpp @@ -179,6 +179,7 @@ static constexpr ByteCodeField kInferTypesMarker = //===----------------------------------------------------------------------===// // Generator +//===----------------------------------------------------------------------===// namespace { struct ByteCodeLiveRange; @@ -1086,6 +1087,7 @@ void PDLByteCode::initializeMutableState(PDLByteCodeMutableState &state) const { //===----------------------------------------------------------------------===// // ByteCode Execution +//===----------------------------------------------------------------------===// namespace { /// This class is an instantiation of the PDLResultList that provides access to diff --git a/mlir/lib/TableGen/CodeGenHelpers.cpp b/mlir/lib/TableGen/CodeGenHelpers.cpp index 747af1ce5a4d3..0a07071fea217 100644 --- a/mlir/lib/TableGen/CodeGenHelpers.cpp +++ b/mlir/lib/TableGen/CodeGenHelpers.cpp @@ -65,6 +65,7 @@ void StaticVerifierFunctionEmitter::emitPatternConstraints( //===----------------------------------------------------------------------===// // Constraint Getters +//===----------------------------------------------------------------------===// StringRef StaticVerifierFunctionEmitter::getTypeConstraintFn( const Constraint &constraint) const { @@ -100,6 +101,7 @@ StringRef StaticVerifierFunctionEmitter::getRegionConstraintFn( //===----------------------------------------------------------------------===// // Constraint Emission +//===----------------------------------------------------------------------===// /// Code templates for emitting type, attribute, successor, and region /// constraints. Each of these templates require the following arguments: @@ -234,6 +236,7 @@ void StaticVerifierFunctionEmitter::emitPatternConstraints() { //===----------------------------------------------------------------------===// // Constraint Uniquing +//===----------------------------------------------------------------------===// /// An attribute constraint that references anything other than itself and the /// current op cannot be generically extracted into a function. Most diff --git a/mlir/lib/Tools/PDLL/AST/Nodes.cpp b/mlir/lib/Tools/PDLL/AST/Nodes.cpp index 654ff24454cb1..ee2fe0fb9e3c3 100644 --- a/mlir/lib/Tools/PDLL/AST/Nodes.cpp +++ b/mlir/lib/Tools/PDLL/AST/Nodes.cpp @@ -214,6 +214,7 @@ LetStmt *LetStmt::create(Context &ctx, SMRange loc, VariableDecl *varDecl) { //===----------------------------------------------------------------------===// // EraseStmt +//===----------------------------------------------------------------------===// EraseStmt *EraseStmt::create(Context &ctx, SMRange loc, Expr *rootOp) { return new (ctx.getAllocator().Allocate()) EraseStmt(loc, rootOp); @@ -221,6 +222,7 @@ EraseStmt *EraseStmt::create(Context &ctx, SMRange loc, Expr *rootOp) { //===----------------------------------------------------------------------===// // ReplaceStmt +//===----------------------------------------------------------------------===// ReplaceStmt *ReplaceStmt::create(Context &ctx, SMRange loc, Expr *rootOp, ArrayRef replExprs) { @@ -235,6 +237,7 @@ ReplaceStmt *ReplaceStmt::create(Context &ctx, SMRange loc, Expr *rootOp, //===----------------------------------------------------------------------===// // RewriteStmt +//===----------------------------------------------------------------------===// RewriteStmt *RewriteStmt::create(Context &ctx, SMRange loc, Expr *rootOp, CompoundStmt *rewriteBody) { diff --git a/mlir/lib/Tools/PDLL/AST/Types.cpp b/mlir/lib/Tools/PDLL/AST/Types.cpp index 081f85d69a2f6..1468ac2a280d5 100644 --- a/mlir/lib/Tools/PDLL/AST/Types.cpp +++ b/mlir/lib/Tools/PDLL/AST/Types.cpp @@ -103,6 +103,7 @@ Type RangeType::getElementType() const { //===----------------------------------------------------------------------===// // TypeRangeType +//===----------------------------------------------------------------------===// bool TypeRangeType::classof(Type type) { RangeType range = mlir::dyn_cast(type); @@ -116,6 +117,7 @@ TypeRangeType TypeRangeType::get(Context &context) { //===----------------------------------------------------------------------===// // ValueRangeType +//===----------------------------------------------------------------------===// bool ValueRangeType::classof(Type type) { RangeType range = mlir::dyn_cast(type); diff --git a/mlir/lib/Tools/PDLL/Parser/Parser.cpp b/mlir/lib/Tools/PDLL/Parser/Parser.cpp index 575fb4aacd947..c0e2252bdebc5 100644 --- a/mlir/lib/Tools/PDLL/Parser/Parser.cpp +++ b/mlir/lib/Tools/PDLL/Parser/Parser.cpp @@ -762,6 +762,7 @@ LogicalResult Parser::convertTupleExpressionTo( //===----------------------------------------------------------------------===// // Directives +//===----------------------------------------------------------------------===// LogicalResult Parser::parseDirective(SmallVectorImpl &decls) { StringRef directive = curToken.getSpelling(); @@ -1021,6 +1022,7 @@ Parser::createODSNativePDLLConstraintDecl(const tblgen::Constraint &constraint, //===----------------------------------------------------------------------===// // Decls +//===----------------------------------------------------------------------===// FailureOr Parser::parseTopLevelDecl() { FailureOr decl; @@ -1786,6 +1788,7 @@ FailureOr Parser::parseArgOrResultConstraint() { //===----------------------------------------------------------------------===// // Exprs +//===----------------------------------------------------------------------===// FailureOr Parser::parseExpr() { if (curToken.is(Token::underscore)) @@ -2249,6 +2252,7 @@ FailureOr Parser::parseUnderscoreExpr() { //===----------------------------------------------------------------------===// // Stmts +//===----------------------------------------------------------------------===// FailureOr Parser::parseStmt(bool expectTerminalSemicolon) { FailureOr stmt; @@ -2482,6 +2486,7 @@ FailureOr Parser::parseRewriteStmt() { //===----------------------------------------------------------------------===// // Decls +//===----------------------------------------------------------------------===// ast::CallableDecl *Parser::tryExtractCallableDecl(ast::Node *node) { // Unwrap reference expressions. @@ -2681,6 +2686,7 @@ Parser::validateTypeRangeConstraintExpr(const ast::Expr *typeExpr) { //===----------------------------------------------------------------------===// // Exprs +//===----------------------------------------------------------------------===// FailureOr Parser::createCallExpr(SMRange loc, ast::Expr *parentExpr, @@ -3057,6 +3063,7 @@ Parser::createTupleExpr(SMRange loc, ArrayRef elements, //===----------------------------------------------------------------------===// // Stmts +//===----------------------------------------------------------------------===// FailureOr Parser::createEraseStmt(SMRange loc, ast::Expr *rootOp) { diff --git a/mlir/lib/Tools/mlir-lsp-server/LSPServer.cpp b/mlir/lib/Tools/mlir-lsp-server/LSPServer.cpp index 0f23366f6fe80..250412359d753 100644 --- a/mlir/lib/Tools/mlir-lsp-server/LSPServer.cpp +++ b/mlir/lib/Tools/mlir-lsp-server/LSPServer.cpp @@ -101,6 +101,7 @@ struct LSPServer { //===----------------------------------------------------------------------===// // Initialization +//===----------------------------------------------------------------------===// void LSPServer::onInitialize(const InitializeParams ¶ms, Callback reply) { @@ -160,6 +161,7 @@ void LSPServer::onShutdown(const NoParams &, Callback reply) { //===----------------------------------------------------------------------===// // Document Change +//===----------------------------------------------------------------------===// void LSPServer::onDocumentDidOpen(const DidOpenTextDocumentParams ¶ms) { PublishDiagnosticsParams diagParams(params.textDocument.uri, @@ -200,6 +202,7 @@ void LSPServer::onDocumentDidChange(const DidChangeTextDocumentParams ¶ms) { //===----------------------------------------------------------------------===// // Definitions and References +//===----------------------------------------------------------------------===// void LSPServer::onGoToDefinition(const TextDocumentPositionParams ¶ms, Callback> reply) { @@ -217,6 +220,7 @@ void LSPServer::onReference(const ReferenceParams ¶ms, //===----------------------------------------------------------------------===// // Hover +//===----------------------------------------------------------------------===// void LSPServer::onHover(const TextDocumentPositionParams ¶ms, Callback> reply) { @@ -225,6 +229,7 @@ void LSPServer::onHover(const TextDocumentPositionParams ¶ms, //===----------------------------------------------------------------------===// // Document Symbols +//===----------------------------------------------------------------------===// void LSPServer::onDocumentSymbol(const DocumentSymbolParams ¶ms, Callback> reply) { @@ -235,6 +240,7 @@ void LSPServer::onDocumentSymbol(const DocumentSymbolParams ¶ms, //===----------------------------------------------------------------------===// // Code Completion +//===----------------------------------------------------------------------===// void LSPServer::onCompletion(const CompletionParams ¶ms, Callback reply) { @@ -243,6 +249,7 @@ void LSPServer::onCompletion(const CompletionParams ¶ms, //===----------------------------------------------------------------------===// // Code Action +//===----------------------------------------------------------------------===// void LSPServer::onCodeAction(const CodeActionParams ¶ms, Callback reply) { @@ -267,6 +274,7 @@ void LSPServer::onCodeAction(const CodeActionParams ¶ms, //===----------------------------------------------------------------------===// // Bytecode +//===----------------------------------------------------------------------===// void LSPServer::onConvertFromBytecode( const MLIRConvertBytecodeParams ¶ms, diff --git a/mlir/lib/Tools/mlir-pdll-lsp-server/LSPServer.cpp b/mlir/lib/Tools/mlir-pdll-lsp-server/LSPServer.cpp index f02372367e38c..c15f17025e3c1 100644 --- a/mlir/lib/Tools/mlir-pdll-lsp-server/LSPServer.cpp +++ b/mlir/lib/Tools/mlir-pdll-lsp-server/LSPServer.cpp @@ -114,6 +114,7 @@ struct LSPServer { //===----------------------------------------------------------------------===// // Initialization +//===----------------------------------------------------------------------===// void LSPServer::onInitialize(const InitializeParams ¶ms, Callback reply) { @@ -164,6 +165,7 @@ void LSPServer::onShutdown(const NoParams &, Callback reply) { //===----------------------------------------------------------------------===// // Document Change +//===----------------------------------------------------------------------===// void LSPServer::onDocumentDidOpen(const DidOpenTextDocumentParams ¶ms) { PublishDiagnosticsParams diagParams(params.textDocument.uri, @@ -198,6 +200,7 @@ void LSPServer::onDocumentDidChange(const DidChangeTextDocumentParams ¶ms) { //===----------------------------------------------------------------------===// // Definitions and References +//===----------------------------------------------------------------------===// void LSPServer::onGoToDefinition(const TextDocumentPositionParams ¶ms, Callback> reply) { @@ -215,6 +218,7 @@ void LSPServer::onReference(const ReferenceParams ¶ms, //===----------------------------------------------------------------------===// // DocumentLink +//===----------------------------------------------------------------------===// void LSPServer::onDocumentLink(const DocumentLinkParams ¶ms, Callback> reply) { @@ -225,6 +229,7 @@ void LSPServer::onDocumentLink(const DocumentLinkParams ¶ms, //===----------------------------------------------------------------------===// // Hover +//===----------------------------------------------------------------------===// void LSPServer::onHover(const TextDocumentPositionParams ¶ms, Callback> reply) { @@ -233,6 +238,7 @@ void LSPServer::onHover(const TextDocumentPositionParams ¶ms, //===----------------------------------------------------------------------===// // Document Symbols +//===----------------------------------------------------------------------===// void LSPServer::onDocumentSymbol(const DocumentSymbolParams ¶ms, Callback> reply) { @@ -243,6 +249,7 @@ void LSPServer::onDocumentSymbol(const DocumentSymbolParams ¶ms, //===----------------------------------------------------------------------===// // Code Completion +//===----------------------------------------------------------------------===// void LSPServer::onCompletion(const CompletionParams ¶ms, Callback reply) { @@ -251,6 +258,7 @@ void LSPServer::onCompletion(const CompletionParams ¶ms, //===----------------------------------------------------------------------===// // Signature Help +//===----------------------------------------------------------------------===// void LSPServer::onSignatureHelp(const TextDocumentPositionParams ¶ms, Callback reply) { @@ -259,6 +267,7 @@ void LSPServer::onSignatureHelp(const TextDocumentPositionParams ¶ms, //===----------------------------------------------------------------------===// // Inlay Hints +//===----------------------------------------------------------------------===// void LSPServer::onInlayHint(const InlayHintsParams ¶ms, Callback> reply) { @@ -269,6 +278,7 @@ void LSPServer::onInlayHint(const InlayHintsParams ¶ms, //===----------------------------------------------------------------------===// // PDLL ViewOutput +//===----------------------------------------------------------------------===// void LSPServer::onPDLLViewOutput( const PDLLViewOutputParams ¶ms, diff --git a/mlir/lib/Tools/tblgen-lsp-server/LSPServer.cpp b/mlir/lib/Tools/tblgen-lsp-server/LSPServer.cpp index b62f68db9d60f..993eea376bc26 100644 --- a/mlir/lib/Tools/tblgen-lsp-server/LSPServer.cpp +++ b/mlir/lib/Tools/tblgen-lsp-server/LSPServer.cpp @@ -82,6 +82,7 @@ struct LSPServer { //===----------------------------------------------------------------------===// // Initialization +//===----------------------------------------------------------------------===// void LSPServer::onInitialize(const InitializeParams ¶ms, Callback reply) { @@ -116,6 +117,7 @@ void LSPServer::onShutdown(const NoParams &, Callback reply) { //===----------------------------------------------------------------------===// // Document Change +//===----------------------------------------------------------------------===// void LSPServer::onDocumentDidOpen(const DidOpenTextDocumentParams ¶ms) { PublishDiagnosticsParams diagParams(params.textDocument.uri, @@ -150,6 +152,7 @@ void LSPServer::onDocumentDidChange(const DidChangeTextDocumentParams ¶ms) { //===----------------------------------------------------------------------===// // Definitions and References +//===----------------------------------------------------------------------===// void LSPServer::onGoToDefinition(const TextDocumentPositionParams ¶ms, Callback> reply) { @@ -167,6 +170,7 @@ void LSPServer::onReference(const ReferenceParams ¶ms, //===----------------------------------------------------------------------===// // DocumentLink +//===----------------------------------------------------------------------===// void LSPServer::onDocumentLink(const DocumentLinkParams ¶ms, Callback> reply) { @@ -177,6 +181,7 @@ void LSPServer::onDocumentLink(const DocumentLinkParams ¶ms, //===----------------------------------------------------------------------===// // Hover +//===----------------------------------------------------------------------===// void LSPServer::onHover(const TextDocumentPositionParams ¶ms, Callback> reply) { diff --git a/mlir/lib/Transforms/Utils/DialectConversion.cpp b/mlir/lib/Transforms/Utils/DialectConversion.cpp index b9475a7cc95a8..444c505b64232 100644 --- a/mlir/lib/Transforms/Utils/DialectConversion.cpp +++ b/mlir/lib/Transforms/Utils/DialectConversion.cpp @@ -1198,6 +1198,7 @@ void ConversionPatternRewriterImpl::applyRewrites() { //===----------------------------------------------------------------------===// // State Management +//===----------------------------------------------------------------------===// RewriterState ConversionPatternRewriterImpl::getCurrentState() { return RewriterState(rewrites.size(), ignoredOps.size(), replacedOps.size()); @@ -1288,6 +1289,7 @@ bool ConversionPatternRewriterImpl::wasOpReplaced(Operation *op) const { //===----------------------------------------------------------------------===// // Type Conversion +//===----------------------------------------------------------------------===// FailureOr ConversionPatternRewriterImpl::convertRegionTypes( ConversionPatternRewriter &rewriter, Region *region, @@ -1502,6 +1504,7 @@ Value ConversionPatternRewriterImpl::findOrBuildReplacementValue( //===----------------------------------------------------------------------===// // Rewriter Notification Hooks +//===----------------------------------------------------------------------===// void ConversionPatternRewriterImpl::notifyOperationInserted( Operation *op, OpBuilder::InsertPoint previous) { @@ -2336,6 +2339,7 @@ LogicalResult OperationLegalizer::legalizePatternRootUpdates( //===----------------------------------------------------------------------===// // Cost Model +//===----------------------------------------------------------------------===// void OperationLegalizer::buildLegalizationGraph( LegalizationPatterns &anyOpLegalizerPatterns, @@ -3355,6 +3359,7 @@ void mlir::registerConversionPDLFunctions(RewritePatternSet &patterns) { //===----------------------------------------------------------------------===// // Partial Conversion +//===----------------------------------------------------------------------===// LogicalResult mlir::applyPartialConversion( ArrayRef ops, const ConversionTarget &target, @@ -3372,6 +3377,7 @@ mlir::applyPartialConversion(Operation *op, const ConversionTarget &target, //===----------------------------------------------------------------------===// // Full Conversion +//===----------------------------------------------------------------------===// LogicalResult mlir::applyFullConversion(ArrayRef ops, const ConversionTarget &target, @@ -3390,6 +3396,7 @@ LogicalResult mlir::applyFullConversion(Operation *op, //===----------------------------------------------------------------------===// // Analysis Conversion +//===----------------------------------------------------------------------===// /// Find a common IsolatedFromAbove ancestor of the given ops. If at least one /// op is a top-level module op (which is expected to be isolated from above), diff --git a/mlir/lib/Transforms/Utils/Inliner.cpp b/mlir/lib/Transforms/Utils/Inliner.cpp index 756f5e379e7dd..f511504594cfa 100644 --- a/mlir/lib/Transforms/Utils/Inliner.cpp +++ b/mlir/lib/Transforms/Utils/Inliner.cpp @@ -65,6 +65,7 @@ static void walkReferencedSymbolNodes( //===----------------------------------------------------------------------===// // CGUseList +//===----------------------------------------------------------------------===// namespace { /// This struct tracks the uses of callgraph nodes that can be dropped when diff --git a/mlir/lib/Transforms/Utils/RegionUtils.cpp b/mlir/lib/Transforms/Utils/RegionUtils.cpp index 18e079d153161..fc9492efa5805 100644 --- a/mlir/lib/Transforms/Utils/RegionUtils.cpp +++ b/mlir/lib/Transforms/Utils/RegionUtils.cpp @@ -489,6 +489,7 @@ LogicalResult mlir::runRegionDCE(RewriterBase &rewriter, //===----------------------------------------------------------------------===// // BlockEquivalenceData +//===----------------------------------------------------------------------===// namespace { /// This class contains the information for comparing the equivalencies of two @@ -557,6 +558,7 @@ unsigned BlockEquivalenceData::getOrderOf(Value value) const { //===----------------------------------------------------------------------===// // BlockMergeCluster +//===----------------------------------------------------------------------===// namespace { /// This class represents a cluster of blocks to be merged together. diff --git a/mlir/test/lib/Dialect/Test/TestEnumDefs.td b/mlir/test/lib/Dialect/Test/TestEnumDefs.td index 7441ea5a9726b..5b785a600aad2 100644 --- a/mlir/test/lib/Dialect/Test/TestEnumDefs.td +++ b/mlir/test/lib/Dialect/Test/TestEnumDefs.td @@ -77,6 +77,7 @@ def TestBitEnumVerticalBar //===----------------------------------------------------------------------===// // Test Patterns (Multi-result Ops) +//===----------------------------------------------------------------------===// def MultiResultOpKind1: I64EnumAttrCase<"kind1", 1>; def MultiResultOpKind2: I64EnumAttrCase<"kind2", 2>; diff --git a/mlir/test/lib/Dialect/Test/TestOpDefs.cpp b/mlir/test/lib/Dialect/Test/TestOpDefs.cpp index f6b8a0005f285..454a12bac9ab3 100644 --- a/mlir/test/lib/Dialect/Test/TestOpDefs.cpp +++ b/mlir/test/lib/Dialect/Test/TestOpDefs.cpp @@ -730,6 +730,7 @@ LogicalResult TestVerifiersOp::verifyRegions() { //===----------------------------------------------------------------------===// // TestWithBoundsOp +//===----------------------------------------------------------------------===// void TestWithBoundsOp::inferResultRanges(ArrayRef argRanges, SetIntRangeFn setResultRanges) { @@ -738,6 +739,7 @@ void TestWithBoundsOp::inferResultRanges(ArrayRef argRanges, //===----------------------------------------------------------------------===// // TestWithBoundsRegionOp +//===----------------------------------------------------------------------===// ParseResult TestWithBoundsRegionOp::parse(OpAsmParser &parser, OperationState &result) { @@ -771,6 +773,7 @@ void TestWithBoundsRegionOp::inferResultRanges( //===----------------------------------------------------------------------===// // TestIncrementOp +//===----------------------------------------------------------------------===// void TestIncrementOp::inferResultRanges(ArrayRef argRanges, SetIntRangeFn setResultRanges) { @@ -783,6 +786,7 @@ void TestIncrementOp::inferResultRanges(ArrayRef argRanges, //===----------------------------------------------------------------------===// // TestReflectBoundsOp +//===----------------------------------------------------------------------===// void TestReflectBoundsOp::inferResultRanges( ArrayRef argRanges, SetIntRangeFn setResultRanges) { @@ -1124,6 +1128,7 @@ void ReadBufferOp::getEffects( //===----------------------------------------------------------------------===// // TestCallAndStoreOp +//===----------------------------------------------------------------------===// CallInterfaceCallable TestCallAndStoreOp::getCallableForCallee() { return getCallee(); @@ -1143,6 +1148,7 @@ MutableOperandRange TestCallAndStoreOp::getArgOperandsMutable() { //===----------------------------------------------------------------------===// // TestCallOnDeviceOp +//===----------------------------------------------------------------------===// CallInterfaceCallable TestCallOnDeviceOp::getCallableForCallee() { return getCallee(); @@ -1162,6 +1168,7 @@ MutableOperandRange TestCallOnDeviceOp::getArgOperandsMutable() { //===----------------------------------------------------------------------===// // TestStoreWithARegion +//===----------------------------------------------------------------------===// void TestStoreWithARegion::getSuccessorRegions( RegionBranchPoint point, SmallVectorImpl ®ions) { @@ -1173,6 +1180,7 @@ void TestStoreWithARegion::getSuccessorRegions( //===----------------------------------------------------------------------===// // TestStoreWithALoopRegion +//===----------------------------------------------------------------------===// void TestStoreWithALoopRegion::getSuccessorRegions( RegionBranchPoint point, SmallVectorImpl ®ions) { diff --git a/mlir/test/lib/Dialect/Test/TestOps.td b/mlir/test/lib/Dialect/Test/TestOps.td index f653e4465cfef..d8024145e711f 100644 --- a/mlir/test/lib/Dialect/Test/TestOps.td +++ b/mlir/test/lib/Dialect/Test/TestOps.td @@ -1462,6 +1462,7 @@ def TestDialectCanonicalizerOp : TEST_Op<"dialect_canonicalizable"> { //===----------------------------------------------------------------------===// // Test Patterns (Symbol Binding) +//===----------------------------------------------------------------------===// // Test symbol binding. def OpSymbolBindingA : TEST_Op<"symbol_binding_a", []> { @@ -1503,6 +1504,7 @@ def : Pat<(OpSymbolBindingNoResult:$op $operand), //===----------------------------------------------------------------------===// // Test Patterns (Attributes) +//===----------------------------------------------------------------------===// // Test matching against op attributes. def OpAttrMatch1 : TEST_Op<"match_op_attribute1"> { @@ -1618,6 +1620,7 @@ def : Pattern< //===----------------------------------------------------------------------===// // Test Patterns (Variadic Ops) +//===----------------------------------------------------------------------===// def OneVResOneVOperandOp1 : TEST_Op<"one_variadic_out_one_variadic_in1"> { let arguments = (ins Variadic); @@ -1803,6 +1806,7 @@ def : Pat< //===----------------------------------------------------------------------===// // Test Patterns (either) +//===----------------------------------------------------------------------===// def TestEitherOpA : TEST_Op<"either_op_a"> { let arguments = (ins AnyInteger:$arg0, AnyInteger:$arg1, AnyInteger:$arg2); @@ -1845,6 +1849,7 @@ def : Pat<(TestEitherOpB (either (TestEitherHelperOpA I32:$either_helper_0), //===----------------------------------------------------------------------===// // Test Patterns (Location) +//===----------------------------------------------------------------------===// // Test that we can specify locations for generated ops. def : Pat<(TestLocationSrcOp:$res1 @@ -1863,6 +1868,7 @@ def : Pat<(TestLocationSrcNoResOp:$loc //===----------------------------------------------------------------------===// // Test Patterns (Type Builders) +//===----------------------------------------------------------------------===// def SourceOp : TEST_Op<"source_op"> { let arguments = (ins AnyInteger:$arg, AnyI32Attr:$tag); @@ -1913,6 +1919,7 @@ def : Pat<(SourceOp $val, ConstantAttr:$attr), //===----------------------------------------------------------------------===// // Test Patterns (Trailing Directives) +//===----------------------------------------------------------------------===// // Test that we can specify both `location` and `returnType` directives. def : Pat<(SourceOp $val, ConstantAttr:$attr), @@ -2079,6 +2086,7 @@ def ParseB64BytesOp : TEST_Op<"parse_b64"> { //===----------------------------------------------------------------------===// // Test region argument list parsing. +//===----------------------------------------------------------------------===// def IsolatedRegionOp : TEST_Op<"isolated_region", [IsolatedFromAbove]> { let summary = "isolated region operation"; @@ -2139,6 +2147,7 @@ def AffineScopeOp : TEST_Op<"affine_scope", [AffineScope]> { //===----------------------------------------------------------------------===// // Custom printer/parser +//===----------------------------------------------------------------------===// def CustomDimensionListAttrOp : TEST_Op<"custom_dimension_list_attr"> { let description = [{ @@ -2164,6 +2173,7 @@ def OptionalCustomAttrOp : TEST_Op<"optional_custom_attr"> { //===----------------------------------------------------------------------===// // Test OpAsmInterface. +//===----------------------------------------------------------------------===// def AsmInterfaceOp : TEST_Op<"asm_interface_op"> { let results = (outs AnyType:$first, Variadic:$middle_results, diff --git a/mlir/test/lib/Dialect/Test/TestOpsSyntax.cpp b/mlir/test/lib/Dialect/Test/TestOpsSyntax.cpp index 664951f2a11bb..7a9f07030215d 100644 --- a/mlir/test/lib/Dialect/Test/TestOpsSyntax.cpp +++ b/mlir/test/lib/Dialect/Test/TestOpsSyntax.cpp @@ -21,6 +21,7 @@ using namespace test; //===----------------------------------------------------------------------===// // Parsing +//===----------------------------------------------------------------------===// static ParseResult parseCustomOptionalOperand( OpAsmParser &parser, @@ -155,6 +156,7 @@ static ParseResult parseCustomDirectiveOptionalOperandRef( //===----------------------------------------------------------------------===// // Printing +//===----------------------------------------------------------------------===// static void printCustomOptionalOperand(OpAsmPrinter &printer, Operation *, Value optOperand) { @@ -291,6 +293,7 @@ ::llvm::LogicalResult FormatInferType2Op::inferReturnTypes( //===----------------------------------------------------------------------===// // Test WrapRegionOp - wrapping op exercising `parseGenericOperation()`. +//===----------------------------------------------------------------------===// ParseResult WrappingRegionOp::parse(OpAsmParser &parser, OperationState &result) { diff --git a/mlir/test/lib/Dialect/Test/TestOpsSyntax.td b/mlir/test/lib/Dialect/Test/TestOpsSyntax.td index 9c199f0c3b6fc..d9003428e3746 100644 --- a/mlir/test/lib/Dialect/Test/TestOpsSyntax.td +++ b/mlir/test/lib/Dialect/Test/TestOpsSyntax.td @@ -475,6 +475,7 @@ def FormatQualifiedNestedType : TEST_Op<"format_qual_cpmd_nested_type"> { //===----------------------------------------------------------------------===// // Custom Directives +//===----------------------------------------------------------------------===// def FormatCustomDirectiveOperands : TEST_Op<"format_custom_directive_operands", [AttrSizedOperandSegments]> { @@ -599,6 +600,7 @@ def FormatLiteralFollowingOptionalGroup //===----------------------------------------------------------------------===// // AllTypesMatch type inference +//===----------------------------------------------------------------------===// def FormatAllTypesMatchVarOp : TEST_Op<"format_all_types_match_var", [ AllTypesMatch<["value1", "value2", "result"]> @@ -618,6 +620,7 @@ def FormatAllTypesMatchAttrOp : TEST_Op<"format_all_types_match_attr", [ //===----------------------------------------------------------------------===// // TypesMatchWith type inference +//===----------------------------------------------------------------------===// def FormatTypesMatchVarOp : TEST_Op<"format_types_match_var", [ TypesMatchWith<"result type matches operand", "value", "result", "$_self"> @@ -655,6 +658,7 @@ def FormatTypesMatchContextOp : TEST_Op<"format_types_match_context", [ //===----------------------------------------------------------------------===// // InferTypeOpInterface type inference in assembly format +//===----------------------------------------------------------------------===// def FormatInferTypeOp : TEST_Op<"format_infer_type", [InferTypeOpInterface]> { let results = (outs AnyType); diff --git a/mlir/test/lib/Dialect/Test/TestPatterns.cpp b/mlir/test/lib/Dialect/Test/TestPatterns.cpp index bfdcaf431eeff..db02a122872d9 100644 --- a/mlir/test/lib/Dialect/Test/TestPatterns.cpp +++ b/mlir/test/lib/Dialect/Test/TestPatterns.cpp @@ -772,6 +772,7 @@ void TestDerivedAttributeDriver::runOnOperation() { namespace { //===----------------------------------------------------------------------===// // Region-Block Rewrite Testing +//===----------------------------------------------------------------------===// /// This pattern applies a signature conversion to a block inside a detached /// region. @@ -958,6 +959,7 @@ struct TestUndoPropertiesModification : public ConversionPattern { //===----------------------------------------------------------------------===// // Type-Conversion Rewrite Testing +//===----------------------------------------------------------------------===// /// This patterns erases a region operation that has had a type conversion. struct TestDropOpSignatureConversion : public ConversionPattern { diff --git a/mlir/test/mlir-tblgen/op-format-invalid.td b/mlir/test/mlir-tblgen/op-format-invalid.td index 3461f14fa5f01..2f29543f67381 100644 --- a/mlir/test/mlir-tblgen/op-format-invalid.td +++ b/mlir/test/mlir-tblgen/op-format-invalid.td @@ -19,6 +19,7 @@ class TestFormat_Op traits = []> //===----------------------------------------------------------------------===// // attr-dict +//===----------------------------------------------------------------------===// // CHECK: error: 'attr-dict' directive not found def DirectiveAttrDictInvalidA : TestFormat_Op<[{ @@ -38,6 +39,7 @@ def DirectiveAttrDictInvalidD : TestFormat_Op<[{ //===----------------------------------------------------------------------===// // custom +//===----------------------------------------------------------------------===// // CHECK: error: expected '<' before custom directive name def DirectiveCustomInvalidA : TestFormat_Op<[{ @@ -70,6 +72,7 @@ def DirectiveCustomInvalidH : TestFormat_Op<[{ //===----------------------------------------------------------------------===// // functional-type +//===----------------------------------------------------------------------===// // CHECK: error: 'functional-type' is only valid as a top-level directive def DirectiveFunctionalTypeInvalidA : TestFormat_Op<[{ @@ -98,6 +101,7 @@ def DirectiveFunctionalTypeInvalidF : TestFormat_Op<[{ //===----------------------------------------------------------------------===// // operands +//===----------------------------------------------------------------------===// // CHECK: error: 'operands' directive creates overlap in format def DirectiveOperandsInvalidA : TestFormat_Op<[{ @@ -110,6 +114,7 @@ def DirectiveOperandsInvalidB : TestFormat_Op<[{ //===----------------------------------------------------------------------===// // ref +//===----------------------------------------------------------------------===// // CHECK: error: 'ref' is only valid within a `custom` directive def DirectiveRefInvalidA : TestFormat_Op<[{ @@ -193,6 +198,7 @@ def DirectiveRefInvalidO : TestFormat_Op<[{ //===----------------------------------------------------------------------===// // regions +//===----------------------------------------------------------------------===// // CHECK: error: 'regions' directive creates overlap in format def DirectiveRegionsInvalidA : TestFormat_Op<[{ @@ -218,6 +224,7 @@ def DirectiveRegionsInvalidD : TestFormat_Op<[{ //===----------------------------------------------------------------------===// // results +//===----------------------------------------------------------------------===// // CHECK: error: 'results' directive can can only be used as a child to a 'type' directive def DirectiveResultsInvalidA : TestFormat_Op<[{ @@ -226,6 +233,7 @@ def DirectiveResultsInvalidA : TestFormat_Op<[{ //===----------------------------------------------------------------------===// // successors +//===----------------------------------------------------------------------===// // CHECK: error: 'successors' is only valid as a top-level directive def DirectiveSuccessorsInvalidA : TestFormat_Op<[{ @@ -234,6 +242,7 @@ def DirectiveSuccessorsInvalidA : TestFormat_Op<[{ //===----------------------------------------------------------------------===// // type +//===----------------------------------------------------------------------===// // CHECK: error: expected '(' before argument list def DirectiveTypeInvalidA : TestFormat_Op<[{ @@ -250,6 +259,7 @@ def DirectiveTypeInvalidC : TestFormat_Op<[{ //===----------------------------------------------------------------------===// // functional-type/type operands +//===----------------------------------------------------------------------===// // CHECK: error: literals may only be used in the top-level section of the format def DirectiveTypeZOperandInvalidA : TestFormat_Op<[{ diff --git a/mlir/test/mlir-tblgen/op-format-spec.td b/mlir/test/mlir-tblgen/op-format-spec.td index ad2a055bc78b0..02bf65609b21a 100644 --- a/mlir/test/mlir-tblgen/op-format-spec.td +++ b/mlir/test/mlir-tblgen/op-format-spec.td @@ -19,6 +19,7 @@ class TestFormat_Op traits = []> //===----------------------------------------------------------------------===// // attr-dict +//===----------------------------------------------------------------------===// // CHECK-NOT: error def DirectiveAttrDictValidA : TestFormat_Op<[{ @@ -30,6 +31,7 @@ def DirectiveAttrDictValidB : TestFormat_Op<[{ //===----------------------------------------------------------------------===// // custom +//===----------------------------------------------------------------------===// // CHECK-NOT: error def DirectiveCustomValidA : TestFormat_Op<[{ @@ -50,6 +52,7 @@ def DirectiveCustomValidE : TestFormat_Op<[{ //===----------------------------------------------------------------------===// // functional-type +//===----------------------------------------------------------------------===// // CHECK-NOT: error def DirectiveFunctionalTypeValid : TestFormat_Op<[{ @@ -58,6 +61,7 @@ def DirectiveFunctionalTypeValid : TestFormat_Op<[{ //===----------------------------------------------------------------------===// // operands +//===----------------------------------------------------------------------===// // CHECK-NOT: error: def DirectiveOperandsValid : TestFormat_Op<[{ @@ -66,6 +70,7 @@ def DirectiveOperandsValid : TestFormat_Op<[{ //===----------------------------------------------------------------------===// // regions +//===----------------------------------------------------------------------===// // CHECK-NOT: error: def DirectiveRegionsValid : TestFormat_Op<[{ @@ -74,6 +79,7 @@ def DirectiveRegionsValid : TestFormat_Op<[{ //===----------------------------------------------------------------------===// // results +//===----------------------------------------------------------------------===// // CHECK-NOT: error: def DirectiveResultsInvalidA : TestFormat_Op<[{ @@ -82,6 +88,7 @@ def DirectiveResultsInvalidA : TestFormat_Op<[{ //===----------------------------------------------------------------------===// // successors +//===----------------------------------------------------------------------===// // CHECK-NOT: error: def DirectiveSuccessorsInvalidA : TestFormat_Op<[{ @@ -90,6 +97,7 @@ def DirectiveSuccessorsInvalidA : TestFormat_Op<[{ //===----------------------------------------------------------------------===// // type +//===----------------------------------------------------------------------===// // CHECK-NOT: error: def DirectiveTypeValid : TestFormat_Op<[{ diff --git a/mlir/test/mlir-tblgen/op-format.td b/mlir/test/mlir-tblgen/op-format.td index 73f9315f6bcfe..09e068b91a40b 100644 --- a/mlir/test/mlir-tblgen/op-format.td +++ b/mlir/test/mlir-tblgen/op-format.td @@ -16,6 +16,7 @@ class TestFormat_Op traits = []> //===----------------------------------------------------------------------===// // custom +//===----------------------------------------------------------------------===// // CHECK-LABEL: CustomStringLiteralA::parse // CHECK: parseFoo({{.*}}, parser.getBuilder().getI1Type()) diff --git a/mlir/tools/mlir-tblgen/AttrOrTypeDefGen.cpp b/mlir/tools/mlir-tblgen/AttrOrTypeDefGen.cpp index 4ab3e9250c29d..cf0d827942949 100644 --- a/mlir/tools/mlir-tblgen/AttrOrTypeDefGen.cpp +++ b/mlir/tools/mlir-tblgen/AttrOrTypeDefGen.cpp @@ -444,6 +444,7 @@ void DefGen::emitInterfaceMethods() { //===----------------------------------------------------------------------===// // Builder Emission +//===----------------------------------------------------------------------===// SmallVector DefGen::getBuilderParams(std::initializer_list prefix) const { @@ -546,6 +547,7 @@ void DefGen::emitCheckedCustomBuilder(const AttrOrTypeBuilder &builder) { //===----------------------------------------------------------------------===// // Interface Method Emission +//===----------------------------------------------------------------------===// void DefGen::emitTraitMethods(const InterfaceTrait &trait) { // Get the set of methods that should always be declared. @@ -577,6 +579,7 @@ void DefGen::emitTraitMethod(const InterfaceMethod &method) { //===----------------------------------------------------------------------===// // Storage Class Emission +//===----------------------------------------------------------------------===// void DefGen::emitStorageConstructor() { Constructor *ctor = @@ -1079,6 +1082,7 @@ bool {0}(::mlir::Type type) { //===----------------------------------------------------------------------===// // AttrDef +//===----------------------------------------------------------------------===// static llvm::cl::OptionCategory attrdefGenCat("Options for -gen-attrdef-*"); static llvm::cl::opt @@ -1101,6 +1105,7 @@ static mlir::GenRegistration //===----------------------------------------------------------------------===// // TypeDef +//===----------------------------------------------------------------------===// static llvm::cl::OptionCategory typedefGenCat("Options for -gen-typedef-*"); static llvm::cl::opt diff --git a/mlir/tools/mlir-tblgen/FormatGen.cpp b/mlir/tools/mlir-tblgen/FormatGen.cpp index d145f3e5a23dd..dd9b41bc90aef 100644 --- a/mlir/tools/mlir-tblgen/FormatGen.cpp +++ b/mlir/tools/mlir-tblgen/FormatGen.cpp @@ -223,6 +223,7 @@ FailureOr> FormatParser::parse() { //===----------------------------------------------------------------------===// // Element Parsing +//===----------------------------------------------------------------------===// FailureOr FormatParser::parseElement(Context ctx) { if (curToken.is(FormatToken::literal)) diff --git a/mlir/tools/mlir-tblgen/OpFormatGen.cpp b/mlir/tools/mlir-tblgen/OpFormatGen.cpp index 3a7a7aaf3a5dd..ca2c1d4a8ad04 100644 --- a/mlir/tools/mlir-tblgen/OpFormatGen.cpp +++ b/mlir/tools/mlir-tblgen/OpFormatGen.cpp @@ -35,6 +35,7 @@ using llvm::StringMap; //===----------------------------------------------------------------------===// // VariableElement +//===----------------------------------------------------------------------===// namespace { /// This class represents an instance of an op variable element. A variable @@ -140,6 +141,7 @@ struct AttributeLikeVariable : public VariableElement { //===----------------------------------------------------------------------===// // DirectiveElement +//===----------------------------------------------------------------------===// namespace { /// This class represents the `operands` directive. This directive represents @@ -424,6 +426,7 @@ struct OperationFormat { //===----------------------------------------------------------------------===// // Parser Gen +//===----------------------------------------------------------------------===// /// Returns true if we can format the given attribute as an enum in the /// parser format. @@ -1951,6 +1954,7 @@ void OperationFormat::genParserVariadicSegmentResolution(Operator &op, //===----------------------------------------------------------------------===// // PrinterGen +//===----------------------------------------------------------------------===// /// The code snippet used to generate a printer call for a region of an // operation that has the SingleBlockImplicitTerminator trait.