aboutsummaryrefslogtreecommitdiffstats
path: root/riscV
diff options
context:
space:
mode:
authorLéo Gourdin <leo.gourdin@univ-grenoble-alpes.fr>2021-03-08 09:41:01 +0100
committerLéo Gourdin <leo.gourdin@univ-grenoble-alpes.fr>2021-03-08 09:41:01 +0100
commitd1d6493816e7c561f82f7549f100442f0bf52a15 (patch)
tree4edd851c7d062f7ef03ae380ff5fcc82036dda4c /riscV
parent0b402973b88e85662dda8807b1839e1e5b0a56df (diff)
downloadcompcert-kvx-d1d6493816e7c561f82f7549f100442f0bf52a15.tar.gz
compcert-kvx-d1d6493816e7c561f82f7549f100442f0bf52a15.zip
Adding miniCSE here too
Diffstat (limited to 'riscV')
-rw-r--r--riscV/ExpansionOracle.ml20
1 files changed, 10 insertions, 10 deletions
diff --git a/riscV/ExpansionOracle.ml b/riscV/ExpansionOracle.ml
index a61e5c95..b3c19802 100644
--- a/riscV/ExpansionOracle.ml
+++ b/riscV/ExpansionOracle.ml
@@ -451,7 +451,7 @@ let rec write_tree exp current code' new_order =
| _ -> failwith "ExpansionOracle.write_tree: inconsistent instruction."
let expanse (sb : superblock) code pm =
- debug_flag := true;
+ (*debug_flag := true;*)
let new_order = ref [] in
let liveins = ref sb.liveins in
let exp = ref [] in
@@ -479,11 +479,11 @@ let expanse (sb : superblock) code pm =
was_exp := true
| Iop (Ocmp (Ccompimm (c, imm)), a1 :: nil, dest, succ) ->
debug "Iop/Ccompimm\n";
- exp := expanse_condimm_int32s c a1 imm dest succ [];
+ exp := expanse_condimm_int32s c a1 imm dest succ [] map_consts;
was_exp := true
| Iop (Ocmp (Ccompuimm (c, imm)), a1 :: nil, dest, succ) ->
debug "Iop/Ccompuimm\n";
- exp := expanse_condimm_int32u c a1 imm dest succ [];
+ exp := expanse_condimm_int32u c a1 imm dest succ [] map_consts;
was_exp := true
| Iop (Ocmp (Ccompl c), a1 :: a2 :: nil, dest, succ) ->
debug "Iop/Ccompl\n";
@@ -495,11 +495,11 @@ let expanse (sb : superblock) code pm =
was_exp := true
| Iop (Ocmp (Ccomplimm (c, imm)), a1 :: nil, dest, succ) ->
debug "Iop/Ccomplimm\n";
- exp := expanse_condimm_int64s c a1 imm dest succ [];
+ exp := expanse_condimm_int64s c a1 imm dest succ [] map_consts;
was_exp := true
| Iop (Ocmp (Ccompluimm (c, imm)), a1 :: nil, dest, succ) ->
debug "Iop/Ccompluimm\n";
- exp := expanse_condimm_int64u c a1 imm dest succ [];
+ exp := expanse_condimm_int64u c a1 imm dest succ [] map_consts;
was_exp := true
| Iop (Ocmp (Ccompf c), f1 :: f2 :: nil, dest, succ) ->
debug "Iop/Ccompf\n";
@@ -530,12 +530,12 @@ let expanse (sb : superblock) code pm =
was_exp := true
| Icond (Ccompimm (c, imm), a1 :: nil, succ1, succ2, info) ->
debug "Icond/Ccompimm\n";
- exp := expanse_cbranchimm_int32s c a1 imm info succ1 succ2 [];
+ exp := expanse_cbranchimm_int32s c a1 imm info succ1 succ2 [] map_consts;
was_branch := true;
was_exp := true
| Icond (Ccompuimm (c, imm), a1 :: nil, succ1, succ2, info) ->
debug "Icond/Ccompuimm\n";
- exp := expanse_cbranchimm_int32u c a1 imm info succ1 succ2 [];
+ exp := expanse_cbranchimm_int32u c a1 imm info succ1 succ2 [] map_consts;
was_branch := true;
was_exp := true
| Icond (Ccompl c, a1 :: a2 :: nil, succ1, succ2, info) ->
@@ -550,12 +550,12 @@ let expanse (sb : superblock) code pm =
was_exp := true
| Icond (Ccomplimm (c, imm), a1 :: nil, succ1, succ2, info) ->
debug "Icond/Ccomplimm\n";
- exp := expanse_cbranchimm_int64s c a1 imm info succ1 succ2 [];
+ exp := expanse_cbranchimm_int64s c a1 imm info succ1 succ2 [] map_consts;
was_branch := true;
was_exp := true
| Icond (Ccompluimm (c, imm), a1 :: nil, succ1, succ2, info) ->
debug "Icond/Ccompluimm\n";
- exp := expanse_cbranchimm_int64u c a1 imm info succ1 succ2 [];
+ exp := expanse_cbranchimm_int64u c a1 imm info succ1 succ2 [] map_consts;
was_branch := true;
was_exp := true
| Icond (Ccompf c, f1 :: f2 :: nil, succ1, succ2, info) ->
@@ -622,7 +622,7 @@ let expanse (sb : superblock) code pm =
sb.instructions;
sb.instructions <- Array.of_list (List.rev !new_order);
sb.liveins <- !liveins;
- debug_flag := false;
+ (*debug_flag := false;*)
(!code', !pm')
let rec find_last_node_reg = function