Module Flambda2_simplify.Upwards_acc
val print : Format.formatter -> t -> unitPrint a upwards accumulator to a formatter.
val create :
flow_result:Flow_types.Flow_result.t ->
compute_slot_offsets:bool ->
Upwards_env.t ->
Downwards_acc.t ->
tval creation_dacc : t -> Downwards_acc.tval uenv : t -> Upwards_env.tExtract the environment component of the given upwards accumulator.
val cost_metrics : t -> Flambda2_terms.Cost_metrics.tval code_age_relation : t -> Flambda2_types.Code_age_relation.tval lifted_constants : t -> Lifted_constant_state.tReturn the lifted constants that still need to be placed (i.e. have Let-expressions made for them) on the upwards traversal.
val get_and_clear_lifted_constants : t -> t * Lifted_constant_state.tval with_lifted_constants : t -> Lifted_constant_state.t -> tReplace the accumulator of lifted constants.
val no_lifted_constants : t -> boolval add_lifted_constant : t -> Lifted_constant.t -> tval map_uenv : t -> f:(Upwards_env.t -> Upwards_env.t) -> tMap the environment component of the given upwards accumulator.
val with_uenv : t -> Upwards_env.t -> tReplace the environment component of the given upwards accumulator.
val remember_code_for_cmx :
t ->
Flambda2_terms.Code.t Flambda2_identifiers.Code_id.Map.t ->
tval all_code : t -> Flambda2_cmx.Exported_code.tval name_occurrences : t -> Flambda2_nominal.Name_occurrences.tval with_name_occurrences :
t ->
name_occurrences:Flambda2_nominal.Name_occurrences.t ->
tval add_free_names : t -> Flambda2_nominal.Name_occurrences.t -> tval used_value_slots : t -> Flambda2_nominal.Name_occurrences.tNote that this only includes uses of value slots in projections.
val remove_all_occurrences_of_free_names :
t ->
Flambda2_nominal.Name_occurrences.t ->
tval with_cost_metrics : Flambda2_terms.Cost_metrics.t -> t -> tval add_cost_metrics : Flambda2_terms.Cost_metrics.t -> t -> tval add_cost_metrics_and_with_name_occurrences :
t ->
Flambda2_terms.Cost_metrics.t ->
Flambda2_nominal.Name_occurrences.t ->
tThis function exists as an optimisation to reduce allocation.
val notify_added : code_size:Flambda2_terms.Code_size.t -> t -> tval notify_removed : operation:Flambda2_terms.Removed_operations.t -> t -> tval generate_phantom_lets : t -> boolval are_rebuilding_terms : t -> Flambda2_simplify_shared.Are_rebuilding_terms.tval is_demoted_exn_handler : t -> Flambda2_identifiers.Continuation.t -> boolval slot_offsets :
t ->
Flambda2_simplify_shared.Slot_offsets.t Flambda2_lattices.Or_unknown.tval with_slot_offsets :
t ->
Flambda2_simplify_shared.Slot_offsets.t Flambda2_lattices.Or_unknown.t ->
tval required_names : t -> Flambda2_identifiers.Name.Set.tval reachable_code_ids :
t ->
Flow_types.Reachable_code_ids.t Flambda2_lattices.Or_unknown.tval continuation_param_aliases : t -> Flow_types.Alias_result.tval mutable_unboxing_result : t -> Flow_types.Mutable_unboxing_result.tval resimplify : t -> boolval specialization_map :
t ->
Flambda2_identifiers.Continuation.t
Flambda2_identifiers.Continuation_callsite_map.t