Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/charisee/src/compiler/IL/value-numbering-fn.sml
ViewVC logotype

Diff of /branches/charisee/src/compiler/IL/value-numbering-fn.sml

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

revision 2496, Tue Oct 29 05:29:46 2013 UTC revision 2497, Wed Oct 30 17:29:20 2013 UTC
# Line 24  Line 24 
24      structure E = ExprFn (IL)      structure E = ExprFn (IL)
25      structure ValueMap = E.Map      structure ValueMap = E.Map
26      structure ST = Stats      structure ST = Stats
27        structure HE=hashEin
28    
29      type expr = E.expr      type expr = E.expr
30    
# Line 165  Line 166 
166            val mkAPPLY = E.mkAPPLY tbl            val mkAPPLY = E.mkAPPLY tbl
167            val mkCONS = E.mkCONS tbl            val mkCONS = E.mkCONS tbl
168            val mkPHI = E.mkPHI tbl            val mkPHI = E.mkPHI tbl
169    
170       (*       val mkEinOP = E.mkEinOP tbl*)
171    
172    
173          (* convert a list of variables to a list of expressions *)          (* convert a list of variables to a list of expressions *)
174            fun varsToExp (env, xs) = List.map varToExp xs            fun varsToExp (env, xs) = List.map varToExp xs
175          (* convert an SSA RHS into a hash-consed expression *)          (* convert an SSA RHS into a hash-consed expression *)
# Line 175  Line 180 
180                    | IL.OP(rator, args) => mkOP(rator, varsToExp(env, args))                    | IL.OP(rator, args) => mkOP(rator, varsToExp(env, args))
181                    | IL.APPLY(f, args) => mkAPPLY(f, varsToExp(env, args))                    | IL.APPLY(f, args) => mkAPPLY(f, varsToExp(env, args))
182                    | IL.CONS(ty, args) => mkCONS(ty, varsToExp(env, args))                    | IL.CONS(ty, args) => mkCONS(ty, varsToExp(env, args))
183                   (* | IL.EINAPP(exp, xs)=> NONE                   (* | IL.EINAPP(exp,xs)=>mkEinOP(exp, varsToExp(env,args))*)
184                  IL.EINAPP(exp, xs) )*)                          (*E.M(HE.hashfn(exp))*)
185    
186                        (*HE.hashfn(exp) tbl*)
187    
188                  (* end case *))                  (* end case *))
189          (* walk the dominator tree computing value numbers *)          (* walk the dominator tree computing value numbers *)
190            fun vn (env, nd) = let            fun vn (env, nd) = let

Legend:
Removed from v.2496  
changed lines
  Added in v.2497

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