SCM Repository
Annotation of /sml/trunk/src/MLRISC/mltree/mltree-rtl.sig
Parent Directory
|
Revision Log
Revision 591 - (view) (download) (as text)
1 : | leunga | 591 | (* |
2 : | * How to represent an RTL | ||
3 : | *) | ||
4 : | signature MLTREE_RTL = | ||
5 : | sig | ||
6 : | structure Basis : MLTREE_BASIS | ||
7 : | structure Region : REGION | ||
8 : | structure RTLExt : sig | ||
9 : | datatype ('s,'r,'f,'c) sx = | ||
10 : | ASSIGN of 'r loc * 'r | ||
11 : | | PAR of 's * 's | ||
12 : | |||
13 : | and ('s,'r,'f,'c) rx = | ||
14 : | FORALL of 'r | ||
15 : | | FETCH of 'r loc | ||
16 : | | ARG of string * string | ||
17 : | | OP of Basis.misc_op ref * 'r list | ||
18 : | | SLICE of {from:'r, to:'r} list * Basis.ty * 'r | ||
19 : | |||
20 : | and 'r loc = AGG of Basis.ty * endian * 'r cell | ||
21 : | |||
22 : | and 'r cell = CELL of string * Basis.ty * 'r * 'r | ||
23 : | |||
24 : | and endian = LITTLE_ENDIAN | BIG_ENDIAN | ||
25 : | |||
26 : | and ('s,'r,'f,'c) fx = FX | ||
27 : | and ('s,'r,'f,'c) ccx = CCX | ||
28 : | end | ||
29 : | |||
30 : | structure T : MLTREE | ||
31 : | structure Util : MLTREE_UTILS | ||
32 : | sharing Util.T = T | ||
33 : | sharing RTLExt = T.Extension | ||
34 : | sharing Basis = T.Basis | ||
35 : | sharing T.Region = Region | ||
36 : | |||
37 : | datatype rtlOp = datatype RTLExt.rx | ||
38 : | datatype rtlAction = datatype RTLExt.sx | ||
39 : | datatype rtlCell = datatype RTLExt.cell | ||
40 : | datatype rtlLoc = datatype RTLExt.loc | ||
41 : | datatype rtlEndian = datatype RTLExt.endian | ||
42 : | |||
43 : | type action = T.stm | ||
44 : | type rtl = action | ||
45 : | type exp = T.rexp | ||
46 : | type cond = T.ccexp | ||
47 : | type loc = T.rexp rtlLoc | ||
48 : | type cell = T.rexp rtlCell | ||
49 : | type ty = T.ty | ||
50 : | |||
51 : | val hashRTL : action -> word | ||
52 : | val eqRTL : action * action -> bool | ||
53 : | val showRTL : (string list * string list) -> T.printer | ||
54 : | val new : action -> rtl | ||
55 : | val newOp : {name:string, attribs:T.Basis.attribs} -> T.Basis.misc_op ref | ||
56 : | |||
57 : | val COPY : rtl | ||
58 : | val JMP : rtl | ||
59 : | |||
60 : | val can'tMoveUp : rtl -> bool | ||
61 : | val can'tMoveDown : rtl -> bool | ||
62 : | val hasSideEffect : rtl -> bool | ||
63 : | |||
64 : | end |
root@smlnj-gforge.cs.uchicago.edu | ViewVC Help |
Powered by ViewVC 1.0.0 |