Project

General

Profile

Revision 0e1049dc src/scheduling.ml

View differences:

src/scheduling.ml
121 121
	  n'.node_id
122 122
	  pp_dep_graph g
123 123
      );
124
    
125
    (* TODO X: extend the graph with inputs (adapt the causality analysis to deal with inputs
126
     compute: coi predecessors of outputs
127
     warning (no modification) when memories are non used (do not impact output) or when inputs are not used (do not impact output)
128
     *)
129

  
124 130
    let gg = IdentDepGraph.copy g in
125 131
    let sort = topological_sort eq_equiv g in
126 132

  
......
152 158
	  Liveness.pp_reuse_policy reuse
153 159
      );
154 160
 
155
    n', sort
161
    n', sort, (death, disjoint, reuse (* ??? *) )
156 162
(* let sorted = TopologicalDepGraph.fold (fun x res -> if ExprDep.is_instance_var x then res else x::res) g []*)
157 163
  with (Causality.Cycle v) as exc ->
158 164
    pp_error Format.err_formatter v;
......
160 166

  
161 167
let schedule_prog prog =
162 168
  List.fold_right (
163
    fun top_decl (accu_prog, sch_map)  ->
169
    fun top_decl (accu_prog, sch_map, death_map)  ->
164 170
      match top_decl.top_decl_desc with
165 171
	| Node nd -> 
166
	  let nd', sch = schedule_node nd in
167
	  {top_decl with top_decl_desc = Node nd'}::accu_prog, (nd.node_id, sch)::sch_map
168
	| _ -> top_decl::accu_prog, sch_map
172
	  let nd', sch, death_tbls = schedule_node nd in
173
	  {top_decl with top_decl_desc = Node nd'}::accu_prog, 
174
	  (nd.node_id, sch)::sch_map, 
175
	  (nd.node_id, death_tbls)::death_map
176
	| _ -> top_decl::accu_prog, sch_map, death_map
169 177
    ) 
170 178
    prog
171
    ([],[])
179
    ([],[],[])
172 180

  
173 181

  
174 182
(* Local Variables: *)

Also available in: Unified diff