Skip to content

Conversation

@youngar
Copy link
Member

@youngar youngar commented Jul 19, 2025

This makes enums behave more like ground types, but doesn't quite take the jump and make them ground types. It removes the ability to index into enum variants using field refs, which was used produce error messages in InferWidths (and enums no longer support having unknown widths). This change adds some helpers to determine the sizes of enumerations.

This change modifes InferWidths to to take advantage of the fact that enumerations do not support containing uninferred widths, and removes some now dead code. In addition to this, field refs no longer index into the variants of an enum type, so we can handle them in a similar way to ground types.

This makes enums behave more like ground types, but doesn't quite take
the jump and make them ground types.  It removes the ability to index
into enum variants using field refs, which was used produce error
messages in InferWidths (and enums no longer support having unknown
widths).  This change adds some helpers to determine the sizes of
enumerations.

This change modifes InferWidths to to take advantage of the fact that
enumerations do not support containing uninferred widths, and removes
some dead code.  In addition to this, field refs no longer index into
the variants of an enum type, so we can handle them in a similar way to
ground types.
@youngar youngar added the FIRRTL Involving the `firrtl` dialect label Jul 19, 2025
@youngar youngar merged commit 0c5f60c into llvm:main Jul 22, 2025
7 checks passed
@youngar youngar deleted the firrt-enum-notaggregates branch July 22, 2025 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FIRRTL Involving the `firrtl` dialect

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant