Control Flow Support
Dataflow/ControlFlow provides reusable CFG abstractions for dataflow engines.
Headers: include/Dataflow/ControlFlow/
Overview
This subsystem defines lightweight intraprocedural and interprocedural control flow graph interfaces that decouple solver code from raw LLVM traversal.
Main components
FlowDirectionmodels forward versus backward analyses.IntraCFGandLLVMIntraCFGprovide function-local control flow views.InterCFGandLLVMInterCFGextend the model across calls.
Why it exists
Shared CFG abstractions reduce duplicated traversal logic across solvers.
Engines can operate over a small stable interface instead of directly on LLVM.
The same framework supports forward and backward analyses.
Choosing a graph view
Use LLVMIntraCFG when facts remain within one function and an LLVM basic
block view is sufficient. Use LLVMInterCFG only when transfers must cross
call and return boundaries; its added edges require the solver to define how
context and external calls are handled. A client selects FlowDirection
once so predecessor and successor traversal remains consistent throughout the
analysis.
See also
See Algebraic Program Analysis (APA), Monotone Dataflow Engine, and IFDS / IDE Engine for clients built on top of control-flow abstractions.