Always check if a var should be optimized
This commit is contained in:
parent
66386ddca2
commit
68e1fe1ee8
1 changed files with 6 additions and 2 deletions
|
@ -380,12 +380,16 @@ let process_eq ({ eq_lhs = pat; eq_rhs = e } as eq) =
|
|||
| Evarpat x, Efby(_, w) -> (* x = _ fby y *)
|
||||
(match w.w_desc with
|
||||
| Wconst _ -> ()
|
||||
| _ -> add_affinity_link_from_ivar (InterfRead.ivar_of_extvalue w) (Ivar x) )
|
||||
| _ ->
|
||||
if World.is_optimized (Ivar x) then
|
||||
add_affinity_link_from_ivar (InterfRead.ivar_of_extvalue w) (Ivar x) )
|
||||
| Evarpat x, Eextvalue w ->
|
||||
(* Add links between variables with the same value *)
|
||||
(match w.w_desc with
|
||||
| Wconst _ -> ()
|
||||
| _ -> add_same_value_link_from_ivar (InterfRead.ivar_of_extvalue w) (Ivar x) )
|
||||
| _ ->
|
||||
if World.is_optimized (Ivar x) then
|
||||
add_same_value_link_from_ivar (InterfRead.ivar_of_extvalue w) (Ivar x) )
|
||||
| _ -> () (* do nothing *)
|
||||
|
||||
(** Add the special init and return equations to the dependency graph
|
||||
|
|
Loading…
Reference in a new issue