Project

General

Profile

Revision d4807c3d src/scheduling.ml

View differences:

src/scheduling.ml
98 98
    !sorted
99 99
  end
100 100

  
101
(* Removes global constants from [node] schedule [sch] *)
102
let remove_consts node sch =
103
  let filter v = 
104
       List.exists (fun vdecl -> vdecl.var_id = v) node.node_locals
105
    || List.exists (fun vdecl -> vdecl.var_id = v) node.node_outputs in
106
  List.filter filter sch
107

  
108 101
let schedule_node n =
109 102
  try
110 103
    let eq_equiv = ExprDep.node_eq_equiv n in
......
115 108
    let n', g = global_dependency n in
116 109
    Log.report ~level:5 (fun fmt -> Format.eprintf "dependency graph for node %s: %a" n'.node_id pp_dep_graph g);
117 110
    let gg = IdentDepGraph.copy g in
118
    let sort = remove_consts n (topological_sort eq_equiv g) in
111
    let sort = topological_sort eq_equiv g in
119 112

  
120 113
    let death = Liveness.death_table n gg sort in
121 114
    Log.report ~level:5 (fun fmt -> Format.eprintf "death table for node %s: %a" n'.node_id Liveness.pp_death_table death);

Also available in: Unified diff