From 75b4fa9ddc3c075e626b9a89ad177636df4b2123 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Pasteur?= Date: Mon, 2 May 2011 16:40:42 +0200 Subject: [PATCH] Fixed bug in the interference of fold --- compiler/minils/analysis/interference.ml | 1 + compiler/obc/transformations/memalloc_apply.ml | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/minils/analysis/interference.ml b/compiler/minils/analysis/interference.ml index f6dfaca..20fb07a 100644 --- a/compiler/minils/analysis/interference.ml +++ b/compiler/minils/analysis/interference.ml @@ -444,6 +444,7 @@ let process_eq ({ eq_lhs = pat; eq_rhs = e } as eq) = | Evarpat x, Eiterator((Ifold|Ifoldi), { a_op = Enode _ | Efun _ }, _, pw_list, w_list, _) -> (* because of the encoding of the fold, the output is written before the inputs are read so they must interfere *) + let w_list, _ = Misc.split_last w_list in let invars = InterfRead.ivars_of_extvalues w_list in let pinvars = InterfRead.ivars_of_extvalues pw_list in List.iter (add_interference_link_from_ivar (Ivar x)) invars; diff --git a/compiler/obc/transformations/memalloc_apply.ml b/compiler/obc/transformations/memalloc_apply.ml index 6128df0..7ae7025 100644 --- a/compiler/obc/transformations/memalloc_apply.ml +++ b/compiler/obc/transformations/memalloc_apply.ml @@ -114,7 +114,6 @@ let var_decs _ (env, mutables,j) vds = else ( let vd = if IdentSet.mem vd.v_ident mutables then ( - Format.printf "%s is mutable@."; { vd with v_mutable = true } ) else vd