1 (* Pasted from Pottier's PP compiler *)
3 (** This module performs graph coloring. It is used for register
6 (* A coloring is a partial function of graph vertices to decisions,
7 where a decision is of the form either [Spill] -- the vertex could
8 not be colored and should be spilled into a stack slot -- or
9 [Color] -- the vertex was assigned a hardware register. Vertices
10 that are not in the domain of the coloring are waiting for a
11 decision to be made. *)
15 | Color of I8051.register
18 decision Interference.Vertex.Map.t
20 (* Here is the coloring algorithm. Out of an interference graph, it
21 produces a coloring. The client should provide information about
22 the number of uses of each pseudo-register; the higher the number,
23 the more undesirable it is to spill that pseudo-register. If the
24 [verbose] flag is set, the algorithm prints information messages to
25 the standard output channel. *)
29 val graph: Interference.graph
30 val uses: Register.t -> int
35 val coloring: coloring