jon.recoil.org

Module Regalloc_stack_slots

type slot = int
type t
val make : unit -> t
val iter : t -> f:(Reg.Tbl.key -> int -> unit) -> unit
val total_number_of_slots : t -> int
val get_and_incr : t -> stack_class:Stack_class.t -> slot
val get_or_create : t -> Reg.t -> slot
val get_or_fatal : t -> Reg.t -> slot
val use_same_slot_or_fatal : t -> Reg.t -> existing:Reg.t -> unit
val update_cfg_with_layout : t -> Cfg_with_layout.t -> unit
val optimize : t -> Cfg_with_infos.t -> unit

Reduces the number of slots, by merging slots whose use intervals do not overlap. If a reduction occurs, registers are modified and liveness is invalidated, but the CFG is left untouched.