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/branches/SMLNJ/src/MLRISC/IR/mlrisc-liveness.sml
ViewVC logotype

Diff of /sml/branches/SMLNJ/src/MLRISC/IR/mlrisc-liveness.sml

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

revision 468, Wed Nov 10 22:42:52 1999 UTC revision 469, Wed Nov 10 22:42:52 1999 UTC
# Line 32  Line 32 
32     structure SL  = SortedList     structure SL  = SortedList
33     structure G   = Graph     structure G   = Graph
34    
35     val {put : (I.C.cell list * I.C.cell list) * A.annotations -> A.annotations,     val livenessProp = A.new NONE : (I.C.cell list * I.C.cell list) A.property
         get,  
         rmv} = A.new()  
36    
37     structure Liveness =     structure Liveness =
38        DataflowFn        DataflowFn
# Line 64  Line 62 
62    
63                fun epilogue _ { node = (b,CFG.BLOCK{annotations,...}),                fun epilogue _ { node = (b,CFG.BLOCK{annotations,...}),
64                                 input=liveOut, output=liveIn } =                                 input=liveOut, output=liveIn } =
65                    annotations := put((liveIn,liveOut),!annotations)                    annotations := #set livenessProp
66                                      ((liveIn,liveOut),!annotations)
67           end           end
68          )          )
69    
# Line 73  Line 72 
72    
73     fun getLiveness (G.GRAPH cfg) b =     fun getLiveness (G.GRAPH cfg) b =
74         let val CFG.BLOCK{annotations,...} = #node_info cfg b         let val CFG.BLOCK{annotations,...} = #node_info cfg b
75         in  case get(!annotations) of         in  case #get livenessProp (!annotations) of
76                SOME(x,y) => {livein=x,liveout=y}                SOME(x,y) => {livein=x,liveout=y}
77             |  NONE => {livein=[],liveout=[]}             |  NONE => {livein=[],liveout=[]}
78         end         end

Legend:
Removed from v.468  
changed lines
  Added in v.469

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