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

[ImportVerilog] Add foreach statement support. #8017

Merged
merged 4 commits into from
Jan 17, 2025

Conversation

chenbo-again
Copy link
Contributor

Add forloop statement support, due to lack of dyn array support, currently static-length array is supported.

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.

Maybe you can refer to the implementation of Handle repeat loops. We can pass the cond to the BB1 when we enter. I guess this method can reduce accessing memory(like read and blokcing_assign ops) frequently 🤔. WDYT @fabianschuiki?

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.

Please add a few annotations. It's important for others. And thanks for your work on this 😄.

lib/Conversion/ImportVerilog/Statements.cpp Outdated Show resolved Hide resolved
test/Conversion/ImportVerilog/basic.sv Show resolved Hide resolved
@hailongSun2000 hailongSun2000 changed the title [ImportVerilog] add forloop statement support [ImportVerilog] Add foreach statement support. Dec 27, 2024
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.

LGTM! Please wait for @fabianschuiki to review it again.

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.

LGTM, with a small comment on error reporting. Thanks a lot for working on this! 🥳

lib/Conversion/ImportVerilog/Statements.cpp Outdated Show resolved Hide resolved
@fabianschuiki
Copy link
Contributor

Looks great, thanks for the fix! Feel free to land this whenever you're happy with it 😃. Or let me know if you want me to do it.

@hailongSun2000 hailongSun2000 merged commit f11e9d1 into llvm:main Jan 17, 2025
4 checks passed
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.

3 participants