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

Add support for inlining slice/index when just an ID #53

Merged
merged 2 commits into from
Jul 28, 2020

Conversation

leonardt
Copy link
Owner

Needed for coreir inlining of mantle wires for slices.

Before, we blacklisted inlining of indices/slices because expressions like (x + y)[0] are not valid. However, we can do this when we're just inlining a different identifier, so this augments the logic to not blacklist inlining for wires when they're being assigned by an identifier.

@leonardt leonardt requested a review from rsetaluri July 23, 2020 22:33
}
return Transformer::visit(std::move(node));
}

Copy link
Owner Author

Choose a reason for hiding this comment

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

We need to do this here because Index doesn't have an Expression as it's value, but Slice has Expression for the type of value, so the visitor below works (ideally we should update Slice to be variant since we can't support general expressions for slices, but I'll leave that for a separate change set. once we do that, we'll need a similar implementation as this method.

src/assign_inliner.cpp Outdated Show resolved Hide resolved
@leonardt leonardt merged commit 311b34e into master Jul 28, 2020
@leonardt leonardt deleted the inline-slice-id branch July 28, 2020 23:56
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