You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[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.
0 commit comments