Skip to content

[LLHD] Use new combinational process instead of execute regions #8537

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

Open
wants to merge 1 commit into
base: fschuiki/comb-op
Choose a base branch
from

Conversation

fabianschuiki
Copy link
Contributor

@fabianschuiki fabianschuiki commented Jun 4, 2025

Make deseq and process lowering use the new llhd.combinational op instead of the existing scf.execute_region. The latter is too eager to inline into the parent region, even if the region contains ops with side effects such as probes and drives. These no longer have a clear order in the parent module. The specialized LLHD op is less eager about inlining and can deal with the details of the SSACFG-to-graph region transition in more detail.

This commit is basically just a whole bunch of renaming and changing comments. No change intended besides the different op.

Fixes #8532.

@fabianschuiki fabianschuiki force-pushed the fschuiki/use-comb-op branch from 21a3815 to e9950a0 Compare June 5, 2025 17:21
@fabianschuiki fabianschuiki force-pushed the fschuiki/comb-op branch 2 times, most recently from 3c567f2 to b53a013 Compare June 5, 2025 17:41
@fabianschuiki fabianschuiki force-pushed the fschuiki/use-comb-op branch from e9950a0 to 4b6e824 Compare June 5, 2025 17:41
@@ -1222,14 +1223,14 @@ ValueRange Deseq::specializeProcess(FixedValues fixedValues) {
auto [oldBlock, newBlock] = worklist.pop_back_val();
builder.setInsertionPointToEnd(newBlock);
for (auto &oldOp : *oldBlock) {
// Convert `llhd.wait` into `scf.yield`.
// Convert `llhd.wait` into `llhd.halt`.
Copy link
Member

@uenoku uenoku Jun 5, 2025

Choose a reason for hiding this comment

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

nit: is this comment correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No you're right, this should be llhd.yield. Thanks! 🙌

Make deseq and process lowering use the new `llhd.combinational` op
instead of the existing `scf.execute_region`. The latter is too eager to
inline into the parent region, even if the region contains ops with side
effects such as probes and drives. These no longer have a clear order in
the parent module. The specialized LLHD op is less eager about inlining
and can deal with the details of the SSACFG-to-graph region transition
in more detail.

This commit is basically just a whole bunch of renaming and changing
comments. No change intended besides the different op.

Fixes #8532.
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