diff options
author | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2020-10-30 23:38:30 +0100 |
---|---|---|
committer | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2020-10-30 23:38:30 +0100 |
commit | b8b9c8a4b90c8623b5d728a56382d2282441554d (patch) | |
tree | 030be028ca63abc7e704aa049fedb7f848204aa9 | |
parent | c93fc8d1316c85d12efe015d71a378d8c4598cfb (diff) | |
download | compcert-kvx-b8b9c8a4b90c8623b5d728a56382d2282441554d.tar.gz compcert-kvx-b8b9c8a4b90c8623b5d728a56382d2282441554d.zip |
does not catch it
-rw-r--r-- | backend/LICMaux.ml | 3 | ||||
-rw-r--r-- | driver/Clflags.ml | 1 | ||||
-rw-r--r-- | driver/Compopts.v | 3 | ||||
-rw-r--r-- | driver/Driver.ml | 1 | ||||
-rw-r--r-- | extraction/extraction.v | 2 | ||||
-rw-r--r-- | tools/compiler_expand.ml | 5 |
6 files changed, 13 insertions, 2 deletions
diff --git a/backend/LICMaux.ml b/backend/LICMaux.ml index 0ca4418b..42b8eeb7 100644 --- a/backend/LICMaux.ml +++ b/backend/LICMaux.ml @@ -208,7 +208,8 @@ let rewrite_loop_body (last_alloc : reg ref) (List.map (map_reg mapper) args), new_res)); PTree.set res new_res mapper - | Iload(trap, chunk, addr, args, res, pc') + | Iload(_, chunk, addr, args, res, pc') + | Istore(chunk, addr, args, res, pc') when Archi.has_notrap_loads && !Clflags.option_fnontrap_loads -> let new_res = P.succ !last_alloc in diff --git a/driver/Clflags.ml b/driver/Clflags.ml index f1f7ba52..bda0f438 100644 --- a/driver/Clflags.ml +++ b/driver/Clflags.ml @@ -107,6 +107,7 @@ let option_fcoalesce_mem = ref true let option_fforward_moves = ref false let option_fmove_loop_invariants = ref false let option_fmove_loop_invariants_2 = ref false +let option_fmove_loop_invariants_s = ref false let option_fnontrap_loads = ref true let option_all_loads_nontrap = ref false let option_inline_auto_threshold = ref 0 diff --git a/driver/Compopts.v b/driver/Compopts.v index c8ca68c6..0bd1793b 100644 --- a/driver/Compopts.v +++ b/driver/Compopts.v @@ -66,6 +66,9 @@ Parameter optim_move_loop_invariants: unit -> bool. (** Flag -fmove-loop-invariants_2. *) Parameter optim_move_loop_invariants_2: unit -> bool. +(** Flag -fmove-loop-invariants_s. *) +Parameter optim_move_loop_invariants_s: unit -> bool. + (** Flag -fredundancy. For dead code elimination. *) Parameter optim_redundancy: unit -> bool. diff --git a/driver/Driver.ml b/driver/Driver.ml index adcbb8be..9aba32f8 100644 --- a/driver/Driver.ml +++ b/driver/Driver.ml @@ -460,6 +460,7 @@ let cmdline_actions = @ f_opt "cse3-trivial-ops" option_fcse3_trivial_ops @ f_opt "move-loop-invariants" option_fmove_loop_invariants @ f_opt "move-loop-invariants_2" option_fmove_loop_invariants_2 + @ f_opt "move-loop-invariants_s" option_fmove_loop_invariants_s @ f_opt "redundancy" option_fredundancy @ f_opt "postpass" option_fpostpass @ [ Exact "-ftailduplicate", Integer (fun n -> option_ftailduplicate := n) ] diff --git a/extraction/extraction.v b/extraction/extraction.v index f2172a27..15651610 100644 --- a/extraction/extraction.v +++ b/extraction/extraction.v @@ -135,6 +135,8 @@ Extract Constant Compopts.optim_move_loop_invariants => "fun _ -> !Clflags.option_fmove_loop_invariants". Extract Constant Compopts.optim_move_loop_invariants_2 => "fun _ -> !Clflags.option_fmove_loop_invariants_2". +Extract Constant Compopts.optim_move_loop_invariants_s => + "fun _ -> !Clflags.option_fmove_loop_invariants_s". Extract Constant Compopts.optim_redundancy => "fun _ -> !Clflags.option_fredundancy". diff --git a/tools/compiler_expand.ml b/tools/compiler_expand.ml index 31539d57..1da8c21a 100644 --- a/tools/compiler_expand.ml +++ b/tools/compiler_expand.ml @@ -41,12 +41,15 @@ TOTAL, (Option "optim_forward_moves"), Require, (Some "Forwarding moves"), "Forw TOTAL, (Option "all_loads_nontrap"), Require, None, "Allnontrap"; PARTIAL, Always, Require, (Some "Unused globals"), "Unusedglob"; PARTIAL, (Option "optim_redundancy"), Require, (Some "Redundancy elimination"), "Deadcode"; -PARTIAL, (Option "optim_move_loop_invariants"), Require, (Some "LICM"), "LICM"; +PARTIAL, (Option "optim_move_loop_invariants_s"), Require, (Some "LICM"), "LICM"; +TOTAL, (Option "optim_move_loop_invariants_s"), NoRequire, (Some "Renumbering post LICM"), "Renumber"; |];; let post_ssa_passes = [| TOTAL, Always, NoRequire, (Some "Renumbering pre CSE_2"), "Renumber"; +TOTAL, Always, Require, (Some "Forwarding moves"), "ForwardMoves"; +PARTIAL, (Option "optim_redundancy"), Require, (Some "Redundancy elimination"), "Deadcode"; PARTIAL, (Option "optim_move_loop_invariants_2"), Require, (Some "LICM_2"), "LICM"; TOTAL, (Option "optim_move_loop_invariants_2"), NoRequire, (Some "Renumbering post LICM"), "Renumber"; PARTIAL, (Option "optim_CSE3_2"), Require, (Some "CSE3_2"), "CSE3"; |