Skip to content

[circt-reduce] Add list-create-element-remover reduction#9603

Merged
seldridge merged 3 commits intomainfrom
dev/seldridge/firrtl-circt-reduce-list-create-reducer
Feb 4, 2026
Merged

[circt-reduce] Add list-create-element-remover reduction#9603
seldridge merged 3 commits intomainfrom
dev/seldridge/firrtl-circt-reduce-list-create-reducer

Conversation

@seldridge
Copy link
Member

Add a new reduction pattern that removes individual elements from
FIRRTL list.create operations. This generates one match per element
in each list, allowing selective removal of elements during test case
reduction.

Lists can be any size afterwards, including zero-size.

AI-assisted-by: Augment (Claude Sonnet 4.5)

Add a new reduction pattern that removes individual elements from
FIRRTL list.create operations. This generates one match per element
in each list, allowing selective removal of elements during test case
reduction.

Lists can be any size afterwards, including zero-size.

Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
AI-assisted-by: Augment (Claude Sonnet 4.5)
@seldridge seldridge added FIRRTL Involving the `firrtl` dialect Reducer Related to `circt-reduce` labels Feb 4, 2026
@seldridge
Copy link
Member Author

Note: this could likely be better handled with changing the constantifier to introduce UnkonwnValueOp, changing UnkonwnValueOp to not have MemAlloc effects on its result, and then adding folders of UnknownValueOp. That said, this may still be useful as a stopgap as this empirically got me a 93% reduction on a test I've been reducing. 🙃

@seldridge seldridge marked this pull request as ready for review February 4, 2026 06:28
@seldridge seldridge requested a review from darthscsi as a code owner February 4, 2026 06:28
Copy link
Contributor

@fabianschuiki fabianschuiki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! This is going to be a very handy reduction. I've run into this pattern of long lists quite a bit in the past. 🥇

@seldridge seldridge merged commit 61a7b8a into main Feb 4, 2026
7 checks passed
@seldridge seldridge deleted the dev/seldridge/firrtl-circt-reduce-list-create-reducer branch February 4, 2026 17:16
Arya-Golkari pushed a commit to Arya-Golkari/circt that referenced this pull request Feb 7, 2026
Add a new reduction pattern that removes individual elements from
FIRRTL list.create operations. This generates one match per element
in each list, allowing selective removal of elements during test case
reduction.

Lists can be any size afterwards, including zero-size.

Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
AI-assisted-by: Augment (Claude Sonnet 4.5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FIRRTL Involving the `firrtl` dialect Reducer Related to `circt-reduce`

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants