jon.recoil.org

Module Flow.Acc

type t

The type of accumulator for flow analysis

val empty : unit -> Flambda2_simplify.Flow.Acc.t

Empty uses

Initialize the analysis so that the stack consists of a single toplevel continuation.

Add a new continuation on the stack. Used when entering a continuation handler.

Pop the current top of the stack. Used when exiting the current continuation handler.

That variable is defined in the current handler

Add a variable binding from the current handler.

val record_let_binding : rewrite_id:Flambda2_identifiers.Named_rewrite_id.t -> generate_phantom_lets:bool -> let_bound:Flambda2_bound_identifiers.Bound_pattern.t -> simplified_defining_expr:Flambda2_simplify.Simplified_named.t -> Flambda2_simplify.Flow.Acc.t -> Flambda2_simplify.Flow.Acc.t

Record a let-binding

Add a variable binding to the symbol. Projections might get recorded multiple times.

Add a symbol binding from the current handler.

Add a code id binding from the current handler.

Add name occurrences used in the body of the current continuation's handler, *excluding* uses in apply_cont expressions, which are tracked separately.

Add the given continuation as being used as the return continuation for a function call.

Add, for the current continuation handler, uses for an apply cont of the given continuation with given arguments occurrences.