aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCyril SIX <cyril.six@kalray.eu>2019-04-29 18:02:58 +0200
committerCyril SIX <cyril.six@kalray.eu>2019-04-29 18:02:58 +0200
commitc3003517a048d7469a314fc245118ed72e2158dd (patch)
treec81f7d0f8249a4279117e35171a80c1a1ca9243b
parent92da04b18cf8067624ae6d3c118de91fbb4b90b2 (diff)
downloadcompcert-kvx-c3003517a048d7469a314fc245118ed72e2158dd.tar.gz
compcert-kvx-c3003517a048d7469a314fc245118ed72e2158dd.zip
The scheduler selection works, but the argument is not optional yet (-fpostpass nameofscheduler)
-rw-r--r--driver/Clflags.ml2
-rw-r--r--driver/Driver.ml7
-rw-r--r--mppa_k1c/PostpassSchedulingOracle.ml8
3 files changed, 13 insertions, 4 deletions
diff --git a/driver/Clflags.ml b/driver/Clflags.ml
index 4d70d350..5b8ad443 100644
--- a/driver/Clflags.ml
+++ b/driver/Clflags.ml
@@ -28,7 +28,7 @@ let option_fconstprop = ref true
let option_fcse = ref true
let option_fredundancy = ref true
let option_fpostpass = ref true
-let option_fpostpass_ilp = ref false
+let option_fpostpass_sched = ref "list"
let option_falignfunctions = ref (None: int option)
let option_falignbranchtargets = ref 0
let option_faligncondbranchs = ref 0
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 *)
diff --git a/mppa_k1c/PostpassSchedulingOracle.ml b/mppa_k1c/PostpassSchedulingOracle.ml
index bd804fd6..25bf99e0 100644
--- a/mppa_k1c/PostpassSchedulingOracle.ml
+++ b/mppa_k1c/PostpassSchedulingOracle.ml
@@ -756,11 +756,17 @@ let print_bb oc bb =
let do_schedule bb =
let problem = build_problem bb
+ in let solution = (if !Clflags.option_fpostpass_sched = "ilp" then
+ validated_scheduler cascaded_scheduler
+ 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
(* in let solution = validated_scheduler
(if !Clflags.option_fpostpass_ilp
then cascaded_scheduler
else dumb_scheduler) problem *)
- in let solution = dumb_scheduler problem
+ (* in let solution = dumb_scheduler problem *)
in match solution with
| None -> failwith "Could not find a valid schedule"
| Some sol -> let bundles = bundlize_solution bb sol in