| 1 |
(* |
| 2 |
* Instruction properties for utilizing the SSA form |
| 3 |
* |
| 4 |
* -- Allen ([email protected]) |
| 5 |
*) |
| 6 |
signature SSA_PROPERTIES = |
| 7 |
sig |
| 8 |
|
| 9 |
structure I : INSTRUCTIONS |
| 10 |
structure C : CELLS |
| 11 |
structure RTL : MLTREE_RTL |
| 12 |
structure RTLProps : RTL_PROPERTIES |
| 13 |
structure OT : OPERAND_TABLE |
| 14 |
sharing RTLProps.I = OT.I = I |
| 15 |
sharing I.C = C |
| 16 |
sharing RTLProps.RTL = RTL |
| 17 |
|
| 18 |
(* Create special nodes *) |
| 19 |
val source : I.instruction |
| 20 |
val sink : I.instruction |
| 21 |
val phi : I.instruction |
| 22 |
|
| 23 |
(* Physical registers whose value are volatile *) |
| 24 |
val volatile : C.cell list |
| 25 |
|
| 26 |
(* Instructions with definitions (or use) of these registers will not |
| 27 |
* be moved |
| 28 |
*) |
| 29 |
val pinnedDef : C.cell list |
| 30 |
val pinnedUse : C.cell list |
| 31 |
|
| 32 |
(* Definitions (or use) of these registers will not be renamed *) |
| 33 |
val fixedDef : C.cell list |
| 34 |
val fixedUse : C.cell list |
| 35 |
|
| 36 |
(* Extract the naming constraints on the operands *) |
| 37 |
val namingConstraints : |
| 38 |
{ instr : I.instruction, dst : C.cell list, src : C.cell list } -> |
| 39 |
{ dst : (RTL.T.var * C.cell) list, (* destination is fixed *) |
| 40 |
src : (RTL.T.var * C.cell) list, (* source is fixed *) |
| 41 |
dstsrc : (RTL.T.var * RTL.T.var) list (* dst = src *) |
| 42 |
} |
| 43 |
|
| 44 |
(* Rewrite the operands of an instruction *) |
| 45 |
val rewriteOperands : |
| 46 |
{ const : int -> OT.const } -> |
| 47 |
{ instr : I.instruction, dst : C.cell list, src : C.cell list } -> |
| 48 |
I.instruction |
| 49 |
|
| 50 |
(* Make copies *) |
| 51 |
val copies : {kind: C.cellkind, dst:C.cell, src:C.cell} list -> |
| 52 |
I.instruction list |
| 53 |
end |
| 54 |
|