What is Control-flow graph?

A graph representing a program's execution flow, with basic blocks as nodes and branches between them as edges. It is used to detect loops and analyze data flow.

Field: Compilers

Control-flow graph in the explanations

Questions that mention Control-flow graph (3)

  1. In a control-flow graph, what do the nodes and edges represent?
  2. Which describes a basic block?
  3. What does liveness analysis, done in preparation for register allocation, determine?

Related terms

Basic block Loop unrolling Register allocation Abstract syntax tree Common subexpression elimination Constant folding Function inlining Instruction scheduling Intermediate representation JIT compilation

Back to the glossary