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

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

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

revision 705, Wed Sep 27 18:44:44 2000 UTC revision 733, Fri Nov 17 05:13:45 2000 UTC
# Line 154  Line 154 
154             val regmap = F.regmap flowgraph (* the register map *)             val regmap = F.regmap flowgraph (* the register map *)
155    
156             (* the nodes table *)             (* the nodes table *)
157             val nodes  = Intmap.new(numCell,NodeTable)             val nodes  = IntHashTable.mkTable(numCell,NodeTable)
158             val mode   = if isOn(HAS_PARALLEL_COPIES, mode) then             val mode   = if isOn(HAS_PARALLEL_COPIES, mode) then
159                             Word.orb(Core.SAVE_COPY_TEMPS, mode)                             Word.orb(Core.SAVE_COPY_TEMPS, mode)
160                          else mode                          else mode
# Line 177  Line 177 
177                                    }                                    }
178             val G.GRAPH{spilledRegs, pseudoCount, spillFlag, ...} = G             val G.GRAPH{spilledRegs, pseudoCount, spillFlag, ...} = G
179    
180             val hasBeenSpilled = Intmap.mapWithDefault (spilledRegs,false)             fun hasBeenSpilled i =
181                   getOpt (IntHashTable.find spilledRegs i, false)
182    
183             fun logGraph(header,G) =             fun logGraph(header,G) =
184                 if !dump_graph then                 if !dump_graph then
# Line 196  Line 197 
197                 val worklists =                 val worklists =
198                     (Core.initWorkLists G) {moves=moves}                     (Core.initWorkLists G) {moves=moves}
199             in  (* if !count_dead then             in  (* if !count_dead then
200                    Intmap.app (fn (_,NODE{uses=ref [],...}) => dead := !dead + 1                    IntHashTable.appi (fn (_,NODE{uses=ref [],...}) => dead := !dead + 1
201                                 | _ => ()) nodes                                 | _ => ()) nodes
202                 else (); *)                 else (); *)
203                 logGraph("build",G);                 logGraph("build",G);
204                 if debug then                 if debug then
205                 let val G.GRAPH{bitMatrix=ref(G.BM{elems, ...}), ...} = G                 let val G.GRAPH{bitMatrix=ref(G.BM{elems, ...}), ...} = G
206                 in  print ("done: nodes="^Int.toString(Intmap.elems nodes)^                 in  print ("done: nodes="^
207                              Int.toString(IntHashTable.numItems nodes)^
208                            " edges="^Int.toString(!elems)^                            " edges="^Int.toString(!elems)^
209                            " moves="^Int.toString(length moves)^                            " moves="^Int.toString(length moves)^
210                            "\n")                            "\n")
# Line 366  Line 368 
368             end             end
369    
370             fun initSpillProh(from,to) =             fun initSpillProh(from,to) =
371             let val markAsSpilled = Intmap.add spilledRegs             let val markAsSpilled = IntHashTable.insert spilledRegs
372                 fun loop r =                 fun loop r =
373                     if r <= to then (markAsSpilled(r,true); loop(r+1)) else ()                     if r <= to then (markAsSpilled(r,true); loop(r+1)) else ()
374             in  loop from end             in  loop from end

Legend:
Removed from v.705  
changed lines
  Added in v.733

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