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] Improve PropAssignOp verifiers #5375

Merged
merged 2 commits into from
Jun 13, 2023

Conversation

youngar
Copy link
Member

@youngar youngar commented Jun 13, 2023

This adds verifiers which:

  1. check that a source is not a destination.
  2. check that a sink if not driven more than once.

This adds verifiers which:
1. check that a source is not a destination.
2. check that a sink if not driven more than once.
@youngar youngar added the FIRRTL Involving the `firrtl` dialect label Jun 13, 2023
@youngar youngar requested review from mikeurbach and rwy7 June 13, 2023 00:06
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.

Quick review, LGTM. The sharing perhaps makes more sense once things settle, and certainly not blocking 👍 .

@@ -2531,6 +2531,23 @@ LogicalResult RefDefineOp::verify() {
return success();
}

LogicalResult PropAssignOp::verify() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Might be good to share code w/RefDefineOp's verifier (modulo blacklisted destination ops, not sure what story is for properties--just remember only-has-one-driver gets a little less trivial to check once aggregates enter the scene, particularly if you're allowed to have "aliasing" sub-accesses to same element (refs don't have this problem, for now anyway 😄).

test/Dialect/FIRRTL/errors.mlir Show resolved Hide resolved
@youngar youngar merged commit 8280735 into llvm:main Jun 13, 2023
5 checks passed
@youngar youngar deleted the firrtl-propassign-singleconnect branch June 13, 2023 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FIRRTL Involving the `firrtl` dialect
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants