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/compiler/CodeGen/cpscompile/spill-new.sml
ViewVC logotype

Diff of /sml/trunk/compiler/CodeGen/cpscompile/spill-new.sml

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

revision 1126, Thu Mar 7 21:16:28 2002 UTC revision 1174, Sat Mar 23 21:14:40 2002 UTC
# Line 261  Line 261 
261           | CPS.LOOKER(_,_,w,t,e)   => (fp(w,t); markfp e)           | CPS.LOOKER(_,_,w,t,e)   => (fp(w,t); markfp e)
262           | CPS.ARITH(_,_,w,t,e)    => (fp(w,t); markfp e)           | CPS.ARITH(_,_,w,t,e)    => (fp(w,t); markfp e)
263           | CPS.PURE(p,_,w,t,e)     => (markPure(p,w); fp(w,t); markfp e)           | CPS.PURE(p,_,w,t,e)     => (markPure(p,w); fp(w,t); markfp e)
264           | CPS.RCC(_,_,w,t,e)      => (fp(w,t); markfp e)           | CPS.RCC(_,_,_,_,w,t,e)  => (fp(w,t); markfp e)
265           | CPS.BRANCH(_,_,_,e1,e2) => (markfp e1; markfp e2)           | CPS.BRANCH(_,_,_,e1,e2) => (markfp e1; markfp e2)
266           | CPS.FIX _ => error "FIX in Spill.markfp"           | CPS.FIX _ => error "FIX in Spill.markfp"
267    
# Line 341  Line 341 
341          | CPS.LOOKER(_,vl,w,t,e)   => uses(vl,def(w,freevars e))          | CPS.LOOKER(_,vl,w,t,e)   => uses(vl,def(w,freevars e))
342          | CPS.ARITH(_,vl,w,t,e)    => uses(vl,def(w,freevars e))          | CPS.ARITH(_,vl,w,t,e)    => uses(vl,def(w,freevars e))
343          | CPS.PURE(_,vl,w,t,e)     => uses(vl,def(w,freevars e))          | CPS.PURE(_,vl,w,t,e)     => uses(vl,def(w,freevars e))
344          | CPS.RCC(_,vl,w,t,e)      => uses(vl,def(w,freevars e))          | CPS.RCC(_,_,_,vl,w,t,e)  => uses(vl,def(w,freevars e))
345          | CPS.BRANCH(_,vl,c,e1,e2) => uses(vl,freevars e1 \/ freevars e2)          | CPS.BRANCH(_,vl,c,e1,e2) => uses(vl,freevars e1 \/ freevars e2)
346          | CPS.FIX _ => error "FIX in Spill.freevars"          | CPS.FIX _ => error "FIX in Spill.freevars"
347    
# Line 467  Line 467 
467                | CPS.LOOKER(_,vl,w,t,e) => fx(vl, w, t, e, b)                | CPS.LOOKER(_,vl,w,t,e) => fx(vl, w, t, e, b)
468                | CPS.ARITH(_,vl,w,t,e)  => fx(vl, w, t, e, b)                | CPS.ARITH(_,vl,w,t,e)  => fx(vl, w, t, e, b)
469                | CPS.PURE(_,vl,w,t,e)   => fx(vl, w, t, e, b)                | CPS.PURE(_,vl,w,t,e)   => fx(vl, w, t, e, b)
470                | CPS.RCC(_,vl,w,t,e)    => fx(vl, w, t, e, b+1)                | CPS.RCC(_,_,_,vl,w,t,e)=> fx(vl, w, t, e, b+1)
471                | CPS.BRANCH(_,vl,c,x,y) => (uses(vl, n); gathers([x,y],b+1,n+1))                | CPS.BRANCH(_,vl,c,x,y) => (uses(vl, n); gathers([x,y],b+1,n+1))
472                | CPS.FIX _ => error "FIX in Spill.gather"                | CPS.FIX _ => error "FIX in Spill.gather"
473            end            end
# Line 622  Line 622 
622         *  spOff --- current available spill offset         *  spOff --- current available spill offset
623         *         *
624         * Return:         * Return:
        *  e      --- transformed cps expression  
625         *  L      --- the set of live lvars in e         *  L      --- the set of live lvars in e
626         *  spills --- the number of spills         *  spills --- the number of spills
627         *         *
# Line 708  Line 707 
707            | CPS.LOOKER(p,vl,w,t,e) => scanOp(vl, w, e, b)            | CPS.LOOKER(p,vl,w,t,e) => scanOp(vl, w, e, b)
708            | CPS.ARITH(p,vl,w,t,e)  => scanOp(vl, w, e, b)            | CPS.ARITH(p,vl,w,t,e)  => scanOp(vl, w, e, b)
709            | CPS.PURE(p,vl,w,t,e)   => scanOp(vl, w, e, b)            | CPS.PURE(p,vl,w,t,e)   => scanOp(vl, w, e, b)
710            | CPS.RCC(p,vl,w,t,e)    => scanOp(vl, w, e, b+1)            | CPS.RCC(k,l,p,vl,w,t,e)=> scanOp(vl, w, e, b+1)
711            | CPS.BRANCH(p,vl,c,x,y) => scanStmt(vl,[x,y])            | CPS.BRANCH(p,vl,c,x,y) => scanStmt(vl,[x,y])
712            | CPS.FIX _ => error "FIX in Spill.scan"            | CPS.FIX _ => error "FIX in Spill.scan"
713    
# Line 893  Line 892 
892                 rewrite(vl,w,e, fn (vl,w,e) => CPS.ARITH(p,vl,w,t,e))                 rewrite(vl,w,e, fn (vl,w,e) => CPS.ARITH(p,vl,w,t,e))
893            | CPS.PURE(p,vl,w,t,e) =>            | CPS.PURE(p,vl,w,t,e) =>
894                 rewrite(vl,w,e,fn (vl,w,e) => CPS.PURE(p,vl,w,t,e))                 rewrite(vl,w,e,fn (vl,w,e) => CPS.PURE(p,vl,w,t,e))
895            | CPS.RCC(p,vl,w,t,e) =>            | CPS.RCC(k,l,p,vl,w,t,e) =>
896                 rewrite(vl,w,e,fn (vl,w,e) => CPS.RCC(p,vl,w,t,e))                 rewrite(vl,w,e,fn (vl,w,e) => CPS.RCC(k,l,p,vl,w,t,e))
897            | CPS.BRANCH(p,vl,c,x,y) =>            | CPS.BRANCH(p,vl,c,x,y) =>
898                 rewriteStmt(vl,[x,y], fn (vl,[x,y]) => CPS.BRANCH(p,vl,c,x,y))                 rewriteStmt(vl,[x,y], fn (vl,[x,y]) => CPS.BRANCH(p,vl,c,x,y))
899            | CPS.FIX _ => error "FIX in Spill.rebuild"            | CPS.FIX _ => error "FIX in Spill.rebuild"

Legend:
Removed from v.1126  
changed lines
  Added in v.1174

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