Module Flow.Acc
val print : Format.formatter -> t -> unitprinting
val empty : unit -> tEmpty uses
val init_toplevel :
dummy_toplevel_cont:Flambda2_identifiers.Continuation.t ->
Flambda2_bound_identifiers.Bound_parameters.t ->
tInitialize the analysis so that the stack consists of a single toplevel continuation.
val enter_continuation :
Flambda2_identifiers.Continuation.t ->
recursive:bool ->
is_exn_handler:bool ->
Flambda2_bound_identifiers.Bound_parameters.t ->
t ->
tAdd a new continuation on the stack. Used when entering a continuation handler.
val exit_continuation : Flambda2_identifiers.Continuation.t -> t -> tPop the current top of the stack. Used when exiting the current continuation handler.
val record_lifted_constants : Lifted_constant_state.t -> t -> tRecord that the current expression defines some lifted constants; this is not liked to the current continuation. Note: this should only be called at top-level, where the constants will be placed, and not from the fonction where the constants come from.
val record_defined_var : Flambda2_identifiers.Variable.t -> t -> tThat variable is defined in the current handler
val record_var_binding :
Flambda2_identifiers.Variable.t ->
Flambda2_nominal.Name_occurrences.t ->
generate_phantom_lets:bool ->
t ->
tAdd 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:Simplified_named.t ->
t ->
tRecord a let-binding
val record_symbol_projection :
Flambda2_identifiers.Variable.t ->
Flambda2_nominal.Name_occurrences.t ->
t ->
tAdd a variable binding to the symbol. Projections might get recorded multiple times.
val record_symbol_binding :
Flambda2_identifiers.Symbol.t ->
Flambda2_nominal.Name_occurrences.t ->
t ->
tAdd a symbol binding from the current handler.
val record_code_id_binding :
Flambda2_identifiers.Code_id.t ->
Flambda2_nominal.Name_occurrences.t ->
t ->
tAdd a code id binding from the current handler.
val record_value_slot :
Flambda2_identifiers.Name.t ->
Flambda2_identifiers.Value_slot.t ->
Flambda2_nominal.Name_occurrences.t ->
t ->
tAdd a value slot from the current handler.
val add_used_in_current_handler : Flambda2_nominal.Name_occurrences.t -> t -> tAdd name occurrences used in the body of the current continuation's handler, *excluding* uses in apply_cont expressions, which are tracked separately.
val add_apply_conts :
result_cont:
(Flambda2_identifiers.Apply_cont_rewrite_id.t
* Flambda2_identifiers.Continuation.t)
option ->
exn_cont:
(Flambda2_identifiers.Apply_cont_rewrite_id.t
* Flambda2_terms.Exn_continuation.t) ->
result_arity:[ `Unarized ] Flambda2_kinds.Flambda_arity.t ->
t ->
tAdd the given continuation as being used as the return continuation for a function call.
val add_apply_cont_args :
rewrite_id:Flambda2_identifiers.Apply_cont_rewrite_id.t ->
Flambda2_identifiers.Continuation.t ->
Flambda2_term_basics.Simple.t list ->
t ->
tAdd, for the current continuation handler, uses for an apply cont of the given continuation with given arguments occurrences.
val add_extra_params_and_args :
Flambda2_identifiers.Continuation.t ->
Continuation_extra_params_and_args.t ->
t ->
tAdd extra params and args to a continuation.