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/ppc/ra/ppcRegAlloc.sml
ViewVC logotype

Annotation of /sml/trunk/src/MLRISC/ppc/ra/ppcRegAlloc.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 651 - (view) (download)

1 : monnier 247 functor PPCRegAlloc(structure I : INSTRUCTIONS where C = PPCCells
2 :     structure P : INSN_PROPERTIES where I = I
3 :     structure F : FLOWGRAPH where I = I and P = P
4 : monnier 411 structure Asm : INSTRUCTION_EMITTER where I=I and P=P) :
5 : monnier 247 sig
6 :     functor IntRa (structure RaUser : RA_USER_PARAMS
7 :     where I = I
8 :     where type B.name = F.B.name) : RA
9 :     functor FloatRa (structure RaUser : RA_USER_PARAMS
10 :     where I = I
11 :     where type B.name = F.B.name) : RA
12 : monnier 411 end=
13 : monnier 247 struct
14 :    
15 :     structure C=I.C
16 :    
17 :     (* liveness analysis for general purpose registers *)
18 :     structure RegLiveness =
19 :     Liveness(structure Flowgraph=F
20 :     structure Instruction=I
21 :     val defUse = P.defUse C.GP
22 : monnier 411 val regSet = C.getCell C.GP
23 :     val cellset = C.updateCell C.GP)
24 : monnier 247
25 :    
26 :     functor IntRa =
27 :     RegAllocator
28 :     (structure RaArch = struct
29 :     structure InsnProps = P
30 :     structure AsmEmitter = Asm
31 :     structure I = I
32 :     structure Liveness=RegLiveness
33 :    
34 :     val defUse = P.defUse C.GP
35 :     val firstPseudoR = 32
36 : monnier 411 val maxPseudoR = C.maxCell
37 :     val numRegs = C.numCell C.GP
38 :     val regSet = C.getCell C.GP
39 : monnier 247 end)
40 :    
41 :     (* liveness analysis for floating point registers *)
42 :     structure FregLiveness =
43 :     Liveness(structure Flowgraph=F
44 :     structure Instruction=I
45 :     val defUse = P.defUse C.FP
46 : monnier 411 val regSet = C.getCell C.FP
47 :     val cellset = C.updateCell C.FP)
48 : monnier 247
49 :     functor FloatRa =
50 :     RegAllocator
51 :     (structure RaArch = struct
52 :     structure InsnProps = P
53 :     structure AsmEmitter = Asm
54 :     structure I = I
55 :     structure Liveness=FregLiveness
56 :    
57 :     val defUse = P.defUse C.FP
58 : monnier 411 val firstPseudoR = 64
59 :     val maxPseudoR = C.maxCell
60 :     val numRegs = C.numCell C.FP
61 :     val regSet = C.getCell C.FP
62 : monnier 247 end)
63 :     end
64 :    

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