diff options
-rw-r--r-- | driver/Driver.ml | 14 | ||||
-rw-r--r-- | mppa_k1c/PostpassSchedulingOracle.ml | 2 |
2 files changed, 9 insertions, 7 deletions
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= <optim> Perform postpass scheduling with the specified optimization [list] + (<optim>=list: list scheduling, <optim>=ilp: ILP, <optim>=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 *) diff --git a/mppa_k1c/PostpassSchedulingOracle.ml b/mppa_k1c/PostpassSchedulingOracle.ml index 25bf99e0..41a5454b 100644 --- a/mppa_k1c/PostpassSchedulingOracle.ml +++ b/mppa_k1c/PostpassSchedulingOracle.ml @@ -761,7 +761,7 @@ let do_schedule bb = else if !Clflags.option_fpostpass_sched = "list" then validated_scheduler list_scheduler else if !Clflags.option_fpostpass_sched = "dumb" then - dumb_scheduler else failwith "No scheduler provided") problem + dumb_scheduler else failwith ("Invalid scheduler:" ^ !Clflags.option_fpostpass_sched)) problem (* in let solution = validated_scheduler (if !Clflags.option_fpostpass_ilp then cascaded_scheduler |