Module Analysis_and_optimization.Dataflow_types

type label = int

A label is a unique identifier for a node in the dataflow/dependency graph, and often corresponds to one node in the Mir.

val label_of_sexp : Sexplib0.Sexp.t -> label
val sexp_of_label : label -> Sexplib0.Sexp.t
type vexpr =
  1. | VVar of string

Representation of an expression that can be assigned to. This should also be able to represent indexed variables, but we don't support that yet.

val vexpr_of_sexp : Sexplib0.Sexp.t -> vexpr
val sexp_of_vexpr : vexpr -> Sexplib0.Sexp.t
type reaching_defn = vexpr * label

A 'reaching definition' (or reaching_defn or RD) statement (v, l) says that the variable v could have been affected at the label l.

val reaching_defn_of_sexp : Sexplib0.Sexp.t -> reaching_defn
val sexp_of_reaching_defn : reaching_defn -> Sexplib0.Sexp.t
type cf_state = label

The most recently nested control flow (block start, if/then, or loop)

This isn't included in the traversal_state because it only flows downward through the tree, not across and up like everything else