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

[MooreToCore] Add always_comb and always_latch lowering support #7532

Merged
merged 1 commit into from
Aug 20, 2024

Conversation

maerhart
Copy link
Member

  • Make sure ALL blocks without predecessors are removed properly. Note: use_empty is not up-to-date when erasing blocks with the rewriter as it only marks them as replaced.
  • Also remove unreachable blocks within func.func
  • Add lowering support for always_comb and always_latch procedures

Copy link
Member

@hailongSun2000 hailongSun2000 left a comment

Choose a reason for hiding this comment

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

Wow 😲! So nice 🚀!

@maerhart maerhart force-pushed the maerhart-moore-alwayscomb-lowering branch from 6bc9822 to c2f747a Compare August 20, 2024 09:13
@maerhart maerhart force-pushed the maerhart-moore-alwayscomb-lowering branch from c2f747a to 9598677 Compare August 20, 2024 09:17
@maerhart maerhart merged commit 898eb8b into main Aug 20, 2024
4 checks passed
@maerhart maerhart deleted the maerhart-moore-alwayscomb-lowering branch August 20, 2024 11:35
@@ -1388,6 +1389,9 @@ void MooreToCorePass::runOnOperation() {
MLIRContext &context = getContext();
ModuleOp module = getOperation();

IRRewriter rewriter(module);
(void)mlir::eraseUnreachableBlocks(rewriter, module->getRegions());

Copy link
Contributor

Choose a reason for hiding this comment

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

Very neat!

Copy link
Contributor

@fabianschuiki fabianschuiki left a comment

Choose a reason for hiding this comment

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

Awesome! 🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants