Module Regalloc_affinity
This module implements a basic variant of affinity: we compute the numbers of moves between temporaries and physical registers, and use this information in register allocators to try to assign a temporary to a physical register with high affinity.
val compute : Cfg_with_infos.t -> Regalloc_split.phi_move list -> tComputes the affinities for the passed CFG, i.e. for each temporary the number of times it moves from/to a given physical register.
val get : t -> Reg.t -> affinitiesReturns the affinities for the passed temporary in descending order (i.e. from the highest to the lowest affinity), use `next` to get the elements in order.
val next : affinities -> affinity optionReturns the next affinity if there is one, `None` otherwise