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

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

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

revision 1052, Wed Feb 6 04:04:48 2002 UTC revision 1053, Wed Feb 6 19:11:13 2002 UTC
# Line 9  Line 9 
9    
10    structure C = CellsBasis    structure C = CellsBasis
11    
12    (* A new bit matrix datatype.    structure BM = RaBitmatrix
    * We use the small representation whenever possible to save space.  
    *)  
   datatype bitMatrix = BM of {table:hashTable,  
                               elems:int ref,  
                               edges:int}  
   and hashTable = SMALL of word list Array.array ref * word  
                 | LARGE of bucket Array.array ref * word  
              (* | BITMATRIX of Word8Array.array *)  
   and bucket = NIL | B of int * int * bucket  
13    
14    type priority = int    type priority = int
15    
# Line 50  Line 41 
41    type mode = word    type mode = word
42    
43    datatype interferenceGraph =    datatype interferenceGraph =
44     GRAPH of { bitMatrix    : bitMatrix ref,     GRAPH of { bitMatrix    : BM.bitMatrix ref,
45                nodes        : node IntHashTable.hash_table,                nodes        : node IntHashTable.hash_table,
46                K            : int,                K            : int,
47                firstPseudoR : int,                firstPseudoR : int,
# Line 154  Line 145 
145            else *)            else *)
146            let val (tableSize, shift) = roundSize edges            let val (tableSize, shift) = roundSize edges
147            in  if Word.fromInt maxRegs < max then            in  if Word.fromInt maxRegs < max then
148                   SMALL(ref(Array.array(tableSize,[])),shift)                   BM.SMALL(ref(Array.array(tableSize,[])),shift)
149                else                else
150                   LARGE(ref(Array.array(tableSize,NIL)),shift)                   BM.LARGE(ref(Array.array(tableSize, BM.NIL)),shift)
151            end            end
152    in  BM{table=table, elems=ref 0, edges=edges}    in  BM.BM{table=table, elems=ref 0, edges=edges}
153    end    end
154    
155    (* Create a new interference graph *)    (* Create a new interference graph *)

Legend:
Removed from v.1052  
changed lines
  Added in v.1053

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