Commit 3505ed6e authored by POTTIER Francois's avatar POTTIER Francois

Settings: introduce -O.

parent 9456b795
......@@ -203,6 +203,9 @@ let interpret_show_cst =
let interpret_error =
ref false
let optimization_level =
ref 0
let table =
ref false
......@@ -402,6 +405,7 @@ let options = Arg.align [
"-lg", Arg.Set_int logG, " Synonymous with --log-grammar";
"-la", Arg.Set_int logA, " Synonymous with --log-automaton";
"-lc", Arg.Set_int logC, " Synonymous with --log-code";
"-O", Arg.Set_int optimization_level, " (0|1) Set optimization level";
"-t", Arg.Set table, " Synonymous with --table";
"-v", Arg.Unit v, " Synonymous with --dump --explain";
]
......@@ -544,6 +548,12 @@ let interpret_show_cst =
let interpret_error =
!interpret_error
let optimization_level =
!optimization_level
let optimize_for_code_size =
optimization_level = 0
let table =
!table
......
......@@ -153,6 +153,13 @@ val interpret_show_cst : bool
val interpret_error : bool
(* The setting -O allows choosing an optimization level. At the moment, -O 0
(which is the default) means "optimize for code size", while -O 1 means
"optimize for speed". This concerns the code back-end only. *)
val optimization_level: int
val optimize_for_code_size: bool
(* Whether to use the table-based back-end ([true]) or the code-based
back-end ([false]). *)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment