CQCL / hugr

Hierarchical Unified Graph Representation
https://crates.io/crates/hugr
Apache License 2.0
15 stars 4 forks source link

Constant folding CFGs #1217

Open doug-q opened 2 weeks ago

doug-q commented 2 weeks ago

How to unroll a CFG:

pick up your "const_fold_datafold_parent" tool that you used for unrolling tailloops. It takes as input a dataflow parent and a constant value for each output wire of the internal input node, and returns as output a constant value for each input wire of the internal output node. Of course your notion of constant value must be large enough to contain "unknown".