From 2c29dcefbd286f9b1e7f2e5458d6a871f411a9fc Mon Sep 17 00:00:00 2001 From: Pratap Singh Date: Mon, 8 Jul 2024 22:17:31 +0100 Subject: [PATCH] Revert "account for isReg in regalloc heuristic" This reverts commit e5ba50c2148b2cd0bdb12ce6bdabd8eb76285d02. --- compiler/src/compiler/RegAlloc.v | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/compiler/src/compiler/RegAlloc.v b/compiler/src/compiler/RegAlloc.v index b60073cc0..b5cfe57f5 100644 --- a/compiler/src/compiler/RegAlloc.v +++ b/compiler/src/compiler/RegAlloc.v @@ -318,16 +318,9 @@ Fixpoint corresp_of_impvars(start_impvar: Z)(o: occupancy): list (srcvar * impva | nil => nil end. -Definition isRegInterval (l: lifetime) : bool := - match l with - | (srcvarname, _) => isRegStr srcvarname - end. - Definition events_to_corresp(events: list event): list (srcvar * impvar) := let sorted_intervals := sort compare_interval_length (events_to_intervals 0 events) in - let (reg_intervals, nonreg_intervals) := List.partition isRegInterval sorted_intervals in - let regfirst_intervals := reg_intervals ++ nonreg_intervals in - let occ := List.fold_left assign_srcvar regfirst_intervals [] in + let occ := List.fold_left assign_srcvar sorted_intervals [] in corresp_of_impvars first_available_impvar occ.