From 458df74c1280ab4f6131272b20f8613cbd683f87 Mon Sep 17 00:00:00 2001 From: Cyril SIX Date: Fri, 18 Jan 2019 15:22:03 +0100 Subject: -O0 will not perform postpass scheduling --- driver/Clflags.ml | 1 + driver/Compopts.v | 3 +++ driver/Driver.ml | 4 +++- 3 files changed, 7 insertions(+), 1 deletion(-) (limited to 'driver') diff --git a/driver/Clflags.ml b/driver/Clflags.ml index a886ee9b..99ee41e7 100644 --- a/driver/Clflags.ml +++ b/driver/Clflags.ml @@ -27,6 +27,7 @@ let option_ftailcalls = ref true let option_fconstprop = ref true let option_fcse = ref true let option_fredundancy = ref true +let option_fpostpass = ref true let option_falignfunctions = ref (None: int option) let option_falignbranchtargets = ref 0 let option_faligncondbranchs = ref 0 diff --git a/driver/Compopts.v b/driver/Compopts.v index 2a213350..e6eecc9b 100644 --- a/driver/Compopts.v +++ b/driver/Compopts.v @@ -39,6 +39,9 @@ Parameter optim_CSE: unit -> bool. (** Flag -fredundancy. For dead code elimination. *) Parameter optim_redundancy: unit -> bool. +(** Flag -fpostpass. Postpass scheduling for K1 architecture *) +Parameter optim_postpass: unit -> bool. + (** Flag -fthumb. For the ARM back-end. *) Parameter thumb: unit -> bool. diff --git a/driver/Driver.ml b/driver/Driver.ml index 8ab8557c..467cf989 100644 --- a/driver/Driver.ml +++ b/driver/Driver.ml @@ -193,6 +193,7 @@ Processing options: (=0: none, =1: limited, =2: full; default is full) -fcse Perform common subexpression elimination [on] -fredundancy Perform redundancy elimination [on] + -fpostpass Perform postpass scheduling (only for K1 architecture) [on] -finline Perform inlining of functions [on] -finline-functions-called-once Integrate functions only required by their single caller [on] @@ -249,7 +250,7 @@ let dump_mnemonics destfile = exit 0 let optimization_options = [ - option_ftailcalls; option_fconstprop; option_fcse; option_fredundancy; option_finline_functions_called_once; + option_ftailcalls; option_fconstprop; option_fcse; option_fredundancy; option_fpostpass; option_finline_functions_called_once; ] let set_all opts () = List.iter (fun r -> r := true) opts @@ -361,6 +362,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 "inline" option_finline @ f_opt "inline-functions-called-once" option_finline_functions_called_once (* Code generation options *) -- cgit