[Mlir-commits] [mlir] ba0aa2e - [mlir][bytecodegen] Remove comments (NFC).
Jacques Pienaar
llvmlistbot at llvm.org
Sun Jun 4 14:19:48 PDT 2023
Author: Jacques Pienaar
Date: 2023-06-04T14:19:40-07:00
New Revision: ba0aa2ec1cdd0a70e9b896c08d303e887606893c
URL: https://github.com/llvm/llvm-project/commit/ba0aa2ec1cdd0a70e9b896c08d303e887606893c
DIFF: https://github.com/llvm/llvm-project/commit/ba0aa2ec1cdd0a70e9b896c08d303e887606893c.diff
LOG: [mlir][bytecodegen] Remove comments (NFC).
Fix missed review comment from https://reviews.llvm.org/D144820
Added:
Modified:
mlir/include/mlir/IR/BuiltinDialectBytecode.td
Removed:
################################################################################
diff --git a/mlir/include/mlir/IR/BuiltinDialectBytecode.td b/mlir/include/mlir/IR/BuiltinDialectBytecode.td
index a2aab3ad96a75..8bae2537f41c4 100644
--- a/mlir/include/mlir/IR/BuiltinDialectBytecode.td
+++ b/mlir/include/mlir/IR/BuiltinDialectBytecode.td
@@ -32,44 +32,23 @@ def String :
WithGetter <"$_attrType",
WithType <"StringRef">>>>>;
-// enum AttributeCode {
-// /// ArrayAttr {
-// /// elements: Attribute[]
-// /// }
-// ///
-// kArrayAttr = 0,
-//
def ArrayAttr : DialectAttribute<(attr
Array<Attribute>:$value
)>;
let cType = "StringAttr" in {
-// /// StringAttr {
-// /// value: string
-// /// }
-// kStringAttr = 2,
def StringAttr : DialectAttribute<(attr
String:$value
)> {
let printerPredicate = "::llvm::isa<NoneType>($_val.getType())";
}
-// /// StringAttrWithType {
-// /// value: string,
-// /// type: Type
-// /// }
-// /// A variant of StringAttr with a type.
-// kStringAttrWithType = 3,
def StringAttrWithType : DialectAttribute<(attr
String:$value,
Type:$type
)> { let printerPredicate = "!::llvm::isa<NoneType>($_val.getType())"; }
}
-// /// DictionaryAttr {
-// /// attrs: <StringAttr, Attribute>[]
-// /// }
-// kDictionaryAttr = 1,
def NamedAttribute : CompositeBytecode {
dag members = (attr
StringAttr:$name,
@@ -81,43 +60,21 @@ def DictionaryAttr : DialectAttribute<(attr
Array<NamedAttribute>:$value
)>;
-// /// FlatSymbolRefAttr {
-// /// rootReference: StringAttr
-// /// }
-// /// A variant of SymbolRefAttr with no leaf references.
-// kFlatSymbolRefAttr = 4,
def FlatSymbolRefAttr: DialectAttribute<(attr
StringAttr:$rootReference
)>;
-// /// SymbolRefAttr {
-// /// rootReference: StringAttr,
-// /// leafReferences: FlatSymbolRefAttr[]
-// /// }
-// kSymbolRefAttr = 5,
def SymbolRefAttr: DialectAttribute<(attr
StringAttr:$rootReference,
Array<FlatSymbolRefAttr>:$nestedReferences
)>;
-// /// TypeAttr {
-// /// value: Type
-// /// }
-// kTypeAttr = 6,
def TypeAttr: DialectAttribute<(attr
Type:$value
)>;
-// /// UnitAttr {
-// /// }
-// kUnitAttr = 7,
def UnitAttr: DialectAttribute<(attr)>;
-// /// IntegerAttr {
-// /// type: Type
-// /// value: APInt,
-// /// }
-// kIntegerAttr = 8,
def IntegerAttr: DialectAttribute<(attr
Type:$type,
KnownWidthAPInt<"type">:$value
@@ -125,12 +82,6 @@ def IntegerAttr: DialectAttribute<(attr
let cBuilder = "get<$_resultType>(context, type, *value)";
}
-//
-// /// FloatAttr {
-// /// type: FloatType
-// /// value: APFloat
-// /// }
-// kFloatAttr = 9,
defvar FloatType = Type;
def FloatAttr : DialectAttribute<(attr
FloatType:$type,
@@ -139,22 +90,11 @@ def FloatAttr : DialectAttribute<(attr
let cBuilder = "get<$_resultType>(context, type, *value)";
}
-// /// CallSiteLoc {
-// /// callee: LocationAttr,
-// /// caller: LocationAttr
-// /// }
-// kCallSiteLoc = 10,
def CallSiteLoc : DialectAttribute<(attr
LocationAttr:$callee,
LocationAttr:$caller
)>;
-// /// FileLineColLoc {
-// /// filename: StringAttr,
-// /// line: varint,
-// /// column: varint
-// /// }
-// kFileLineColLoc = 11,
def FileLineColLoc : DialectAttribute<(attr
StringAttr:$filename,
VarInt:$line,
@@ -163,22 +103,12 @@ def FileLineColLoc : DialectAttribute<(attr
let cType = "FusedLoc",
cBuilder = "cast<FusedLoc>(get<FusedLoc>(context, $_args))" in {
-// /// FusedLoc {
-// /// locations: Location[]
-// /// }
-// kFusedLoc = 12,
def FusedLoc : DialectAttribute<(attr
Array<Location>:$locations
)> {
let printerPredicate = "!$_val.getMetadata()";
}
-// /// FusedLocWithMetadata {
-// /// locations: LocationAttr[],
-// /// metadata: Attribute
-// /// }
-// /// A variant of FusedLoc with metadata.
-// kFusedLocWithMetadata = 13,
def FusedLocWithMetadata : DialectAttribute<(attr
Array<Location>:$locations,
Attribute:$metadata
@@ -187,26 +117,13 @@ def FusedLocWithMetadata : DialectAttribute<(attr
}
}
-// /// NameLoc {
-// /// name: StringAttr,
-// /// childLoc: LocationAttr
-// /// }
-// kNameLoc = 14,
def NameLoc : DialectAttribute<(attr
StringAttr:$name,
LocationAttr:$childLoc
)>;
-// /// UnknownLoc {
-// /// }
-// kUnknownLoc = 15,
def UnknownLoc : DialectAttribute<(attr)>;
-// /// DenseResourceElementsAttr {
-// /// type: ShapedType,
-// /// handle: ResourceHandle
-// /// }
-// kDenseResourceElementsAttr = 16,
def DenseResourceElementsAttr : DialectAttribute<(attr
ShapedType:$type,
ResourceHandle<"DenseResourceElementsHandle">:$rawHandle
@@ -216,12 +133,6 @@ def DenseResourceElementsAttr : DialectAttribute<(attr
}
let cType = "RankedTensorType" in {
-// /// RankedTensorType {
-// /// shape: svarint[],
-// /// elementType: Type,
-// /// }
-// ///
-// kRankedTensorType = 13,
def RankedTensorType : DialectType<(type
Array<SignedVarInt>:$shape,
Type:$elementType
@@ -229,13 +140,6 @@ def RankedTensorType : DialectType<(type
let printerPredicate = "!$_val.getEncoding()";
}
-// /// RankedTensorTypeWithEncoding {
-// /// encoding: Attribute,
-// /// shape: svarint[],
-// /// elementType: Type
-// /// }
-// /// Variant of RankedTensorType with an encoding.
-// kRankedTensorTypeWithEncoding = 14,
def RankedTensorTypeWithEncoding : DialectType<(type
Attribute:$encoding,
Array<SignedVarInt>:$shape,
@@ -247,23 +151,12 @@ def RankedTensorTypeWithEncoding : DialectType<(type
}
}
-// /// DenseArrayAttr {
-// /// elementType: Type,
-// /// size: varint
-// /// data: blob
-// /// }
-// kDenseArrayAttr = 17,
def DenseArrayAttr : DialectAttribute<(attr
Type:$elementType,
VarInt:$size,
Blob:$rawData
)>;
-// /// DenseIntOrFPElementsAttr {
-// /// type: ShapedType,
-// /// data: blob
-// /// }
-// kDenseIntOrFPElementsAttr = 18,
def DenseElementsAttr : WithType<"DenseElementsAttr", Attribute>;
def DenseIntOrFPElementsAttr : DialectAttribute<(attr
ShapedType:$type,
@@ -272,12 +165,6 @@ def DenseIntOrFPElementsAttr : DialectAttribute<(attr
let cBuilder = "cast<$_resultType>($_resultType::getFromRawBuffer($_args))";
}
-// /// DenseStringElementsAttr {
-// /// type: ShapedType,
-// /// isSplat: varint,
-// /// data: string[]
-// /// }
-// kDenseStringElementsAttr = 19,
def DenseStringElementsAttr : DialectAttribute<(attr
ShapedType:$type,
WithGetter<"$_attrType.isSplat()", VarInt>:$_isSplat,
@@ -287,12 +174,6 @@ def DenseStringElementsAttr : DialectAttribute<(attr
WithPrinter<"writePotentiallySplatString($_writer, $_name)">>>>:$rawStringData
)>;
-// /// SparseElementsAttr {
-// /// type: ShapedType,
-// /// indices: DenseIntElementsAttr,
-// /// values: DenseElementsAttr
-// /// }
-// kSparseElementsAttr = 20,
def DenseIntElementsAttr : WithType<"DenseIntElementsAttr", Attribute>;
def SparseElementsAttr : DialectAttribute<(attr
ShapedType:$type,
@@ -303,12 +184,6 @@ def SparseElementsAttr : DialectAttribute<(attr
// Types
// -----
-// enum TypeCode {
-// /// IntegerType {
-// /// widthAndSignedness: varint // (width << 2) | (signedness)
-// /// }
-// ///
-// kIntegerType = 0,
def IntegerType : DialectType<(type
// Yes not pretty,
WithParser<"succeeded($_reader.readVarInt($_var))",
@@ -321,65 +196,25 @@ def IntegerType : DialectType<(type
"static_cast<IntegerType::SignednessSemantics>(_widthAndSignedness & 0x3)">:$signedness
)>;
-//
-// /// IndexType {
-// /// }
-// ///
-// kIndexType = 1,
def IndexType : DialectType<(type)>;
-// /// FunctionType {
-// /// inputs: Type[],
-// /// results: Type[]
-// /// }
-// ///
-// kFunctionType = 2,
def FunctionType : DialectType<(type
Array<Type>:$inputs,
Array<Type>:$results
)>;
-// /// BFloat16Type {
-// /// }
-// ///
-// kBFloat16Type = 3,
def BFloat16Type : DialectType<(type)>;
-// /// Float16Type {
-// /// }
-// ///
-// kFloat16Type = 4,
def Float16Type : DialectType<(type)>;
-// /// Float32Type {
-// /// }
-// ///
-// kFloat32Type = 5,
def Float32Type : DialectType<(type)>;
-// /// Float64Type {
-// /// }
-// ///
-// kFloat64Type = 6,
def Float64Type : DialectType<(type)>;
-// /// Float80Type {
-// /// }
-// ///
-// kFloat80Type = 7,
def Float80Type : DialectType<(type)>;
-// /// Float128Type {
-// /// }
-// ///
-// kFloat128Type = 8,
def Float128Type : DialectType<(type)>;
-// /// ComplexType {
-// /// elementType: Type
-// /// }
-// ///
-// kComplexType = 9,
def ComplexType : DialectType<(type
Type:$elementType
)>;
@@ -387,13 +222,6 @@ def ComplexType : DialectType<(type
def MemRefLayout: WithType<"MemRefLayoutAttrInterface", Attribute>;
let cType = "MemRefType" in {
-// /// MemRefType {
-// /// shape: svarint[],
-// /// elementType: Type,
-// /// layout: Attribute
-// /// }
-// ///
-// kMemRefType = 10,
def MemRefType : DialectType<(type
Array<SignedVarInt>:$shape,
Type:$elementType,
@@ -402,14 +230,6 @@ def MemRefType : DialectType<(type
let printerPredicate = "!$_val.getMemorySpace()";
}
-// /// MemRefTypeWithMemSpace {
-// /// memorySpace: Attribute,
-// /// shape: svarint[],
-// /// elementType: Type,
-// /// layout: Attribute
-// /// }
-// /// Variant of MemRefType with non-default memory space.
-// kMemRefTypeWithMemSpace = 11,
def MemRefTypeWithMemSpace : DialectType<(type
Attribute:$memorySpace,
Array<SignedVarInt>:$shape,
@@ -422,26 +242,13 @@ def MemRefTypeWithMemSpace : DialectType<(type
}
}
-// /// NoneType {
-// /// }
-// ///
-// kNoneType = 12,
def NoneType : DialectType<(type)>;
-// /// TupleType {
-// /// elementTypes: Type[]
-// /// }
-// kTupleType = 15,
def TupleType : DialectType<(type
Array<Type>:$types
)>;
let cType = "UnrankedMemRefType" in {
-// /// UnrankedMemRefType {
-// /// elementType: Type
-// /// }
-// ///
-// kUnrankedMemRefType = 16,
def UnrankedMemRefType : DialectType<(type
Type:$elementType
)> {
@@ -449,12 +256,6 @@ def UnrankedMemRefType : DialectType<(type
let cBuilder = "get<$_resultType>(context, elementType, Attribute())";
}
-// /// UnrankedMemRefTypeWithMemSpace {
-// /// memorySpace: Attribute,
-// /// elementType: Type
-// /// }
-// /// Variant of UnrankedMemRefType with non-default memory space.
-// kUnrankedMemRefTypeWithMemSpace = 17,
def UnrankedMemRefTypeWithMemSpace : DialectType<(type
Attribute:$memorySpace,
Type:$elementType
@@ -465,22 +266,11 @@ def UnrankedMemRefTypeWithMemSpace : DialectType<(type
}
}
-// /// UnrankedTensorType {
-// /// elementType: Type
-// /// }
-// ///
-// kUnrankedTensorType = 18,
def UnrankedTensorType : DialectType<(type
Type:$elementType
)>;
let cType = "VectorType" in {
-// /// VectorType {
-// /// shape: svarint[],
-// /// elementType: Type
-// /// }
-// ///
-// kVectorType = 19,
def VectorType : DialectType<(type
Array<SignedVarInt>:$shape,
Type:$elementType
@@ -488,13 +278,6 @@ def VectorType : DialectType<(type
let printerPredicate = "!$_val.getNumScalableDims()";
}
-// /// VectorTypeWithScalableDims {
-// /// numScalableDims: varint,
-// /// shape: svarint[],
-// /// elementType: Type
-// /// }
-// /// Variant of VectorType with scalable dimensions.
-// kVectorTypeWithScalableDims = 20,
def VectorTypeWithScalableDims : DialectType<(type
VarInt:$numScalableDims,
Array<SignedVarInt>:$shape,
More information about the Mlir-commits
mailing list