diff options
author | David Monniaux <David.Monniaux@univ-grenoble-alpes.fr> | 2021-07-16 21:52:22 +0200 |
---|---|---|
committer | David Monniaux <David.Monniaux@univ-grenoble-alpes.fr> | 2021-07-16 21:52:22 +0200 |
commit | 7bcf7240186f670786c9daba0ffff768c180fd83 (patch) | |
tree | 9e7546e3c8ad54d35d47fb0767202aa3e90dd499 /backend/CSE3.v | |
parent | bd561273f2ff471f2d42552e20035b5ae5281453 (diff) | |
download | compcert-kvx-7bcf7240186f670786c9daba0ffff768c180fd83.tar.gz compcert-kvx-7bcf7240186f670786c9daba0ffff768c180fd83.zip |
make operations cse3 parametric
Diffstat (limited to 'backend/CSE3.v')
-rw-r--r-- | backend/CSE3.v | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/backend/CSE3.v b/backend/CSE3.v index 21067720..54a8a3bc 100644 --- a/backend/CSE3.v +++ b/backend/CSE3.v @@ -24,7 +24,9 @@ Axiom preanalysis : typing_env -> RTL.function -> invariants * analysis_hints. Record cse3params : Type := mkcse3params { cse3_conditions : bool; - cse3_trivial_ops : bool; + cse3_operations : bool; + cse3_loads : bool; + cse3_trivial_ops: bool; }. Section PARAMS. @@ -89,7 +91,7 @@ Definition param_transf_instr (fmap : PMap.t RB.t) match instr with | Iop op args dst s => let args' := subst_args fmap pc args in - match (if (negb params.(cse3_trivial_ops)) && (is_trivial_op op) + match (if (negb params.(cse3_operations) || ((negb params.(cse3_trivial_ops)) && (is_trivial_op op))) then None else find_op_in_fmap fmap pc op args') with | None => Iop op args' dst s | Some src => Iop Omove (src::nil) dst s @@ -144,6 +146,8 @@ End PARAMS. Definition cmdline_params (_ : unit) := {| cse3_conditions := Compopts.optim_CSE3_conditions tt; - cse3_trivial_ops := Compopts.optim_CSE3_trivial_ops tt |}. + cse3_operations := true; + cse3_loads := true; + cse3_trivial_ops:= Compopts.optim_CSE3_trivial_ops tt |}. Definition transf_program p := param_transf_program (cmdline_params tt) p. |