Skip to content

Commit b49ac30

Browse files
[FIRRTL] Update more symbol-sensitive ops after dedup (#9016)
The Dedup pass currently handles module instances and class objects explictly in order to update the referenced module/class after deduplication. This does not consider types and attributes on any other operations, such as wires with a `!firrtl.class<...>` type. These also need to be updated. Instead of adding more special cases, make use of the attribute/type walker and replacer infrastructure of MLIR that now works properly with FIRRTL types. When hashing a module, take note of all operations that have a symbol name nested somewhere in their attributes of types, and store them in a `symbolSensitiveOps` list as part of the module info. Once deduplication is done, visit those ops and replace all occurrences of outdated symbols with their post-dedup replacement. This can get rid of the special handling of ClassOp and ObjectOp, and also covers WireOp and attributes/types on any other op. This came up as a dedup failure in a real-world design.
1 parent 12265b9 commit b49ac30

File tree

2 files changed

+185
-154
lines changed

2 files changed

+185
-154
lines changed

0 commit comments

Comments
 (0)