Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FreezePaths] Add support for HWInstanceLike, instead of only HWInstanceOp #7778

Merged
merged 1 commit into from
Nov 6, 2024

Conversation

prithayan
Copy link
Contributor

@prithayan prithayan commented Nov 6, 2024

PathVisitor::processPath errors out on other HWInstanceLike operations. But other dialects can add paths on such operations, handle HWInstanceLike to support operations in other dialects.

Comment on lines +171 to +172
auto mods = inst.getReferencedModuleNamesAttr();
if (mods.size() > 1)
Copy link
Member

Choose a reason for hiding this comment

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

is it possible for the size to be 0?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Interesting, I couldn't find any verifier that checks this. I think it should be illegal for an HWInstanceLike to have zero referenced modules. I will merge this as is, and create another PR to add the verifier.

Copy link
Member

Choose a reason for hiding this comment

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

sounds good to me 👍

@prithayan prithayan merged commit eecf84c into main Nov 6, 2024
4 checks passed
@prithayan prithayan deleted the dev/pbarua/freeze-paths branch November 6, 2024 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants