Module Flambda2_simplify.Flow_analysis
Dataflow analysis.
This module aims mainly at tracking uses of variables (other things may be added later on), with the aim of:
- removing unused parameters of *recursive* continuations;
- moving allocations out of the hot path of recursive continuations (e.g. the allocation of a float that was unboxed by the simplifier).
val analyze :
?speculative:bool ->
?print_name:string ->
machine_width:Target_system.Machine_width.t ->
return_continuation:Flambda2_identifiers.Continuation.t ->
exn_continuation:Flambda2_identifiers.Continuation.t ->
code_age_relation:Flambda2_types.Code_age_relation.t ->
used_value_slots:
Flambda2_nominal.Name_occurrences.t Flambda2_lattices.Or_unknown.t ->
code_ids_to_never_delete:Flambda2_identifiers.Code_id.Set.t ->
specialization_map:
Flambda2_identifiers.Continuation.t
Flambda2_identifiers.Continuation_callsite_map.t ->
Flambda2_simplify.Flow_types.Acc.t ->
Flambda2_simplify.Flow_types.Flow_result.tAnalyze the uses.
val did_perform_mutable_unboxing :
Flambda2_simplify.Flow_types.Flow_result.t ->
booltrue iff the mutable unboxing pass actually did unbox things
val added_useful_alias_in_loop :
Flambda2_types.Typing_env.t ->
Flambda2_simplify.Flow_types.Acc.t ->
Flambda2_simplify.Flow_types.Flow_result.t ->
bool