Skip to content

Build Accumulator to collect multiple contiguous statements into one Block in the Control flow graph - #116

Merged
yhteoh merged 15 commits into
v1.0from
control_flow_graph
Sep 14, 2026
Merged

yhteoh merged 15 commits into
v1.0from
control_flow_graph

Conversation

@vishnu-m77

@vishnu-m77 vishnu-m77 commented Sep 11, 2026 •

Copy link
Copy Markdown
Collaborator
  • Please check if the PR fulfills these requirements
  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
    Feature

  • What is the current behavior? (You can also link to an open issue here)

  • ControlFlowGraph stored in oqd-core
  • Each statement line in the code is stored in a new Block in the ControlFlowGraph.
  • What is the new behavior (if this is a feature change)?
  • Control Flow Graph moved to oqd-compiler-infrastructure
    • ControlFlowGraph renamed to CFG
    • Block renamed to CFGBlock
  • Contiguous statements are absorbed into one block in the CFG by running the CFGBlockAccumlator pass
  • Refactor cfg_to_dot visualization of control flow graph as a dot graph
  • Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
    Yes, Blocks do not have a kind parameter. Block.stmt is now Block.stmts as they can hold multiple statements.

  • Other information:
    N/A

@yhteoh yhteoh added the enhancement New feature or request label Sep 14, 2026
@yhteoh
yhteoh self-requested a review September 14, 2026 21:32

@yhteoh yhteoh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good to me!

@yhteoh
yhteoh merged commit ae34a8c into v1.0 Sep 14, 2026
12 checks passed
@yhteoh
yhteoh deleted the control_flow_graph branch September 14, 2026 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants