Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@fabianschuiki
Copy link
Contributor

Add a new arc.execute op which is similar to scf.execute_region. It allows an SSACFG region to be embedded in a graph region like an hw.module. In a later PR, a conversion from llhd.combinational to this new arc.execute will be added. We can't directly use scf.execute_region for this since that op eagerly inlines into the parent region even if the parent is a graph region. This does not preserve semantics in the case of HW modules.

@fabianschuiki fabianschuiki added the Arc Involving the `arc` dialect label Sep 12, 2025
@fabianschuiki fabianschuiki force-pushed the fschuiki/arc-allow-regions branch from 0d12534 to a310c05 Compare September 12, 2025 15:41
Base automatically changed from fschuiki/arc-allow-regions to main September 12, 2025 16:03
Add a new `arc.execute` op which is similar to `scf.execute_region`. It
allows an SSACFG region to be embedded in a graph region like an
`hw.module`. In a later PR, a conversion from `llhd.combinational` to
this new `arc.execute` will be added. We can't directly use
`scf.execute_region` for this since that op eagerly inlines into the
parent region even if the parent is a graph region. This does not
preserve semantics in the case of HW modules.
Copy link
Member

@uenoku uenoku left a comment

Choose a reason for hiding this comment

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

LGTM

let summary = "Execute an SSACFG region";
let description = [{
The `arc.execute` op allows an SSACFG region to be embedded in a parent
graph region, or another SSACFG region. Whenever execution reaches this op,
Copy link
Member

Choose a reason for hiding this comment

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

Could you explain what execution reaching the op means in this context? Am I correct in understanding that it means "when the value of the result is needed" in an intentionally non-specific way?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's exactly it 😁. I think the deal with hw.module and graph regions in Arcilator is that all side-effecting operations are always executed (unless the compiler can prove that not executing them has no observable effect), and pure operations are executed opportunistically when the results are needed. Although that last part is kind of redundant; maybe we could just say that all ops are always executed, unless the compiler can prove that skipping them has no observable effect. Or something about the side effects of operations in the module take effect in the order they appear in the module.

@fabianschuiki fabianschuiki merged commit 40f11ec into main Sep 13, 2025
7 checks passed
@fabianschuiki fabianschuiki deleted the fschuiki/arc-execute branch September 13, 2025 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Arc Involving the `arc` dialect

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants