aboutsummaryrefslogtreecommitdiffstats
path: root/backend/CSE2.v
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2020-03-03 12:27:58 +0100
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2020-03-03 12:27:58 +0100
commit74efac13484e4767f793cf9ccc94835825ca30ba (patch)
treea85e79bdd8949ccd1a7bb4f88a46c77ed3add713 /backend/CSE2.v
parent577d3dbeb54aaf23db19dddf149c48764e20c58d (diff)
downloadcompcert-kvx-74efac13484e4767f793cf9ccc94835825ca30ba.tar.gz
compcert-kvx-74efac13484e4767f793cf9ccc94835825ca30ba.zip
CSE2 alias analysis for Risc-V
Diffstat (limited to 'backend/CSE2.v')
-rw-r--r--backend/CSE2.v25
1 files changed, 1 insertions, 24 deletions
diff --git a/backend/CSE2.v b/backend/CSE2.v
index 9c45b476..8142ee5d 100644
--- a/backend/CSE2.v
+++ b/backend/CSE2.v
@@ -6,7 +6,7 @@ David Monniaux, CNRS, VERIMAG
Require Import Coqlib Maps Errors Integers Floats Lattice Kildall.
Require Import AST Linking.
-Require Import Memory Registers Op RTL Maps.
+Require Import Memory Registers Op RTL Maps CSE2deps.
(* Static analysis *)
@@ -265,14 +265,6 @@ Definition kill_sym_val (dst : reg) (sv : sym_val) :=
Definition kill_reg (dst : reg) (rel : RELATION.t) :=
PTree.filter1 (fun x => negb (kill_sym_val dst x))
(PTree.remove dst rel).
-
-Definition max_chunk_size := 8.
-
-Definition can_swap_accesses_ofs ofsr chunkr ofsw chunkw :=
- (0 <=? ofsw) && (ofsw <=? (Ptrofs.modulus - max_chunk_size))
- && (0 <=? ofsr) && (ofsr <=? (Ptrofs.modulus - max_chunk_size))
- && ((ofsw + size_chunk chunkw <=? ofsr) ||
- (ofsr + size_chunk chunkr <=? ofsw)).
Definition kill_sym_val_mem (sv: sym_val) :=
match sv with
@@ -281,21 +273,6 @@ Definition kill_sym_val_mem (sv: sym_val) :=
| SLoad _ _ _ => true
end.
-Definition may_overlap chunk addr args chunk' addr' args' :=
- match addr, addr', args, args' with
- | (Aindexed ofs), (Aindexed ofs'),
- (base :: nil), (base' :: nil) =>
- if peq base base'
- then negb (can_swap_accesses_ofs ofs' chunk' ofs chunk)
- else true
- | (Aglobal symb ofs), (Aglobal symb' ofs'),
- nil, nil =>
- if peq symb symb'
- then negb (can_swap_accesses_ofs (Ptrofs.unsigned ofs') chunk' (Ptrofs.unsigned ofs) chunk)
- else false
- | _, _, _, _ => true
- end.
-
Definition kill_sym_val_store chunk addr args (sv: sym_val) :=
match sv with
| SMove _ => false