module Coloring:sig
..end
Coloring of pseudo-registers
type
decision =
| |
Spill of |
(* | the pseudo-register is spilled, the integer gives its position in the stack | *) |
| |
Color of |
(* | the pseudo-register is affected to a real register | *) |
decision for one pseudo-register
type
coloring
abstract type for (partial) coloring
val empty : coloring
empty coloring
val add_color : Register.reg -> Register.reg -> coloring -> coloring
add_color r s c
affects the pseudo-register r
to the real register s
in c
val add_spill : Register.reg -> coloring -> coloring
add_spill r c
decides to spill the pseudo-register r
in c
val find : Register.reg -> coloring -> decision
find r c
finds the decision associated to r
in the coloring c
Not_found
if no decision has been made yetval copy_color : Register.reg -> Register.reg -> coloring -> coloring
copy_color r s c
copies the decision made for r
in c
to s
Not_found
if no decision has been made for r
yetval print_dec : Stdlib.out_channel -> decision -> unit
val print_coloring : Stdlib.out_channel -> coloring -> unit