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

SCM Repository

[smlnj] Diff of /sml/trunk/src/compiler/CodeGen/main/machine-gen.sml
ViewVC logotype

Diff of /sml/trunk/src/compiler/CodeGen/main/machine-gen.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1008, Fri Dec 14 21:01:29 2001 UTC revision 1009, Wed Jan 9 19:44:22 2002 UTC
# Line 47  Line 47 
47     structure MachSpec   = MachSpec     structure MachSpec   = MachSpec
48     structure MLTreeComp = MLTreeComp     structure MLTreeComp = MLTreeComp
49    
50       (* expand copies into their primitive moves.
51        * Copies are no longer treated as span dependent, which was a hack.
52        *)
53       structure ExpandCpys =
54         CFGExpandCopies
55             (structure CFG = CFG
56              structure ExpandCopies =
57                 struct
58                    structure I = I
59                    fun expandCopies(I.COPY{k, dst, src, tmp, ...}) =
60                         (case k
61                           of CellsBasis.GP => Shuffle.shuffle{dst=dst, src=src, tmp=tmp}
62                            | CellsBasis.FP => Shuffle.shufflefp{dst=dst, src=src, tmp=tmp}
63                            | _ => MLRiscErrorMsg.error ("MachineGen", "expandCopies")
64                         (*esac*))
65                      | expandCopies(I.ANNOTATION{i, ...}) = expandCopies(i)
66                      | expandCopies instr = [instr]
67                 end
68              )
69    
70     fun omitFramePointer(cfg as G.GRAPH graph) = let     fun omitFramePointer(cfg as G.GRAPH graph) = let
71       val CFG.INFO{annotations, ...} = #graph_info graph       val CFG.INFO{annotations, ...} = #graph_info graph
72     in     in
# Line 66  Line 86 
86     val finish  = phase "MLRISC BackPatch.finish" BackPatch.finish     val finish  = phase "MLRISC BackPatch.finish" BackPatch.finish
87     val ra      = phase "MLRISC ra" RA.run     val ra      = phase "MLRISC ra" RA.run
88     val omitfp  = phase "MLRISC omit frame pointer" omitFramePointer     val omitfp  = phase "MLRISC omit frame pointer" omitFramePointer
89       val expandCpys = phase "MLRISC expand copies" ExpandCpys.run
90    
91     val raPhase = ("ra",ra)     val raPhase = ("ra",ra)
92    
93    
94     val optimizerHook =     val optimizerHook =
95       ref [("ra", ra),       ref [("ra", ra),
96            ("omitfp", omitfp)            ("omitfp", omitfp),
97              ("expand copies", expandCpys)
98           ]           ]
99    
100    

Legend:
Removed from v.1008  
changed lines
  Added in v.1009

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