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/FLINT/cpsopt/cpsopt.sml
ViewVC logotype

Diff of /sml/trunk/src/compiler/FLINT/cpsopt/cpsopt.sml

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

revision 1346, Thu Aug 28 17:40:46 2003 UTC revision 1347, Thu Aug 28 21:59:15 2003 UTC
# Line 15  Line 15 
15  structure EtaSplit = EtaSplit(MachSpec)  structure EtaSplit = EtaSplit(MachSpec)
16  structure Flatten = Flatten(MachSpec)  structure Flatten = Flatten(MachSpec)
17  structure Uncurry = Uncurry(MachSpec)  structure Uncurry = Uncurry(MachSpec)
18    structure IC = InfCnv
19  val say = Control.Print.say  val say = Control.Print.say
20    
21  (** obsolete table: used by cpsopt as a dummy template *)  (** obsolete table: used by cpsopt as a dummy template *)
# Line 195  Line 196 
196                  | apply ("expand",f)        = expand(f, bodysize, false)                  | apply ("expand",f)        = expand(f, bodysize, false)
197                  | apply ("print",f)         = (PPCps.printcps0 f; f)                  | apply ("print",f)         = (PPCps.printcps0 f; f)
198                  | apply (p,f) = (say("\n!! Unknown cps phase '"^p^"' !!\n"); f)                  | apply (p,f) = (say("\n!! Unknown cps phase '"^p^"' !!\n"); f)
199       in foldl apply function (!CG.cpsopt)            val optimized = foldl apply function (!CG.cpsopt)
200  (*                 val function1 = first_contract function *)  (*                 val function1 = first_contract function *)
201  (*                 val function2 = eta function1 *)  (*                 val function2 = eta function1 *)
202  (*                 val function3 = uncurry function2 *)  (*                 val function3 = uncurry function2 *)
# Line 203  Line 204 
204  (*                 val function5 = cycle(rounds, not(!CG.unroll), function4) *)  (*                 val function5 = cycle(rounds, not(!CG.unroll), function4) *)
205  (*                 val function6 = eta function5 (* ZSH added this new phase *) *)  (*                 val function6 = eta function5 (* ZSH added this new phase *) *)
206  (*                 val function7 = last_contract function6 *)  (*                 val function7 = last_contract function6 *)
207  (*              in function7 *)  (*                 val optimized function7 *)
208              in
209                  IC.elim { function = optimized,
210                            mkKvar = LambdaVar.mkLvar,
211                            mkI32var =
212                              fn () => let val v = LambdaVar.mkLvar ()
213                                       in
214                                           IntHashTable.insert
215                                               table (v, LtyExtern.ltc_int32);
216                                           v
217                                       end }
218             end)             end)
219      before (debugprint "\n"; debugflush())      before (debugprint "\n"; debugflush())
220    

Legend:
Removed from v.1346  
changed lines
  Added in v.1347

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