From 68e1fe1ee8a6ec550f6ade038db64471077afa82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Pasteur?= Date: Thu, 21 Apr 2011 13:53:09 +0200 Subject: [PATCH] Always check if a var should be optimized --- compiler/minils/analysis/interference.ml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/compiler/minils/analysis/interference.ml b/compiler/minils/analysis/interference.ml index ec8e672..1f4c5ae 100644 --- a/compiler/minils/analysis/interference.ml +++ b/compiler/minils/analysis/interference.ml @@ -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