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

[Ibis] Add containerize pass #5810

Merged
merged 5 commits into from
Aug 9, 2023
Merged

Conversation

mortbopet
Copy link
Contributor

This pass converts Ibis classes to containers, and outlines containers inside classes.

This pass converts Ibis classes to containers, and outlines containers inside classes.
include/circt/Dialect/Ibis/IbisPasses.td Outdated Show resolved Hide resolved
lib/Dialect/Ibis/Transforms/IbisContainerize.cpp Outdated Show resolved Hide resolved
lib/Dialect/Ibis/Transforms/IbisContainerize.cpp Outdated Show resolved Hide resolved
lib/Dialect/Ibis/Transforms/IbisContainerize.cpp Outdated Show resolved Hide resolved
lib/Dialect/Ibis/Transforms/IbisContainerize.cpp Outdated Show resolved Hide resolved
.getDefiningOp());
rewriter.setInsertionPoint(thisOp);
rewriter.replaceOpWithNewOp<ThisOp>(thisOp, newContainer.getNameAttr());
return success();
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this leave behind something in the class to indicate that "this container which got moved needs to be instantiated here". Or something in the container op to indicate which class is the parent it got moved out of?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Woops, correct. Added ContainerInstanceOp, lowering from the class InstanceOp to said op + addition of an instance op during container outlining.

lib/Dialect/Ibis/Transforms/IbisContainerize.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@blakep-msft blakep-msft left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@teqdruid teqdruid left a comment

Choose a reason for hiding this comment

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

just a few nits.

include/circt/Dialect/Ibis/IbisOps.td Outdated Show resolved Hide resolved
lib/Dialect/Ibis/IbisOps.cpp Show resolved Hide resolved
lib/Dialect/Ibis/Transforms/IbisContainerize.cpp Outdated Show resolved Hide resolved
@mortbopet mortbopet merged commit 71beb7e into main Aug 9, 2023
5 checks passed
@darthscsi darthscsi deleted the dev/mpetersen/ibis_containerize branch June 4, 2024 14:48
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