circt icon indicating copy to clipboard operation
circt copied to clipboard

[FIRRTL] Dedup should update class reference ports if classes dedup.

Open mikeurbach opened this issue 1 year ago • 0 comments

In https://github.com/llvm/circt/pull/6582, initial support for classes and objects was added in Dedup.

However, this doesn't yet support updating class ports that are ClassType when the classes being referenced in those ports are deduped.

To see what I mean, in test/firtool/classes-dedupe.fir, you can adjust class Foo_1 and class Foo_2 so they dedup (just change their single output to be the same name in both classes). There are places where objects of those classes are used in ports, and after the classes/objects dedup, we try to propassign an object reference of the wrong type to the port.

I think this is kind of a new thing, since references to instances is not possible in FIRRTL, so we need to decide where and how to update Dedup to take this into consideration for classes/objects. At a minimum, this will require updating the block arg and portTypes of ClassLikes.

mikeurbach avatar Jan 24 '24 01:01 mikeurbach