Fix antidependance calculation
This commit is contained in:
parent
340d6efd26
commit
ba5f336a6f
2 changed files with 7 additions and 7 deletions
|
@ -149,8 +149,12 @@ struct
|
|||
else read_extvalue is_left [] e1
|
||||
| _ -> read_exp is_left [] e
|
||||
|
||||
let antidep { eq_rhs = e } =
|
||||
match e.e_desc with Efby _ -> true | _ -> false
|
||||
let rec is_fby e = match e.e_desc with
|
||||
| Ewhen (e, _, _) -> is_fby e
|
||||
| Efby (_, _) -> true
|
||||
| _ -> false
|
||||
|
||||
let antidep { eq_rhs = e } = is_fby e
|
||||
|
||||
let clock { eq_rhs = e } = e.e_base_ck
|
||||
|
||||
|
@ -202,10 +206,6 @@ let node_memory_vars n =
|
|||
let _, acc = node_dec_it funs [] n in
|
||||
acc
|
||||
|
||||
let rec is_fby e = match e.e_desc with
|
||||
| Ewhen (e, _, _) -> is_fby e
|
||||
| Efby (_, _) -> true
|
||||
| _ -> false
|
||||
|
||||
(* data-flow dependences. pre-dependences are discarded *)
|
||||
module DataFlowDep = Dep.Make
|
||||
|
|
|
@ -58,7 +58,7 @@ let rec depends_on x y env =
|
|||
else depends_on x z env
|
||||
|
||||
let eq funs (env, vds, v, eqs) eq = match eq.eq_lhs, eq.eq_rhs with
|
||||
| Evarpat x, e when is_fby e && depends_on x x env ->
|
||||
| Evarpat x, e when Vars.is_fby e && depends_on x x env ->
|
||||
let vd = vd_find x vds in
|
||||
let x_mem = Idents.gen_var "normalize_mem" ("mem_"^(Idents.name x)) in
|
||||
let vd_mem = { vd with v_ident = x_mem } in
|
||||
|
|
Loading…
Reference in a new issue