Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /sml/trunk/src/MLRISC/instructions/mlriscAnnotations.sig
ViewVC logotype

Annotation of /sml/trunk/src/MLRISC/instructions/mlriscAnnotations.sig

Parent Directory Parent Directory | Revision Log Revision Log


Revision 984 - (view) (download) (as text)

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

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0