Skip to content

Commit

Permalink
Revert "account for isReg in regalloc heuristic"
Browse files Browse the repository at this point in the history
This reverts commit e5ba50c.
  • Loading branch information
pratapsingh1729 committed Jul 8, 2024
1 parent 105c5ea commit 2c29dce
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions compiler/src/compiler/RegAlloc.v
Original file line number Diff line number Diff line change
Expand Up @@ -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.


Expand Down

0 comments on commit 2c29dce

Please sign in to comment.