From c3003517a048d7469a314fc245118ed72e2158dd Mon Sep 17 00:00:00 2001 From: Cyril SIX Date: Mon, 29 Apr 2019 18:02:58 +0200 Subject: The scheduler selection works, but the argument is not optional yet (-fpostpass nameofscheduler) --- driver/Driver.ml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'driver/Driver.ml') diff --git a/driver/Driver.ml b/driver/Driver.ml index c68c066a..9a2eca1f 100644 --- a/driver/Driver.ml +++ b/driver/Driver.ml @@ -264,6 +264,10 @@ let num_input_files = ref 0 let cmdline_actions = let f_opt name ref = [Exact("-f" ^ name), Set ref; Exact("-fno-" ^ name), Unset ref] in + let f_opt_postpass name ref = + [Exact("-f" ^ name), String + (fun s -> (option_fpostpass_sched := (if s == "" then "list" else s)); ref := true); + Exact("-fno-" ^ name), Unset ref] in [ (* Getting help *) Exact "-help", Unit print_usage_and_exit; @@ -363,8 +367,7 @@ let cmdline_actions = @ f_opt "const-prop" option_fconstprop @ f_opt "cse" option_fcse @ f_opt "redundancy" option_fredundancy - @ f_opt "postpass" option_fpostpass - @ f_opt "postpass-ilp" option_fpostpass_ilp + @ f_opt_postpass "postpass" option_fpostpass @ f_opt "inline" option_finline @ f_opt "inline-functions-called-once" option_finline_functions_called_once (* Code generation options *) -- cgit From e570597b2f80a2a86b8672a40387dc63fd31b555 Mon Sep 17 00:00:00 2001 From: Cyril SIX Date: Tue, 30 Apr 2019 11:08:38 +0200 Subject: Setting fpostpass= option --- driver/Driver.ml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'driver/Driver.ml') diff --git a/driver/Driver.ml b/driver/Driver.ml index 9a2eca1f..2672ed99 100644 --- a/driver/Driver.ml +++ b/driver/Driver.ml @@ -194,7 +194,8 @@ Processing options: -fcse Perform common subexpression elimination [on] -fredundancy Perform redundancy elimination [on] -fpostpass Perform postpass scheduling (only for K1 architecture) [on] - -fpostpass-ilp Use integer linear programming for postpass scheduling [off] + -fpostpass= Perform postpass scheduling with the specified optimization [list] + (=list: list scheduling, =ilp: ILP, =dumb: just packing bundles) -finline Perform inlining of functions [on] -finline-functions-called-once Integrate functions only required by their single caller [on] @@ -264,10 +265,10 @@ let num_input_files = ref 0 let cmdline_actions = let f_opt name ref = [Exact("-f" ^ name), Set ref; Exact("-fno-" ^ name), Unset ref] in - let f_opt_postpass name ref = - [Exact("-f" ^ name), String - (fun s -> (option_fpostpass_sched := (if s == "" then "list" else s)); ref := true); - Exact("-fno-" ^ name), Unset ref] in + let f_opt_str name ref strref = + [Exact("-f" ^ name ^ "="), String + (fun s -> (strref := (if s == "" then "list" else s)); ref := true) + ] in [ (* Getting help *) Exact "-help", Unit print_usage_and_exit; @@ -367,7 +368,8 @@ let cmdline_actions = @ f_opt "const-prop" option_fconstprop @ f_opt "cse" option_fcse @ f_opt "redundancy" option_fredundancy - @ f_opt_postpass "postpass" option_fpostpass + @ f_opt "postpass" option_fpostpass + @ f_opt_str "postpass" option_fpostpass option_fpostpass_sched @ f_opt "inline" option_finline @ f_opt "inline-functions-called-once" option_finline_functions_called_once (* Code generation options *) -- cgit