aboutsummaryrefslogtreecommitdiffstats
path: root/aarch64/PeepholeOracle.ml
diff options
context:
space:
mode:
authorSylvain Boulmé <sylvain.boulme@univ-grenoble-alpes.fr>2021-06-11 11:41:37 +0200
committerSylvain Boulmé <sylvain.boulme@univ-grenoble-alpes.fr>2021-06-11 11:41:37 +0200
commitaf16cdae6d58033cc8aa06bca330f98b96ba12f2 (patch)
tree4985e9ae8fa0d580bbf95a198edeca4f0bd6ff46 /aarch64/PeepholeOracle.ml
parent21c979fce33b068ce4b86e67d3d866b203411c6c (diff)
parent02b169b444c435b8d1aacf54969dd7de57317a5c (diff)
downloadcompcert-kvx-af16cdae6d58033cc8aa06bca330f98b96ba12f2.tar.gz
compcert-kvx-af16cdae6d58033cc8aa06bca330f98b96ba12f2.zip
Merge branch 'BTL' of gricad-gitlab.univ-grenoble-alpes.fr:sixcy/CompCert into BTL
Diffstat (limited to 'aarch64/PeepholeOracle.ml')
-rw-r--r--aarch64/PeepholeOracle.ml11
1 files changed, 5 insertions, 6 deletions
diff --git a/aarch64/PeepholeOracle.ml b/aarch64/PeepholeOracle.ml
index 18f41fed..2b214df4 100644
--- a/aarch64/PeepholeOracle.ml
+++ b/aarch64/PeepholeOracle.ml
@@ -401,9 +401,8 @@ let pair_rep_inv insta =
* for one type of inst. Lists contains integers which
* are the indices of insts in the main array "insta". *)
init_symb_mem ();
- for i = Array.length insta - 1 downto 1 do
+ for i = Array.length insta - 1 downto 0 do
let h0 = insta.(i) in
- let h1 = insta.(i - 1) in
(* Here we need to update every symbolic memory according to the matched inst *)
update_pot_rep_basic h0 insta (Ldr P32) true;
update_pot_rep_basic h0 insta (Ldr P64) true;
@@ -413,9 +412,9 @@ let pair_rep_inv insta =
update_pot_rep_basic h0 insta (Str P64) true;
update_pot_rep_basic h0 insta (Str P32f) true;
update_pot_rep_basic h0 insta (Str P64f) true;
- match (h0, h1) with
+ match h0 with
(* Non-consecutive ldr *)
- | PLoad (PLd_rd_a (ldi, rd1, ADimm (b1, n1))), _ ->
+ | PLoad (PLd_rd_a (ldi, rd1, ADimm (b1, n1))) ->
if is_compat_load ldi then (
(* Search a previous compatible load *)
let ld_t = get_load_pht ldi in
@@ -445,7 +444,7 @@ let pair_rep_inv insta =
(trans_ldi ldi, rd1, r, chunk_load ldi, c, ADimm (b, n1)))));
Hashtbl.replace symb_mem ld_t pot_rep)
(* Non-consecutive str *)
- | PStore (PSt_rs_a (sti, rd1, ADimm (b1, n1))), _ ->
+ | PStore (PSt_rs_a (sti, rd1, ADimm (b1, n1))) ->
if is_compat_store sti then (
(* Search a previous compatible store *)
let st_t = get_store_pht sti in
@@ -469,7 +468,7 @@ let pair_rep_inv insta =
(trans_sti sti, rd1, r, chunk_store sti, c, ADimm (b, n1))));
Hashtbl.replace symb_mem st_t pot_rep
(* Any other inst *))
- | i, _ -> (
+ | i -> (
(* Clear list of candidates if there is a non supported store *)
match i with PStore _ -> reset_str_symb_mem () | _ -> ())
done