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/chaitin-spillheur2.sml
ViewVC logotype

Diff of /sml/trunk/src/MLRISC/ra/chaitin-spillheur2.sml

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

revision 1155, Wed Mar 20 20:52:51 2002 UTC revision 1156, Thu Mar 21 22:01:11 2002 UTC
# Line 34  Line 34 
34          fun moveSavings(NODE{movecnt=ref 0, ...}) = 0.0          fun moveSavings(NODE{movecnt=ref 0, ...}) = 0.0
35            | moveSavings(NODE{movelist, ...}) =            | moveSavings(NODE{movelist, ...}) =
36              let fun loop([], savings) =              let fun loop([], savings) =
37                       real(foldr (fn ((_,a),b) => Int.max(a,b)) 0 savings)                       foldr (fn ((_,a),b) => Real.max(a,b)) 0.0 savings
38                    | loop(MV{status=ref(WORKLIST | GEORGE_MOVE | BRIGGS_MOVE),                    | loop(MV{status=ref(WORKLIST | GEORGE_MOVE | BRIGGS_MOVE),
39                              dst, src, cost, ...}::mvs, savings) =                              dst, src, cost, ...}::mvs, savings) =
40                      let fun add(c,[]) = [(c,cost)]                      let fun add(c,[]) = [(c,cost)]
# Line 70  Line 70 
70                              degree=ref deg, color=ref PSEUDO,...} =>                              degree=ref deg, color=ref PSEUDO,...} =>
71                 let fun cost() =                 let fun cost() =
72                     let val moveSavings = moveRatio * moveSavings(node)                     let val moveSavings = moveRatio * moveSavings(node)
73                     in  (real(!pri) + moveSavings) / real deg end                     in  (!pri + moveSavings) / real deg end
74                     val cost =                     val cost =
75                        case (!defs, !uses) of                        case (!defs, !uses) of
76                          (_,[]) => (* defs but no use *)                          (_,[]) => (* defs but no use *)

Legend:
Removed from v.1155  
changed lines
  Added in v.1156

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