1 (***********************************************************************)
5 (* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
7 (* Copyright 1996 Institut National de Recherche en Informatique et *)
8 (* en Automatique. All rights reserved. This file is distributed *)
9 (* under the terms of the Q Public License version 1.0. *)
11 (***********************************************************************)
15 (* Pseudo-registers *)
18 { mutable name
: string; (* Name (for printing) *)
19 stamp
: int; (* Unique stamp *)
20 typ
: Cmm.machtype_component
; (* Type of contents *)
21 mutable loc
: location
; (* Actual location *)
22 mutable spill
: bool; (* "true" to force stack allocation *)
23 mutable interf
: t list
; (* Other regs live simultaneously *)
24 mutable prefer
: (t
* int) list
; (* Preferences for other regs *)
25 mutable degree
: int; (* Number of other regs live sim. *)
26 mutable spill_cost
: int; (* Estimate of spilling cost *)
27 mutable visited
: bool } (* For graph walks *)
32 | Stack
of stack_location
40 val create
: Cmm.machtype_component
-> t
41 val createv
: Cmm.machtype
-> t array
43 val at_location
: Cmm.machtype_component
-> location
-> t
45 module Set
: Set.S
with type elt
= t
46 module Map
: Map.S
with type key
= t
48 val add_set_array
: Set.t
-> t array
-> Set.t
49 val diff_set_array
: Set.t
-> t array
-> Set.t
50 val inter_set_array
: Set.t
-> t array
-> Set.t
51 val set_of_array
: t array
-> Set.t
53 val reset
: unit -> unit
54 val all_registers
: unit -> t list
55 val num_registers
: unit -> int
56 val reinit
: unit -> unit