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

[FIRRTL][ExpandWhens] Add StmtExprVisitor to Visitor and Support DPI intrinsic in ExpandWhens #7177

Merged
merged 2 commits into from
Jun 16, 2024

Conversation

uenoku
Copy link
Member

@uenoku uenoku commented Jun 14, 2024

This adds StmtExprVisitor struct for visitor to handle operations with an optional result. Currently GenericIntrinsicOp and DPICallIntrinsicOp are added.

Besides that ExpandWhens is modified to handle DPI intrinsic.

…intrinsic in ExpandWhens

This adds `StmtExprVisitor` struct for visitor to handle operations with an optional result.
Currently GenericIntrinsicOp and DPICallIntrinsicOp are added.

Besides that DPI intrinsic is handled in ExpandWhens
@uenoku uenoku changed the title [FIRRTL][ExpandWhens] Add StmtExprVisitor to Visitor and Support DPI … [FIRRTL][ExpandWhens] Add StmtExprVisitor to Visitor and Support DPI intrinsic in ExpandWhens Jun 14, 2024
Copy link
Contributor

@dtzSiFive dtzSiFive left a comment

Choose a reason for hiding this comment

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

LGTM!

Whether this is how when + DPI enable "should" work I don't know but seems reasonable and aligns with assert/assume/cover/printf so works for me.

include/circt/Dialect/FIRRTL/FIRRTLVisitors.h Show resolved Hide resolved
include/circt/Dialect/FIRRTL/FIRRTLVisitors.h Outdated Show resolved Hide resolved
@@ -344,6 +344,48 @@ class DeclVisitor {
#undef HANDLE
};

/// StmtExprVisitor is a visitor for FIRRTL operation that has an optional
/// result.
template <typename ConcreteType, typename ResultType = void,
Copy link
Contributor

Choose a reason for hiding this comment

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

Awesome, thanks for breaking this out now that we have more than one 👍.

@uenoku uenoku merged commit 18d2872 into main Jun 16, 2024
4 checks passed
@uenoku uenoku deleted the dev/hidetou/expand-whens-dpi branch June 16, 2024 21:21
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