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

Diff of /MLRISC/trunk/ra/ra-graph.sig

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

revision 497, Tue Dec 7 15:44:50 1999 UTC revision 498, Tue Dec 7 15:44:50 1999 UTC
# Line 29  Line 29 
29    
30    (*    (*
31     * The following represent a program point in the program.     * The following represent a program point in the program.
    * As a convention, program point is computed by  
    *  
    *    block number * 16384 + instruction number  
32     *     *
33     * The last instruction in the block is numbered 1, i.e. the instruction     * The last instruction in the block is numbered 1, i.e. the instruction
34     * numbering is in reverse.  The number 0 is reserved for "live-out".     * numbering is in reverse.  The number 0 is reserved for "live-out".
35     *     *
    * This implies that there can be a maximum of 16k-1 instructions  
    * per basic block/hyperblock, plus a maximum of 32k blocks.  
    * Let's hope this is enough. (I'm not kidding, aggressive inlining  
    * and unrolling can produce large blocks.)  
36     *)     *)
37    type programPoint = int    type programPoint = int
38    
39      type mode = word
40    
41    datatype interferenceGraph =    datatype interferenceGraph =
42       GRAPH of       GRAPH of
43       { bitMatrix    : bitMatrix ref,       { bitMatrix    : bitMatrix ref,
# Line 71  Line 66 
66    
67         (* dead copies *)         (* dead copies *)
68         deadCopies   : int list ref,         deadCopies   : int list ref,
69           copyTmps     : node list ref,
70           memMoves     : move list ref,
71           memRegs      : node list ref,
72    
73         (* spill locations *)         (* spill locations *)
74         spillLoc     : int ref         spillLoc     : int ref,
75    
76           (* span indexed by node id *)
77           span         : int Intmap.intmap,
78    
79           (* mode *)
80           mode         : mode,
81    
82           pseudoCount  : int ref,
83           blockedCount : int ref
84       }       }
85    
86    and moveStatus = MOVE         (* not yet coalesced *)    and moveStatus = BRIGGS_MOVE             (* not yet coalesceable *)
87                     | GEORGE_MOVE             (* not yet coalesceable *)
88                   | COALESCED    (* coalesced *)                   | COALESCED    (* coalesced *)
89                   | CONSTRAINED  (* src and target intefere *)                   | CONSTRAINED  (* src and target intefere *)
90                   | LOST         (* frozen moves *)                   | LOST         (* frozen moves *)
# Line 87  Line 95 
95             dst    : node,               (* destination register of move *)             dst    : node,               (* destination register of move *)
96             (*kind   : moveKind, *)      (* kind of move *)             (*kind   : moveKind, *)      (* kind of move *)
97             cost   : cost,               (* cost *)             cost   : cost,               (* cost *)
98             status : moveStatus ref      (* coalesced? *)             status : moveStatus ref,     (* coalesced? *)
99               hicount: int ref             (* neighbors of high degree *)
100            }            }
101    
102    and moveKind = REG_TO_REG      (* register to register *)    and moveKind = REG_TO_REG      (* register to register *)
# Line 104  Line 113 
113        | COLORED of int        (* colored *)        | COLORED of int        (* colored *)
114        | SPILLED of int        (* spilled *)        | SPILLED of int        (* spilled *)
115    
116           (* Note on SPILLED:
117            *  SPILLED ~1 means that the spill location is still undetermined
118            *  SPILLED c, c >= 0 means that c is a fixed "memory register"
119            *  SPILLED c, c < ~1 means that c is a logical spill location
120            *                    assigned by the register allocator
121            *)
122    
123    and node =    and node =
124      NODE of { number : int,             (* node number *)      NODE of { number : int,             (* node number *)
125                movecnt: int ref,         (* #moves this node is involved in *)                movecnt: int ref,         (* #moves this node is involved in *)
# Line 136  Line 152 
152                       {pref:int list,stamp:int,proh:int Array.array} -> int,                       {pref:int list,stamp:int,proh:int Array.array} -> int,
153                     getpair      :                     getpair      :
154                       {pref:int list,stamp:int,proh:int Array.array} -> int,                       {pref:int list,stamp:int,proh:int Array.array} -> int,
155                     proh         : int Array.array                     proh         : int Array.array,
156                       mode         : mode,
157                       spillLoc     : int ref,
158                       firstMemReg  : int,
159                       numMemRegs   : int
160                   } -> interferenceGraph                   } -> interferenceGraph
161    
162  end  end

Legend:
Removed from v.497  
changed lines
  Added in v.498

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