From c3d47f4d4b81b242fa863143b0b03f47fd61a609 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Pasteur?= Date: Wed, 27 Apr 2011 15:10:10 +0200 Subject: [PATCH] Fixed error in computation of targeting --- compiler/minils/analysis/interference.ml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/compiler/minils/analysis/interference.ml b/compiler/minils/analysis/interference.ml index e9ec955..8811348 100644 --- a/compiler/minils/analysis/interference.ml +++ b/compiler/minils/analysis/interference.ml @@ -391,11 +391,14 @@ let coalesce_linear_vars () = let find_targeting f = let find_output outputs_lins (acc,i) l = - let idx = Misc.index (fun l1 -> l = l1) outputs_lins in - if idx >= 0 then - (i, idx)::acc, i+1 - else - acc, i+1 + match l with + | Lvar _ -> + let idx = Misc.index (fun l1 -> l = l1) outputs_lins in + if idx >= 0 then + (i, idx)::acc, i+1 + else + acc, i+1 + | _ -> acc, i+1 in let desc = Modules.find_value f in let inputs_lins = linearities_of_arg_list desc.node_inputs in