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/MLRISC/ra/liveness.sml
 [smlnj] / sml / trunk / src / MLRISC / ra / liveness.sml

# Diff of /sml/trunk/src/MLRISC/ra/liveness.sml

sml/branches/SMLNJ/src/MLRISC/ra/liveness.sml revision 411, Fri Sep 3 00:25:03 1999 UTC sml/trunk/src/MLRISC/ra/liveness.sml revision 430, Wed Sep 8 09:47:00 1999 UTC
# Line 48  Line 48
48              | listNeq((x:int)::xs,y::ys) = x<>y orelse listNeq(xs,ys)              | listNeq((x:int)::xs,y::ys) = x<>y orelse listNeq(xs,ys)
49              | listNeq _ = true              | listNeq _ = true
50
51            fun uniqMap([],sl) = sl            fun uniqMap sl = SL.uniq(map regmap sl)
| uniqMap(x::xs,sl) = uniqMap(xs,SL.enter(regmap(x),sl))
52
53            fun init ~1 = ()            fun init ~1 = ()
54              | init n  = let              | init n  = let
55                  val F.BBLOCK{blknum,insns,liveIn,...} = Array.sub(blkArr,n)                  val F.BBLOCK{blknum,insns,liveIn,...} = Array.sub(blkArr,n)
56                  fun defuse(insn::insns,def,use) = let                  fun defuse(insn::insns,def,use) = let
57                        val (d,u) = defUse insn                        val (d,u) = defUse insn
58                        val u' = SL.difference(uniqMap(u,[]),def)                        val u' = SL.difference(uniqMap u,def)
59                        val use' = SL.merge(u', use)                        val use' = SL.merge(u', use)
60                        val d' = SL.difference(uniqMap(d,[]),use')                        val d' = SL.difference(uniqMap d,use')
61                      in                      in
62                        defuse(insns, SL.merge(d',def), use')                        defuse(insns, SL.merge(d',def), use')
63                      end                      end

Legend:
 Removed from v.411 changed lines Added in v.430