Debian Codegraph @

lib/mlrisc-lib/MLRISC/instructions/mlriscAnnotations.sig

raw
1 (* mlriscAnnotations.sig
2 *
3 * COPYRIGHT (c) 2002 Bell Labs, Lucent Technologies
4 *
5 * These are some basic annotations understood by the MLRISC system.
6 * The MLRISC client can create its own annotations and propagate them
7 * to MLRISC. Client-defined annotations are ignored by MLRISC.
8 *
9 * -- Allen
10 *
11 * TODO: There should be comments to say that the annotations are block
12 * or instruction annotations. -- Lal.
13 *)
14
15 signature MLRISC_ANNOTATIONS =
16 sig
17
18 structure C : CELLS_BASIS (* = CellsBasis *)
19 where type CellSet.cellset = CellsBasis.CellSet.cellset
20 and type 'a ColorTable.hash_table = 'a CellsBasis.ColorTable.hash_table
21 and type 'a HashTable.hash_table = 'a CellsBasis.HashTable.hash_table
22 and type SortedCells.sorted_cells = CellsBasis.SortedCells.sorted_cells
23 and type cell = CellsBasis.cell
24 and type cellColor = CellsBasis.cellColor
25 and type cellkind = CellsBasis.cellkind
26 and type cellkindDesc = CellsBasis.cellkindDesc
27 and type cellkindInfo = CellsBasis.cellkindInfo
28
29 (*
30 * The branch probability of conditional branches.
31 * The client can attach this with conditional branches.
32 * nnThis has no effect otherwise.
33 *
34 * Currently, the annotation is recognized by the static branch prediction
35 * mondule.
36 *)
37 exception BRANCHPROB of Probability.prob
38 val BRANCH_PROB : Probability.prob Annotations.property
39
40 (* The execution frequency of a basic block
41 * You can attach this at a basic block.
42 *)
43 exception EXECUTIONFREQ of int
44 val EXECUTION_FREQ : int Annotations.property
45
46 (* No effect at all; this just allows you to insert comments *)
47 val COMMENT : string Annotations.property
48
49 (* Instructions in the block should not be reordered *)
50 val NOREORDER : unit Annotations.property
51
52 (*
53 * Control dependence definition and use.
54 *
55 * To use these, the client should generate
56 * control dependence virtual registers via Cells.newCell Cells.CTRL
57 * and attach these annotations to instructions and basic blocks.
58 *
59 * These annotations are currently recognized by the SSA optimization
60 * modules.
61 *)
62 exception CTRLDEF of C.cell
63 exception CTRLUSE of C.cell
64 val CTRL_DEF : C.cell Annotations.property
65 val CTRL_USE : C.cell Annotations.property
66
67 (*
68 * Attach this annotation to assemblers for pretty printing
69 * client defined cell informations.
70 *)
71 val PRINT_CELLINFO : (C.cell -> string) Annotations.property
72
73 (*
74 * Does a compilation unit has GC information?
75 *)
76 val GC_INFO : unit Annotations.property
77
78 (*
79 * Disable all optimizations in the cluster
80 *)
81 val NO_OPTIMIZATION : unit Annotations.property
82
83 (*
84 * Mark basic block that is used for calling the GC
85 *)
86 val CALLGC : unit Annotations.property
87 val GCSAFEPOINT : string Annotations.property
88
89 (*
90 * Insert block names
91 *)
92 exception BLOCKNAMES of Annotations.annotations
93 val BLOCK_NAMES : Annotations.annotations Annotations.property
94
95 (*
96 * This annotation inserts an empty basic block
97 *)
98 exception EMPTYBLOCK
99 val EMPTY_BLOCK : unit Annotations.property
100
101 (*
102 * Enter information for a register.
103 *)
104 exception MARKREG of C.cell -> unit
105 val MARK_REG : (C.cell -> unit) Annotations.property
106
107 (*
108 * Disable branch chaining optimization on a jump
109 *)
110 val NO_BRANCH_CHAINING : unit Annotations.property
111
112 (*
113 * Code has reference to a virtual (dedicated) frame pointer.
114 *)
115 val USES_VIRTUAL_FRAME_POINTER : unit Annotations.property
116
117 (*
118 * Define return arguments of a call (hack for x86)
119 *)
120 val RETURN_ARG : C.cell Annotations.property
121 end