Skip to content

Commit

Permalink
[NFC] Bump LLVM over mnemonic change (#6563)
Browse files Browse the repository at this point in the history
  • Loading branch information
darthscsi authored Jan 9, 2024
1 parent 258de7b commit ccdef17
Show file tree
Hide file tree
Showing 6 changed files with 111 additions and 4 deletions.
18 changes: 18 additions & 0 deletions include/circt/Dialect/FIRRTL/FIRRTLAttributes.td
Original file line number Diff line number Diff line change
Expand Up @@ -82,41 +82,59 @@ def AugmentedBundleType : AugmentedType<"AugmentedBundleType"> {
hasPrefix # [{
bool isRoot() { return getID() != nullptr; }
}];
let mnemonic = "augmentedBundle";
let assemblyFormat = "`<` $underlying `>`";
}

def AugmentedVectorType : AugmentedType<"AugmentedVectorType"> {
let summary = "GrandCentral AugmentedVectorType";
let extraClassDeclaration = defaultClassDeclaration # hasElements;
let mnemonic = "augmentedVector";
let assemblyFormat = "`<` $underlying `>`";
}

def AugmentedGroundType : AugmentedType<"AugmentedGroundType"> {
let summary = "GrandCentral AugmentedGroundType";
let extraClassDeclaration = hasID # hasName;
let mnemonic = "augmentedGround";
let assemblyFormat = "`<` $underlying `>`";
}

def AugmentedStringType : AugmentedType<"AugmentedStringType"> {
let summary = "GrandCentral AugmentedStringType";
let extraClassDeclaration = hasName;
let mnemonic = "augmentedString";
let assemblyFormat = "`<` $underlying `>`";
}
def AugmentedBooleanType : AugmentedType<"AugmentedBooleanType"> {
let summary = "GrandCentral AugmentedBooleanType";
let extraClassDeclaration = hasName;
let mnemonic = "augmentedBoolean";
let assemblyFormat = "`<` $underlying `>`";
}
def AugmentedIntegerType : AugmentedType<"AugmentedIntegerType"> {
let summary = "GrandCentral AugmentedIntegerType";
let extraClassDeclaration = hasName;
let mnemonic = "augmentedInteger";
let assemblyFormat = "`<` $underlying `>`";
}
def AugmentedDoubleType : AugmentedType<"AugmentedDoubleType"> {
let summary = "GrandCentral AugmentedDoubleType";
let extraClassDeclaration = hasName;
let mnemonic = "augmentedDouble";
let assemblyFormat = "`<` $underlying `>`";
}
def AugmentedLiteralType : AugmentedType<"AugmentedLiteralType"> {
let summary = "GrandCentral AugmentedLiteralType";
let extraClassDeclaration = hasName;
let mnemonic = "augmentedLiteral";
let assemblyFormat = "`<` $underlying `>`";
}
def AugmentedDeletedType : AugmentedType<"AugmentedDeletedType"> {
let summary = "GrandCentral AugmentedDeletedType";
let extraClassDeclaration = hasName;
let mnemonic = "augmentedDeleted";
let assemblyFormat = "`<` $underlying `>`";
}


