Revision e7cc5186 src/scheduling.ml
src/scheduling.ml  

130  130  
131  131 
let schedule_node n = 
132  132 
(* let node_vars = get_node_vars n in *) 
133 
try 

134 
let eq_equiv = ExprDep.node_eq_equiv n in 

135 
let eq_equiv v1 v2 = 

136 
try 

137 
Hashtbl.find eq_equiv v1 = Hashtbl.find eq_equiv v2 

138 
with Not_found > false in 

133 
let eq_equiv = ExprDep.node_eq_equiv n in 

134 
let eq_equiv v1 v2 = 

135 
try 

136 
Hashtbl.find eq_equiv v1 = Hashtbl.find eq_equiv v2 

137 
with Not_found > false in 

139  138  
140 
let n', g = global_dependency n in


141 


142 
(* TODO X: extend the graph with inputs (adapt the causality analysis to deal with inputs


139 
let n', g = global_dependency n in 

140 


141 
(* TODO X: extend the graph with inputs (adapt the causality analysis to deal with inputs 

143  142 
compute: coi predecessors of outputs 
144  143 
warning (no modification) when memories are non used (do not impact output) or when inputs are not used (do not impact output) 
145 
DONE !


146 
*)


144 
DONE ! 

145 
*) 

147  146  
148 
let gg = IdentDepGraph.copy g in


149 
let sort = topological_sort eq_equiv g in


150 
let unused = Liveness.compute_unused_variables n gg in


151 
let fanin = Liveness.compute_fanin n gg in


152 
{ node = n'; schedule = sort; unused_vars = unused; fanin_table = fanin; dep_graph = gg; }


147 
let gg = IdentDepGraph.copy g in 

148 
let sort = topological_sort eq_equiv g in 

149 
let unused = Liveness.compute_unused_variables n gg in 

150 
let fanin = Liveness.compute_fanin n gg in 

151 
{ node = n'; schedule = sort; unused_vars = unused; fanin_table = fanin; dep_graph = gg; } 

153  152  
154 
with (Causality.Error err) as exc > 

155 
match err with 

156 
 DataCycle vl > 

157 
let _ (*vl*) = filter_original n vl in 

158 
Causality.pp_error Format.err_formatter err; 

159 
raise exc 

160 
 _ > raise exc 

161  153  
162  154 
let compute_node_reuse_table report = 
163  155 
let disjoint = Disjunction.clock_disjoint_map (get_node_vars report.node) in 
Also available in: Unified diff