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 /MLRISC/trunk/ra/chaitin-spillheur.sml
ViewVC logotype

Diff of /MLRISC/trunk/ra/chaitin-spillheur.sml

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

revision 545, Thu Feb 24 13:56:44 2000 UTC revision 624, Fri Apr 21 03:06:21 2000 UTC
# Line 48  Line 48 
48               (case chase node of               (case chase node of
49                 node as NODE{number, pri, defs, uses,                 node as NODE{number, pri, defs, uses,
50                              degree=ref deg, color=ref PSEUDO,...} =>                              degree=ref deg, color=ref PSEUDO,...} =>
51                 let val cost = real(!pri) / real deg                 let fun cost() = real(!pri) / real deg
52                     val cost =                     val cost =
53                        case (!defs, !uses) of                        case (!defs, !uses) of
54                          (_,[]) => (* defs but no use *)                          (_,[]) => (* defs but no use *)
55                                    ~1.0 - real deg                                    ~1.0 - real deg
56                        | ([d],[u]) => (* defs after use; don't use *)                        | ([d],[u]) => (* defs after use; don't use *)
57                             if d = u+1 orelse d = u+2 then don'tUse else cost                             if d = u+1 orelse d = u+2 then don'tUse else cost()
58                        | _ => cost                        | _ => cost()
59                 in  if cost < lowestCost andalso not(hasBeenSpilled number)                 in  if cost < lowestCost andalso not(hasBeenSpilled number)
60                     then                     then
61                       if lowestCost >= infiniteCost then (* not a real node *)                       if lowestCost >= infiniteCost then (* not a real node *)

Legend:
Removed from v.545  
changed lines
  Added in v.624

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