Skip to content

[FIRRTL] Dedup: fix non-deduplicatable public module handling#9702

Merged
youngar merged 1 commit intollvm:mainfrom
youngar:dedup
Feb 19, 2026
Merged

[FIRRTL] Dedup: fix non-deduplicatable public module handling#9702
youngar merged 1 commit intollvm:mainfrom
youngar:dedup

Conversation

@youngar
Copy link
Member

@youngar youngar commented Feb 19, 2026

When two equivalent public modules cannot be deduplicated into each other, the pass was failing to record the module in the deduplication map. When a parent module looks up such a module when renaming its children, it would see a null attribute, and think that child was equal to any other unmapped child, which could cause parent modules to dedup when their children did not. This change fixes the issue by making sure we record the self-mapping of non-deduplicatable modules before continuing to the next module.

@youngar youngar added the FIRRTL Involving the `firrtl` dialect label Feb 19, 2026
Copy link
Member

@seldridge seldridge left a comment

Choose a reason for hiding this comment

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

LGTM

When we decide to skip deduplicating a module, we must record its name
as being mapped to itself in the dedup map.  This was, incorrectly, not
done for modules which were skipped due to being public, and this change
fixes that.
@youngar youngar merged commit b2ab3af into llvm:main Feb 19, 2026
7 checks passed
@youngar youngar linked an issue Feb 19, 2026 that may be closed by this pull request
@youngar youngar deleted the dedup branch February 19, 2026 07:39
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.

[FIRRTL] Dedup Error w/ Hierarchical Paths

2 participants