Interf scheduling tries harder with arrays

This commit is contained in:
Léonard Gérard 2012-03-19 17:43:19 +01:00
parent fc1edf91f0
commit 61e14546df

View file

@ -69,12 +69,11 @@ struct
nb_def_vars - nb_killed_vars + b nb_def_vars - nb_killed_vars + b
in in
(* returns the minimum element of the list with same_ctrl = true. If there is no such element, (* returns the minimum element of the list with same_ctrl = true if possible. *)
return the minimum of the list. *)
let rec min_same_ck (min_eq, min_c, min_same_ctrl) l = match l with let rec min_same_ck (min_eq, min_c, min_same_ctrl) l = match l with
| [] -> min_eq | [] -> min_eq
| (eq, c, same_ctrl)::l -> | (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 min_same_ck (eq, c, same_ctrl) l
else else
min_same_ck (min_eq, min_c, min_same_ctrl) l min_same_ck (min_eq, min_c, min_same_ctrl) l