Project

General

Profile

« Previous | Next » 

Revision c825868a

Added by Xavier Thirioux over 10 years ago

added a new option -print_reuse that prints clock disjoint variables and reuse policy.
useful for debugging and carrying correctness proofs to the C code level.
non trivial result only when option -O 3 or above is activated.

View differences:

src/scheduling.ml
153 153
    let unused = Liveness.compute_unused_variables n gg in
154 154
    let fanin = Liveness.compute_fanin n gg in
155 155
 
156
    let disjoint = Disjunction.clock_disjoint_map node_vars in
157
    
158
    Log.report ~level:3 
159
      (fun fmt -> 
160
	Format.fprintf fmt
161
	  "clock disjoint map for node %s: %a" 
162
	  n'.node_id
163
	  Disjunction.pp_disjoint_map disjoint
164
      );
165

  
166
    let reuse = Liveness.compute_reuse_policy n sort disjoint gg in
167
 
156
    let (disjoint, reuse) =
157
      if !Options.optimization >= 3
158
      then
159
	let disjoint = Disjunction.clock_disjoint_map node_vars in
160
	(disjoint,
161
	 Liveness.compute_reuse_policy n sort disjoint gg)
162
      else
163
	(Hashtbl.create 1,
164
	 Hashtbl.create 1) in
165

  
166
    if !Options.print_reuse
167
    then
168
      begin
169
	Log.report ~level:0 
170
	  (fun fmt -> 
171
	    Format.fprintf fmt
172
	      "OPT:clock disjoint map for node %s: %a" 
173
	      n'.node_id
174
	      Disjunction.pp_disjoint_map disjoint
175
	  );
176
	Log.report ~level:0 
177
	  (fun fmt -> 
178
	    Format.fprintf fmt
179
	      "OPT:reuse policy for node %s: %a" 
180
	      n'.node_id
181
	      Liveness.pp_reuse_policy reuse
182
	  );
183
      end;
168 184
    n', { schedule = sort; unused_vars = unused; fanin_table = fanin; reuse_table = reuse }
169 185
  with (Causality.Cycle vl) as exc ->
170 186
    let vl = filter_original n vl in

Also available in: Unified diff