aboutsummaryrefslogtreecommitdiffstats
path: root/backend/CSE3analysis.v
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2020-04-23 11:43:06 +0200
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2020-04-23 11:43:06 +0200
commit69447b8515c0bd123c6aa72c5545cf9beda79ec4 (patch)
tree80871cb7091ef1a68e6634fc0cffc5c6fb69c024 /backend/CSE3analysis.v
parentdc43cc3371f7837cff5b8d1fd536aba54e99232f (diff)
downloadcompcert-kvx-69447b8515c0bd123c6aa72c5545cf9beda79ec4.tar.gz
compcert-kvx-69447b8515c0bd123c6aa72c5545cf9beda79ec4.zip
fix in CSE3 move propagation
Diffstat (limited to 'backend/CSE3analysis.v')
-rw-r--r--backend/CSE3analysis.v19
1 files changed, 14 insertions, 5 deletions
diff --git a/backend/CSE3analysis.v b/backend/CSE3analysis.v
index b495371d..91064a5d 100644
--- a/backend/CSE3analysis.v
+++ b/backend/CSE3analysis.v
@@ -274,11 +274,20 @@ Section OPERATIONS.
Definition oper (dst : reg) (op: sym_op) (args : list reg)
(rel : RELATION.t) : RELATION.t :=
- match rhs_find op (forward_move_l rel args) rel with
- | Some r => RELATION.glb (move r dst rel)
- (oper1 dst op args rel)
- | None => oper1 dst op args rel
- end.
+ if is_smove op
+ then
+ match args with
+ | src::nil =>
+ move (forward_move rel src) dst rel
+ | _ => kill_reg dst rel
+ end
+ else
+ let args' := forward_move_l rel args in
+ match rhs_find op args' rel with
+ | Some r => (* FIXME RELATION.glb ( *) move r dst rel (* )
+ (oper1 dst op args' rel) *)
+ | None => oper1 dst op args' rel
+ end.
Definition clever_kill_store
(chunk : memory_chunk) (addr: addressing) (args : list reg)