Module Flambda2_simplify_shared.Slot_offsets
Computing offsets
type used_slots = {function_slots_in_normal_projections : Flambda2_identifiers.Function_slot.Set.t;(*Function slots that appear in projections with normal name mode
*)all_function_slots : Flambda2_identifiers.Function_slot.Set.t;(*All function slots, both in projections and declarations, irrespective of name mode
*)value_slots_in_normal_projections : Flambda2_identifiers.Value_slot.Set.t;(*Closure vars that appear in projections with normal name mode
*)all_value_slots : Flambda2_identifiers.Value_slot.Set.t;(*All value slots, both in projections and declarations, irrespective of name mode
*)
}The slot information required from the caller of this module.
type result = {exported_offsets : Flambda2_simplify_shared.Exported_offsets.t;(*This includes all offsets for function/value slots that occur in the current compilation unit. This includes offsets for slots from other compilation units that appear in the current compilation unit.
Some slots can be marked as dead, because they are unused but simplify could not remove them. For instance, this occurs for unused value slots of non-liftable functions (.e.g in functors).
*)used_value_slots : Flambda2_identifiers.Value_slot.Set.t;(*This is the set of values slots that appears after simplify, minus the slots that are marked as dead in
*)exported_offsets.
}The result of the slot offset computation
val print :
Stdlib.Format.formatter ->
Flambda2_simplify_shared.Slot_offsets.t ->
unitPrinting function.
val empty : Flambda2_simplify_shared.Slot_offsets.tCreate an empty set of constraints.
val add_set_of_closures :
Flambda2_simplify_shared.Slot_offsets.t ->
is_phantom:bool ->
Flambda2_terms.Set_of_closures.t ->
Flambda2_simplify_shared.Slot_offsets.tAdd a set of closure to the set of constraints.
val add_offsets_from_function :
Flambda2_simplify_shared.Slot_offsets.t ->
from_function:Flambda2_simplify_shared.Slot_offsets.t ->
Flambda2_simplify_shared.Slot_offsets.tAggregate sets of closures from two contexts
val finalize_offsets :
get_code_metadata:
(Flambda2_identifiers.Code_id.t -> Flambda2_terms.Code_metadata.t) ->
used_slots:Flambda2_simplify_shared.Slot_offsets.used_slots ->
Flambda2_simplify_shared.Slot_offsets.t ->
Flambda2_simplify_shared.Slot_offsets.resultCompute offsets for all function and value slots that occur in the current compilation unit, taking into account the constraints introduced by the potential sharing of slots across multiple sets of closures (see .ml file for more details).
module Layout : sig ... end