-
Notifications
You must be signed in to change notification settings - Fork 7
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
Convert Conditional/TailLoop-shaped CFGs into dataflow #818
Comments
Closed
See #561 (comment) . |
14 tasks
This was referenced Jun 12, 2024
github-merge-queue bot
pushed a commit
to CQCL/tket2
that referenced
this issue
Jun 17, 2024
Followup to #390. Fixes #389. Closes #385. ~~Blocked by CQCL/hugr#1175 Fixes support for non-`Dfg` circuits and circuits with a non-root parent: Adds a `Circuit::extract_dfg(&self)` function that extracts the circuit into a new hugr with a DFG operation at the root. In some cases, like in a CFG DataflowBlock node, this requires some changes to the definition to eliminate the output sum type. Here I only implemented it for the kind of blocks produced by guppy. We could replace the manual implementation once CQCL/hugr#818 gets implemented. With this we can now fix #389 by extracting the circuit before using it as a replacement in `SimpleReplacement::create_simple_replacement`. Replaces `DfgBuilder` with `FunctionBuilder` where possible, so we can use named circuits in the tests. (This failed before due to the bug in CircuitRewrite).
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
CFGs that are already of appropriately simple shape can be transformed easily with the contents of each basic block placed into the corresponding Case (or the body of the TailLoop), etc.
The text was updated successfully, but these errors were encountered: