Debian Codegraph @

lib/mlrisc-lib/MLRISC/Doc/latex/cluster.tex

raw
1 \section{Cluster}
2
3 A \newdef{cluster}
4 represents a compilation unit in linearized form,
5 and contains information about the control flow, global annotations,
6 block and edge execution frequencies, and live-in/live-out information.
7
8 Its signature is:
9 \begin{SML}
10 signature FLOWGRAPH = sig
11 structure C : \href{cells.html}{CELLS}
12 structure I : \href{instructions.html}{INSTRUCTIONS}
13 structure P : \href{pseudo-ops.html}{PSEUDO_OPS}
14 structure W : \href{freq.html}{FREQ}
15 sharing I.C = C
16
17 datatype block =
18 PSEUDO of P.pseudo_op
19 | LABEL of Label.label
20 | BBLOCK of
21 \{ blknum : int,
22 freq : W.freq ref,
23 annotations : Annotations.annotations ref,
24 liveIn : C.cellset ref,
25 liveOut : C.cellset ref,
26 succ : edge list ref,
27 pred : edge list ref,
28 insns : I.instruction list ref
29 \}
30 | ENTRY of
31 \{blknum : int, freq : W.freq ref, succ : edge list ref\}
32 | EXIT of
33 \{blknum : int, freq : W.freq ref, pred : edge list ref\}
34 withtype edge = block * W.freq ref
35
36 datatype cluster =
37 CLUSTER of \{
38 blocks: block list,
39 entry : block,
40 exit : block,
41 regmap: C.regmap,
42 blkCounter : int ref,
43 annotations : Annotations.annotations ref
44 \}
45 end
46 \end{SML}
47
48 Clusters are used in
49 \href{span-dep.html}{span dependency resolution},
50 \href{delayslots.html}{delay slot filling},
51 \href{asm.html}{assembly},
52 and \href{mc.html}{machine code}
53 output, since these phases require the code laid out in linearized form.