From 61e14546df09cc6a871bc9c06e7ce06349b5777a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9onard=20G=C3=A9rard?= Date: Mon, 19 Mar 2012 17:43:19 +0100 Subject: [PATCH] Interf scheduling tries harder with arrays --- compiler/minils/transformations/schedule_interf.ml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/compiler/minils/transformations/schedule_interf.ml b/compiler/minils/transformations/schedule_interf.ml index b759064..70b8945 100644 --- a/compiler/minils/transformations/schedule_interf.ml +++ b/compiler/minils/transformations/schedule_interf.ml @@ -69,12 +69,11 @@ struct nb_def_vars - nb_killed_vars + b in - (* returns the minimum element of the list with same_ctrl = true. If there is no such element, - return the minimum of the list. *) + (* returns the minimum element of the list with same_ctrl = true if possible. *) let rec min_same_ck (min_eq, min_c, min_same_ctrl) l = match l with | [] -> min_eq | (eq, c, same_ctrl)::l -> - if (c < min_c && (same_ctrl = min_same_ctrl)) or (same_ctrl && not min_same_ctrl) then + if (c < min_c) or (c = min_c && (same_ctrl && not min_same_ctrl)) then min_same_ck (eq, c, same_ctrl) l else min_same_ck (min_eq, min_c, min_same_ctrl) l