Skip to content
Snippets Groups Projects
Commit f69e7ea2 authored by BRUN Lelio's avatar BRUN Lelio
Browse files

add -O -1 flag to disable fusion of conditionals

parent 7a1b2819
No related branches found
No related tags found
No related merge requests found
......@@ -2,14 +2,14 @@
let join_guards = ref true
let setup () =
match !Options.output with
| "emf" ->
(* Not merging branches *)
join_guards := false;
(* In case of a default "int" type, substitute it with the legal int32 value *)
if !Options.int_type = "int" then
Options.int_type := "int32"
| _ -> ()
if !Options.output = "emf" then begin
(* Not merging branches *)
join_guards := false;
(* In case of a default "int" type, substitute it with the legal int32 value *)
if !Options.int_type = "int" then Options.int_type := "int32"
end;
if !Options.optimization < 0 then
join_guards := false
let is_functional () =
match !Options.output with
......
......@@ -57,7 +57,7 @@ let compile dirname basename extension =
let params = Backends.get_normalization_params () in
let prog, dependencies =
Log.report ~level:1 (fun fmt -> fprintf fmt "@[<v 2>.. Phase 1 : Normalisation@,");
Log.report ~level:1 (fun fmt -> fprintf fmt "@[<v 2>.. Phase 1: Normalisation@,");
try
Compiler_stages.stage1 params prog dirname basename extension
with Compiler_stages.StopPhase1 prog -> (
......@@ -124,11 +124,12 @@ let anonymous filename =
else
ok, ext)
(false, "") extensions in
if ok_ext then
if ok_ext then begin
Options_management.setup();
let dirname = Filename.dirname filename in
let basename = Filename.chop_suffix (Filename.basename filename) ext in
compile dirname basename ext
else
end else
raise (Arg.Bad ("Can only compile *.lusi, *.lus or *.ec files"))
let _ =
......
......@@ -65,8 +65,7 @@ let al_nb_max = ref 15
(* Printer options *)
let kind2_print = ref false
(* Local Variables: *)
(* compile-command:"make -C .." *)
(* End: *)
......@@ -88,10 +88,12 @@ let set_real_type s =
)
| _ -> real_type := s
let set_backend s =
output := s;
let setup () =
Backends.setup ()
let set_backend s =
output := s
let common_options =
[ "-d", Arg.Set_string dest_dir, "uses the specified \x1b[4mdirectory\x1b[0m as root for generated/imported object and C files <default: .>";
"-I", Arg.String add_include_dir, "sets include \x1b[4mdirectory\x1b[0m";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment