-
Notifications
You must be signed in to change notification settings - Fork 389
[circt-verilog] Move pipeline into ImportVerilog. #9208
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
base: main
Are you sure you want to change the base?
Conversation
f231527 to
7c48b5e
Compare
a25df3d to
f97b81c
Compare
jpienaar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to be able to reuse this - much less guess work and enables mixing and matching in pass pipeline.
| const ImportVerilogOptions *options = nullptr); | ||
|
|
||
| /// Optimize and simplify the Moore dialect IR. | ||
| void verilogToMoorePipeline(mlir::PassManager &pm); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we just forward declare PassManager too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, done.
| /// command line options. | ||
| static void populatePasses(PassManager &pm) { | ||
| populateMooreTransforms(pm); | ||
| verilogToMoorePipeline(pm); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the main reason you made 3 instead of 1 populate method so that you could have this same split?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, basically just moved the pipelines into the lib. On one hand it seems cleaner to have the flow control outside the pipeline (opts.loweringMode). OTOH, having just one pipeline seems easier to use. No strong preference on my end, happy to coalesce the pipelines into one if preferred.
415aa14 to
3e2e27c
Compare
Break out the circt-verilog import pipeline so it can reused easily.
3e2e27c to
f0e54b7
Compare
jpienaar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good refactoring to enable reuse as library. Lets perhaps give one day if there is any objection, but seems good to me.
fabianschuiki
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Great idea having this factored out and reusable!
Break out the circt-verilog import pipeline so it can reused easily.