1995-06-15 01:17:29 -07:00
|
|
|
(* Pseudo-registers *)
|
|
|
|
|
|
|
|
type t =
|
1995-07-02 09:41:48 -07:00
|
|
|
{ mutable name: string; (* Name (for printing) *)
|
|
|
|
stamp: int; (* Unique stamp *)
|
|
|
|
typ: Cmm.machtype_component; (* Type of contents *)
|
|
|
|
mutable loc: location; (* Actual location *)
|
|
|
|
mutable spill: bool; (* "true" to force stack allocation *)
|
|
|
|
mutable interf: t list; (* Other regs live simultaneously *)
|
|
|
|
mutable prefer: (t * int) list; (* Preferences for other regs *)
|
|
|
|
mutable degree: int; (* Number of other regs live sim. *)
|
|
|
|
mutable spill_cost: int; (* Estimate of spilling cost *)
|
|
|
|
mutable visited: bool } (* For graph walks *)
|
1995-06-15 01:17:29 -07:00
|
|
|
|
|
|
|
and location =
|
|
|
|
Unknown
|
|
|
|
| Reg of int
|
|
|
|
| Stack of stack_location
|
|
|
|
|
|
|
|
and stack_location =
|
|
|
|
Local of int
|
|
|
|
| Incoming of int
|
|
|
|
| Outgoing of int
|
|
|
|
|
|
|
|
val dummy: t
|
|
|
|
val new: Cmm.machtype_component -> t
|
|
|
|
val newv: Cmm.machtype -> t array
|
|
|
|
val clone: t -> t
|
|
|
|
val at_location: Cmm.machtype_component -> location -> t
|
|
|
|
|
|
|
|
module Set: Set.S with elt = t
|
|
|
|
module Map: Map.S with key = t
|
|
|
|
|
|
|
|
val add_set_array: Set.t -> t array -> Set.t
|
|
|
|
val diff_set_array: Set.t -> t array -> Set.t
|
|
|
|
val inter_set_array: Set.t -> t array -> Set.t
|
|
|
|
val set_of_array: t array -> Set.t
|
|
|
|
|
|
|
|
val reset: unit -> unit
|
|
|
|
val all_registers: unit -> t list
|
|
|
|
val num_registers: unit -> int
|
|
|
|
val reinit: unit -> unit
|