Added -nbvars option for performance evaluation

master
Gwenal Delaval 12 years ago
parent ef536f412d
commit ce2e2bdcd0

@ -146,6 +146,7 @@ let main () =
"-fti", Arg.Set full_type_info, doc_full_type_info;
"-statefuli", Arg.Set stateful_info, doc_stateful_info;
"-fname", Arg.Set full_name, doc_full_name;
"-nbvars", Arg.Set nbvars, doc_nbvars;
"-itfusion", Arg.Set do_iterator_fusion, doc_itfusion;
"-strict_ssa", Arg.Unit set_strict_ssa, doc_strict_ssa;
"-nosink", Arg.Set nosink, doc_nosink;

@ -433,7 +433,15 @@ let translate_node
proc_constraints = constraints;
proc_body = body@body_c@body_sink;
proc_objectives = [obj] } in
if !Compiler_options.nbvars then
begin
(* Print out nb of vars *)
let nbs = List.length p.proc_states in
let nbi = List.length inputs in
let nbc = List.length controllables in
Printf.printf "%s %d %d %d %d\n" f nbs nbi nbc (nbs+nbi+nbc);
end;
let ctrlr_call =
begin
match controllables with

@ -106,6 +106,8 @@ let stateful_info = ref false
let full_name = ref false
let nbvars = ref false
let causality = ref true
let init = ref true
@ -188,6 +190,7 @@ and doc_target =
and doc_full_type_info = "\t\t\tPrint full type information"
and doc_stateful_info = "\t\tPrint stateful information"
and doc_full_name = "\t\tPrint full variable name information"
and doc_nbvars = "\t\tPrint information about number of variables"
and doc_target_path =
"<path>\tGenerated files will be placed in <path>\n\t\t\t(the directory is"
^ " cleaned)"

Loading…
Cancel
Save