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 /MLRISC/trunk/staged-allocation/staged-allocation-sig.sml
ViewVC logotype

Annotation of /MLRISC/trunk/staged-allocation/staged-allocation-sig.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2344 - (view) (download)

1 : mrainey 2344 (* staged-allocation-sig.sml
2 :     *
3 :     *
4 :     *)
5 :    
6 :     signature TARGET_LANG = sig
7 :    
8 :     type location_kind
9 :    
10 :     end (* TARGET_LANG *)
11 :    
12 :     signature STAGED_ALLOCATION = sig
13 :    
14 :     structure T : MLTREE
15 :     structure TL : TARGET_LANG
16 :    
17 :     type width = int
18 :     type counter
19 :     type str
20 :     datatype block_direction = UP | DOWN
21 :     (* bit width, location kind, bit alignment *)
22 :     type slot = (width * TL.location_kind * int)
23 :     type reg = (width * T.reg)
24 :    
25 :     datatype location =
26 :     REG of reg (* machine register *)
27 :     | BLOCK_OFFSET of int (* slot in the overflow block *)
28 :     | COMBINE of (location * location) (* a location that occupies two other locations*)
29 :     | NARROW of (location * width * TL.location_kind) (* a location that loses bits *)
30 :    
31 :     type location_info = (width * location * TL.location_kind)
32 :    
33 :     datatype stage =
34 :     OVERFLOW of { counter : counter,
35 :     blockDirection : block_direction,
36 :     maxAlign : int }
37 :     | WIDEN of (width -> width)
38 :     | CHOICE of ( (slot -> bool) * stage) list
39 :     | REGS_BY_ARGS of (counter * reg list)
40 :     | REGS_BY_BITS of (counter * reg list)
41 :     | BITCOUNTER of counter
42 :     | ARGCOUNTER of counter
43 :     | SEQ of stage list
44 :     | PAD of counter
45 :     | ALIGN_TO of (width -> width)
46 :    
47 :     type stepper_fn = (str * slot) -> (str * location_info list)
48 :    
49 :     val freshCounter : unit -> counter
50 :    
51 :     val useRegs : reg list -> (counter * stage)
52 :    
53 :     val find : (str * counter) -> int
54 :    
55 :     val init : counter list -> str
56 :    
57 :     val mkStep : stage list -> stepper_fn
58 :    
59 :     val process : {counters : counter list, stages : stage list} -> slot list
60 :     -> location_info list list
61 :    
62 :     end (* STAGED_ALLOCATION *)

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