From a100edde18de43cf933c0d53467e196541436e13 Mon Sep 17 00:00:00 2001 From: David Monniaux Date: Wed, 2 Dec 2020 19:00:21 +0100 Subject: start checking for bugs --- 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 bc8a7925..8286f4f3 100644 --- a/driver/Clflags.ml +++ b/driver/Clflags.ml @@ -34,7 +34,7 @@ let option_fcse3_across_calls = ref false let option_fcse3_across_merges = ref true let option_fcse3_glb = ref true let option_fcse3_trivial_ops = ref false -let option_fcse3_refine = ref true +let option_fcse3_refine = ref false (* DM *) let option_fredundancy = ref true (** Options relative to superblock scheduling *) -- cgit From cf8ff0b0407cd0b4981f363418fde7f96e95d6a5 Mon Sep 17 00:00:00 2001 From: David Monniaux Date: Wed, 9 Dec 2020 08:46:25 +0100 Subject: CSE3 compiles again, but some admitted lemmas --- 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 eebc170a..991720bf 100644 --- a/driver/Clflags.ml +++ b/driver/Clflags.ml @@ -34,7 +34,7 @@ let option_fcse3_across_calls = ref false let option_fcse3_across_merges = ref true let option_fcse3_glb = ref true let option_fcse3_trivial_ops = ref false -let option_fcse3_refine = ref false (* DM *) +let option_fcse3_refine = ref true let option_fredundancy = ref true (** Options relative to superblock scheduling *) -- cgit From 0a13bf127bb385df424bd9e392742d4fc5bef86a Mon Sep 17 00:00:00 2001 From: David Monniaux Date: Wed, 9 Dec 2020 13:15:53 +0100 Subject: begin implementing -fcse3-conditions --- driver/Clflags.ml | 2 ++ driver/Compopts.v | 3 +++ driver/Driver.ml | 2 ++ 3 files changed, 7 insertions(+) (limited to 'driver') diff --git a/driver/Clflags.ml b/driver/Clflags.ml index 991720bf..55d1bb1c 100644 --- a/driver/Clflags.ml +++ b/driver/Clflags.ml @@ -35,6 +35,8 @@ let option_fcse3_across_merges = ref true let option_fcse3_glb = ref true let option_fcse3_trivial_ops = ref false let option_fcse3_refine = ref true +let option_fcse3_conditions = ref true + let option_fredundancy = ref true (** Options relative to superblock scheduling *) diff --git a/driver/Compopts.v b/driver/Compopts.v index 0c90ee52..65264124 100644 --- a/driver/Compopts.v +++ b/driver/Compopts.v @@ -57,6 +57,9 @@ Parameter optim_CSE3_glb: unit -> bool. (** Flag -fcse3-trivial-ops. For DMonniaux's common subexpression elimination, simplify trivial operations as well. *) Parameter optim_CSE3_trivial_ops: unit -> bool. +(** Flag -fcse3-conditions. For DMonniaux's common subexpression elimination: remove redundant conditional branches. *) +Parameter optim_CSE3_conditions: unit -> bool. + (** Flag -fmove-loop-invariants. *) Parameter optim_move_loop_invariants: unit -> bool. diff --git a/driver/Driver.ml b/driver/Driver.ml index 089cd423..38028806 100644 --- a/driver/Driver.ml +++ b/driver/Driver.ml @@ -204,6 +204,7 @@ Processing options: -fcse3-glb Refine CSE3 information using greatest lower bounds [on] -fcse3-trivial-ops Replace trivial operations as well using CSE3 [off] -fcse3-refine Refine CSE3 invariants by descending iteration [on] + -fcse3-conditions Remove redundant conditions using CSE3 [on] -fmove-loop-invariants Perform loop-invariant code motion [off] -fredundancy Perform redundancy elimination [on] -mtune= Type of CPU (for scheduling on some architectures) @@ -418,6 +419,7 @@ let cmdline_actions = @ f_opt "cse3-glb" option_fcse3_glb @ f_opt "cse3-trivial-ops" option_fcse3_trivial_ops @ f_opt "cse3-refine" option_fcse3_refine + @ f_opt "cse3-conditions" option_fcse3_conditions @ f_opt "move-loop-invariants" option_fmove_loop_invariants @ f_opt "redundancy" option_fredundancy @ [ Exact "-mtune", String (fun s -> option_mtune := s) ] -- cgit