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

[ExtractInstances] Append original instance name to path in metadata #7872

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

prithayan
Copy link
Contributor

Update the metadata generated by ExtractInstances.
Currently the path in the metadata, doesn't contain the original instance name, which causes difficulty in distinguishing extracted instances within the same module.
This PR updates the metadata to append the original instance name to the path.
Note that this instance name is of the instance, that has been extracted, hence it cannot be represented by the Hierarchical path.

@prithayan prithayan requested review from mikeurbach and removed request for seldridge and darthscsi November 21, 2024 21:48
Copy link
Contributor

@mikeurbach mikeurbach left a comment

Choose a reason for hiding this comment

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

Seems straightforward to me.

@@ -1175,9 +1186,10 @@ void ExtractInstancesPass::createSchema() {
mlir::Type portsType[] = {
StringType::get(context), // name
PathType::get(context), // extracted instance path
StringType::get(context) // filename
StringType::get(context), // filename
Copy link
Contributor

Choose a reason for hiding this comment

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

Please call get once and reuse the value. Type uniquing has costs we don't need to pay here.

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.

3 participants