Expand Down
21 changes: 21 additions & 0 deletions include/circt/Dialect/FIRRTL/FIRRTLTypesImpl.td
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def SIntImpl : FIRRTLImplType<"SInt",
TypeBuilder<(ins)>,
];
let genVerifyDecl = true;
let typeName = "firrtl.sint";
let extraClassDeclaration = [{
using WidthQualifiedTypeTrait<SIntType>::getWidth;
using WidthQualifiedTypeTrait<SIntType>::hasWidth;
Expand All @@ -66,6 +67,7 @@ def UIntImpl : FIRRTLImplType<"UInt",
TypeBuilder<(ins)>,
];
let genVerifyDecl = true;
let typeName = "firrtl.uint";
let extraClassDeclaration = [{
using WidthQualifiedTypeTrait<UIntType>::getWidth;
using WidthQualifiedTypeTrait<UIntType>::hasWidth;
Expand All @@ -78,6 +80,7 @@ def ClockTypeImpl : FIRRTLImplType<"Clock"> {
let summary = "Clock signal";
let parameters = (ins "bool":$isConst);
let storageClass = "FIRRTLBaseTypeStorage";
let typeName = "firrtl.clock";
let builders = [
TypeBuilder<(ins), [{
return $_get($_ctxt, false);
Expand All @@ -92,6 +95,7 @@ def ResetTypeImpl : FIRRTLImplType<"Reset"> {
let summary = "Reset Signal";
let parameters = (ins "bool":$isConst);
let storageClass = "FIRRTLBaseTypeStorage";
let typeName = "firrtl.reset";
let builders = [
TypeBuilder<(ins), [{
return $_get($_ctxt, false);
Expand All @@ -106,6 +110,7 @@ def AsyncResetTypeImpl : FIRRTLImplType<"AsyncReset"> {
let summary = "AsyncReset signal";
let parameters = (ins "bool":$isConst);
let storageClass = "FIRRTLBaseTypeStorage";
let typeName = "firrtl.asyncreset";
let builders = [
TypeBuilder<(ins), [{
return $_get($_ctxt, false);
Expand All @@ -121,6 +126,7 @@ def AnalogTypeImpl : FIRRTLImplType<"Analog",
let summary = "Analog signal";
let parameters = (ins "int32_t":$widthOrSentinel, "bool":$isConst);
let storageClass = "WidthTypeStorage";
let typeName = "firrtl.analog";
let builders = [
TypeBuilder<(ins "std::optional<int32_t>":$width, CArg<"bool", "false">:$isConst)>,
TypeBuilder<(ins)>,
Expand Down Expand Up @@ -173,6 +179,7 @@ class BaseVectorTypeImpl<string name, string ElementType, list<Trait> traits = [
}

def FVectorImpl : BaseVectorTypeImpl<"FVector","::circt::firrtl::FIRRTLBaseType"> {
let typeName = "firrtl.vector";
let firrtlExtraClassDeclaration = [{
/// Return this type with any flip types recursively removed from itself.
FIRRTLBaseType getPassiveType();
Expand All @@ -187,6 +194,7 @@ def FVectorImpl : BaseVectorTypeImpl<"FVector","::circt::firrtl::FIRRTLBaseType"

def OpenVectorImpl : BaseVectorTypeImpl<"OpenVector","::circt::firrtl::FIRRTLType"> {
let genVerifyDecl = 1;
let typeName = "firrtl.openvector";
}

class BaseBundleTypeImpl<string name, string ElementType, list<Trait> traits = [], string BaseType = ElementType>
Expand Down Expand Up @@ -270,6 +278,7 @@ class BaseBundleTypeImpl<string name, string ElementType, list<Trait> traits = [
}

def BundleImpl : BaseBundleTypeImpl<"Bundle","::circt::firrtl::FIRRTLBaseType"> {
let typeName = "firrtl.bundle";
let firrtlExtraClassDeclaration = [{
/// Return this type with any flip types recursively removed from itself.
FIRRTLBaseType getPassiveType();
Expand All @@ -283,6 +292,7 @@ def BundleImpl : BaseBundleTypeImpl<"Bundle","::circt::firrtl::FIRRTLBaseType">
}

def OpenBundleImpl : BaseBundleTypeImpl<"OpenBundle","::circt::firrtl::FIRRTLType"> {
let typeName = "firrtl.openbundle";
let genVerifyDecl = 1;
}

Expand All @@ -291,6 +301,7 @@ def FEnumImpl : FIRRTLImplType<"FEnum", [DeclareTypeInterfaceMethods<FieldIDType
let parameters = (ins "ArrayRef<EnumElement>":$elements, "bool":$isConst);
let storageClass = "FEnumTypeStorage";
let genVerifyDecl = true;
let typeName = "firrtl.enum";
let skipDefaultBuilders = true;
let builders = [
TypeBuilder<(ins "ArrayRef<EnumElement>":$elements, CArg<"bool", "false">:$isConst)>
Expand Down Expand Up @@ -384,6 +395,7 @@ def RefImpl : FIRRTLImplType<"Ref",
let genAccessors = true;
let genStorageClass = true;
let genVerifyDecl = true;
let typeName = "firrtl.ref";

let skipDefaultBuilders = true;
let builders = [
Expand All @@ -404,6 +416,7 @@ def BaseTypeAliasImpl : FIRRTLImplType<"BaseTypeAlias", [DeclareTypeInterfaceMet
(ins "StringAttr":$name, TypeParameter<"::circt::firrtl::FIRRTLBaseType",
"An inner type">:$innerType);
let storageClass = "BaseTypeAliasStorage";
let typeName = "firrtl.basetypealias";
let genAccessors = true;
let skipDefaultBuilders = true;
let extraClassDeclaration = [{
Expand Down Expand Up @@ -451,6 +464,7 @@ def ClassImpl : PropImplType<"Class", [
ArrayRefParameter<"ClassElement">:$elements
);
let genStorageClass = false;
let typeName = "firrtl.propClass";
let genAccessors = false;
let builders = [
TypeBuilderWithInferredContext<(ins
Expand Down Expand Up @@ -490,44 +504,51 @@ def AnyRefImpl : PropImplType<"AnyRef"> {
about the referred to object's fields, so subfield access, etc. is illegal.
}];
let genStorageClass = true;
let typeName = "firrtl.propRef";
}

def StringImpl : PropImplType<"String"> {
let summary = "An unlimited length string type. Not representable in hardware.";
let parameters = (ins);
let genStorageClass = true;
let typeName = "firrtl.propString";
}

def IntegerImpl : PropImplType<"FInteger"> {
let summary = "An unlimited length signed integer type. Not representable in hardware.";
let parameters = (ins);
let genStorageClass = true;
let typeName = "firrtl.propInt";
}

def ListImpl : PropImplType<"List"> {
let summary = "A typed property list of any length. Not representable in hardware.";
let parameters = (ins TypeParameter<"circt::firrtl::PropertyType", "element type">:$elementType);
let genStorageClass = true;
let genAccessors = true;
let typeName = "firrtl.propList";
}

def PathImpl : PropImplType<"Path"> {
let summary = "A path to a hardware entity. Not representable in hardware.";
let parameters = (ins);
let genStorageClass = true;
let genAccessors = true;
let typeName = "firrtl.propPath";
}

def BoolImpl : PropImplType<"Bool"> {
let summary = "A boolean property. Not representable in hardware.";
let parameters = (ins);
let genStorageClass = true;
let typeName = "firrtl.propBool";
}

def DoubleImpl : PropImplType<"Double"> {
let summary = "A double property. Not representable in hardware.";
let parameters = (ins);
let genStorageClass = true;
let typeName = "firrtl.propDouble";
}

#endif // CIRCT_DIALECT_FIRRTL_FIRRTLTYPESIMPL_TD
Loading

0 comments on commit ccdef17

Please sign in to comment.