From 66e15205c40de54639387a4c9b1cc78994525d55 Mon Sep 17 00:00:00 2001 From: "nicolas.nardino" Date: Mon, 14 Jun 2021 13:53:08 +0200 Subject: scheduler written, need to test now --- driver/Driver.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'driver') diff --git a/driver/Driver.ml b/driver/Driver.ml index 7192ba4b..5a8c7f2c 100644 --- a/driver/Driver.ml +++ b/driver/Driver.ml @@ -210,7 +210,7 @@ Processing options: -mtune= Type of CPU (for scheduling on some architectures) -fprepass Perform prepass scheduling (only on some architectures) [on] -fprepass= Perform postpass scheduling with the specified optimization [list] - (=list: list scheduling, =revlist: reverse list scheduling, =zigzag: zigzag scheduling, =ilp: ILP, =greedy: just packing bundles) + (=list: list scheduling, =revlist: reverse list scheduling, =regpres: list scheduling aware of register pressure, =zigzag: zigzag scheduling, =ilp: ILP, =greedy: just packing bundles) -fpostpass Perform postpass scheduling (only for K1 architecture) [on] -fpostpass= Perform postpass scheduling with the specified optimization [list] (=list: list scheduling, =ilp: ILP, =greedy: just packing bundles) -- cgit From 4413c27d6c6a3d69df34955d9d453c38b32174c7 Mon Sep 17 00:00:00 2001 From: "nicolas.nardino" Date: Thu, 17 Jun 2021 15:38:13 +0200 Subject: Add option to set thresold and support for riscv --- driver/Clflags.ml | 1 + driver/Driver.ml | 2 ++ 2 files changed, 3 insertions(+) (limited to 'driver') diff --git a/driver/Clflags.ml b/driver/Clflags.ml index fa17c2d9..1f31bd3e 100644 --- a/driver/Clflags.ml +++ b/driver/Clflags.ml @@ -115,4 +115,5 @@ let option_inline_auto_threshold = ref 0 let option_profile_arcs = ref false let option_fbranch_probabilities = ref true let option_debug_compcert = ref 0 +let option_regpres_threshold = ref 5 let main_function_name = ref "main" diff --git a/driver/Driver.ml b/driver/Driver.ml index 5a8c7f2c..fa187f26 100644 --- a/driver/Driver.ml +++ b/driver/Driver.ml @@ -211,6 +211,7 @@ Processing options: -fprepass Perform prepass scheduling (only on some architectures) [on] -fprepass= Perform postpass scheduling with the specified optimization [list] (=list: list scheduling, =revlist: reverse list scheduling, =regpres: list scheduling aware of register pressure, =zigzag: zigzag scheduling, =ilp: ILP, =greedy: just packing bundles) + -regpres-threshold n With `-fprepass= regpres`, set threshold value for number of free registers before trying to decrease register pressure -fpostpass Perform postpass scheduling (only for K1 architecture) [on] -fpostpass= Perform postpass scheduling with the specified optimization [list] (=list: list scheduling, =ilp: ILP, =greedy: just packing bundles) @@ -342,6 +343,7 @@ let cmdline_actions = Exact "-fprofile-use=", String (fun s -> Profilingaux.load_profiling_info s); Exact "-finline-auto-threshold", Integer (fun n -> option_inline_auto_threshold := n); Exact "-debug-compcert", Integer (fun n -> option_debug_compcert := n); + Exact "-regpres-threshold", Integer (fun n -> option_regpres_threshold := n); Exact "-fsmall-data", Integer(fun n -> option_small_data := n); Exact "-fsmall-const", Integer(fun n -> option_small_const := n); Exact "-ffloat-const-prop", Integer(fun n -> option_ffloatconstprop := n); -- cgit From 10cbe4b28ef6dc5d02c9a5d4d369484e4943a18d Mon Sep 17 00:00:00 2001 From: "nicolas.nardino" Date: Tue, 22 Jun 2021 15:57:21 +0200 Subject: Changed default threshold value following tests --- driver/Clflags.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'driver') diff --git a/driver/Clflags.ml b/driver/Clflags.ml index 1f31bd3e..c90fdb8c 100644 --- a/driver/Clflags.ml +++ b/driver/Clflags.ml @@ -115,5 +115,5 @@ let option_inline_auto_threshold = ref 0 let option_profile_arcs = ref false let option_fbranch_probabilities = ref true let option_debug_compcert = ref 0 -let option_regpres_threshold = ref 5 +let option_regpres_threshold = ref 2 let main_function_name = ref "main" -- cgit From dfa09586ae40c70769eeda688a0e7f59f611749f Mon Sep 17 00:00:00 2001 From: "nicolas.nardino" Date: Thu, 24 Jun 2021 18:33:20 +0200 Subject: Another scheduler --- driver/Driver.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'driver') diff --git a/driver/Driver.ml b/driver/Driver.ml index fa187f26..4f43d7c9 100644 --- a/driver/Driver.ml +++ b/driver/Driver.ml @@ -210,7 +210,7 @@ Processing options: -mtune= Type of CPU (for scheduling on some architectures) -fprepass Perform prepass scheduling (only on some architectures) [on] -fprepass= Perform postpass scheduling with the specified optimization [list] - (=list: list scheduling, =revlist: reverse list scheduling, =regpres: list scheduling aware of register pressure, =zigzag: zigzag scheduling, =ilp: ILP, =greedy: just packing bundles) + (=list: list scheduling, =revlist: reverse list scheduling, =regpres: list scheduling aware of register pressure, =regpres_bis: variant of regpres, =zigzag: zigzag scheduling, =ilp: ILP, =greedy: just packing bundles) -regpres-threshold n With `-fprepass= regpres`, set threshold value for number of free registers before trying to decrease register pressure -fpostpass Perform postpass scheduling (only for K1 architecture) [on] -fpostpass= Perform postpass scheduling with the specified optimization [list] -- cgit From b96a48de58e1969535865b7b345514a24f7178a6 Mon Sep 17 00:00:00 2001 From: "nicolas.nardino" Date: Mon, 28 Jun 2021 16:04:44 +0200 Subject: Change temporary solution (see prev commits), and add option for it --- driver/Clflags.ml | 1 + driver/Driver.ml | 2 ++ 2 files changed, 3 insertions(+) (limited to 'driver') diff --git a/driver/Clflags.ml b/driver/Clflags.ml index c90fdb8c..d01b57f0 100644 --- a/driver/Clflags.ml +++ b/driver/Clflags.ml @@ -116,4 +116,5 @@ let option_profile_arcs = ref false let option_fbranch_probabilities = ref true let option_debug_compcert = ref 0 let option_regpres_threshold = ref 2 +let option_regpres_temp = ref false let main_function_name = ref "main" diff --git a/driver/Driver.ml b/driver/Driver.ml index 4f43d7c9..22c75f44 100644 --- a/driver/Driver.ml +++ b/driver/Driver.ml @@ -212,6 +212,7 @@ Processing options: -fprepass= Perform postpass scheduling with the specified optimization [list] (=list: list scheduling, =revlist: reverse list scheduling, =regpres: list scheduling aware of register pressure, =regpres_bis: variant of regpres, =zigzag: zigzag scheduling, =ilp: ILP, =greedy: just packing bundles) -regpres-threshold n With `-fprepass= regpres`, set threshold value for number of free registers before trying to decrease register pressure + -fregpres-temp use the temporary solution (default no) -fpostpass Perform postpass scheduling (only for K1 architecture) [on] -fpostpass= Perform postpass scheduling with the specified optimization [list] (=list: list scheduling, =ilp: ILP, =greedy: just packing bundles) @@ -426,6 +427,7 @@ let cmdline_actions = @ f_opt "redundancy" option_fredundancy @ [ Exact "-mtune", String (fun s -> option_mtune := s) ] @ f_opt "prepass" option_fprepass + @ f_opt "regpres-temp" option_regpres_temp @ f_opt "postpass" option_fpostpass @ [ Exact "-ftailduplicate", Integer (fun n -> option_ftailduplicate := n) ] @ f_opt "predict" option_fpredict -- cgit From 67f4ae2b702cc95ed7cef67b726e15abbf18e768 Mon Sep 17 00:00:00 2001 From: David Monniaux Date: Fri, 16 Jul 2021 15:26:03 +0200 Subject: use a more recognizable option name --- driver/Clflags.ml | 2 +- driver/Driver.ml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'driver') diff --git a/driver/Clflags.ml b/driver/Clflags.ml index d01b57f0..085eaa7e 100644 --- a/driver/Clflags.ml +++ b/driver/Clflags.ml @@ -116,5 +116,5 @@ let option_profile_arcs = ref false let option_fbranch_probabilities = ref true let option_debug_compcert = ref 0 let option_regpres_threshold = ref 2 -let option_regpres_temp = ref false +let option_regpres_wait_window = ref false let main_function_name = ref "main" diff --git a/driver/Driver.ml b/driver/Driver.ml index 22c75f44..79353f32 100644 --- a/driver/Driver.ml +++ b/driver/Driver.ml @@ -212,7 +212,7 @@ Processing options: -fprepass= Perform postpass scheduling with the specified optimization [list] (=list: list scheduling, =revlist: reverse list scheduling, =regpres: list scheduling aware of register pressure, =regpres_bis: variant of regpres, =zigzag: zigzag scheduling, =ilp: ILP, =greedy: just packing bundles) -regpres-threshold n With `-fprepass= regpres`, set threshold value for number of free registers before trying to decrease register pressure - -fregpres-temp use the temporary solution (default no) + -fregpres-wait-window When register pressure is high, use a 5-cycle waiting window instead of scheduling short paths first (default no) -fpostpass Perform postpass scheduling (only for K1 architecture) [on] -fpostpass= Perform postpass scheduling with the specified optimization [list] (=list: list scheduling, =ilp: ILP, =greedy: just packing bundles) @@ -427,7 +427,7 @@ let cmdline_actions = @ f_opt "redundancy" option_fredundancy @ [ Exact "-mtune", String (fun s -> option_mtune := s) ] @ f_opt "prepass" option_fprepass - @ f_opt "regpres-temp" option_regpres_temp + @ f_opt "regpres-wait-window" option_regpres_wait_window @ f_opt "postpass" option_fpostpass @ [ Exact "-ftailduplicate", Integer (fun n -> option_ftailduplicate := n) ] @ f_opt "predict" option_fpredict -- cgit From 2ff766a18432fd75739abab0b5741ded6b67a2a5 Mon Sep 17 00:00:00 2001 From: David Monniaux Date: Fri, 16 Jul 2021 15:29:25 +0200 Subject: activate register pressure by default --- driver/Clflags.ml | 2 +- driver/Driver.ml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'driver') diff --git a/driver/Clflags.ml b/driver/Clflags.ml index 085eaa7e..25bd2c78 100644 --- a/driver/Clflags.ml +++ b/driver/Clflags.ml @@ -51,7 +51,7 @@ let option_flooprotate = ref 0 (* rotate the innermost loops to have the conditi let option_mtune = ref "" let option_fprepass = ref true -let option_fprepass_sched = ref "list" +let option_fprepass_sched = ref "regpres" let option_fpostpass = ref true let option_fpostpass_sched = ref "list" diff --git a/driver/Driver.ml b/driver/Driver.ml index 79353f32..3f5a4bd9 100644 --- a/driver/Driver.ml +++ b/driver/Driver.ml @@ -298,9 +298,9 @@ 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_str name ref strref = + let f_opt_str name default ref strref = [Exact("-f" ^ name ^ "="), String - (fun s -> (strref := (if s == "" then "list" else s)); ref := true) + (fun s -> (strref := (if s == "" then default else s)); ref := true) ] in let f_str name strref default = [Exact("-f" ^ name ^ "="), String @@ -435,8 +435,8 @@ let cmdline_actions = @ [ Exact "-funrollbody", Integer (fun n -> option_funrollbody := n) ] @ [ Exact "-flooprotate", Integer (fun n -> option_flooprotate := n) ] @ f_opt "tracelinearize" option_ftracelinearize - @ f_opt_str "prepass" option_fprepass option_fprepass_sched - @ f_opt_str "postpass" option_fpostpass option_fpostpass_sched + @ f_opt_str "prepass" "regpress" option_fprepass option_fprepass_sched + @ f_opt_str "postpass" "list" option_fpostpass option_fpostpass_sched @ f_opt "inline" option_finline @ f_opt "inline-functions-called-once" option_finline_functions_called_once @ f_opt "globaladdrtmp" option_fglobaladdrtmp -- cgit