diff options
author | Vladimir Makarov <vmakarov@redhat.com> | 2008-10-27 16:24:19 +0000 |
---|---|---|
committer | Vladimir Makarov <vmakarov@gcc.gnu.org> | 2008-10-27 16:24:19 +0000 |
commit | c0683a829001ee2630451cbdbb138fd89cfe0e5f (patch) | |
tree | 1730ad833e4ff685d5139cd97e10380194193470 /gcc/ira.c | |
parent | 801f03e3d21a96f63249aa22c8716490e14b7c26 (diff) | |
download | gcc-c0683a829001ee2630451cbdbb138fd89cfe0e5f.zip gcc-c0683a829001ee2630451cbdbb138fd89cfe0e5f.tar.gz gcc-c0683a829001ee2630451cbdbb138fd89cfe0e5f.tar.bz2 |
re PR middle-end/37813 (assert with IRA_COVER_CLASSES with singleton)
2008-10-27 Vladimir Makarov <vmakarov@redhat.com>
PR middle-end/37813
* ira-conflicts.c (process_regs_for_copy): Remove class subset
check.
* ira-int.h (ira_hard_regno_cover_class): New.
* ira-lives.c (mark_reg_live, mark_reg_dead,
process_bb_node_lives): Use ira_hard_regno_cover_class.
* ira.c (reg_class ira_hard_regno_cover_class): New global
variable.
(setup_hard_regno_cover_class): New function.
(ira_init): Call setup_hard_regno_cover_class.
* ira-costs.c (cost_class_nums): Add comment.
(find_allocno_class_costs): Initiate cost_class_nums.
(setup_allocno_cover_class_and_costs): Check cost_class_nums.
From-SVN: r141384
Diffstat (limited to 'gcc/ira.c')
-rw-r--r-- | gcc/ira.c | 31 |
1 files changed, 31 insertions, 0 deletions
@@ -976,6 +976,36 @@ find_reg_class_closure (void) +/* Map: hard register number -> cover class it belongs to. If the + corresponding class is NO_REGS, the hard register is not available + for allocation. */ +enum reg_class ira_hard_regno_cover_class[FIRST_PSEUDO_REGISTER]; + +/* Set up the array above. */ +static void +setup_hard_regno_cover_class (void) +{ + int i, j; + enum reg_class cl; + + for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) + { + ira_hard_regno_cover_class[i] = NO_REGS; + for (j = 0; j < ira_reg_class_cover_size; j++) + { + cl = ira_reg_class_cover[j]; + if (ira_class_hard_reg_index[cl][i] >= 0) + { + ira_hard_regno_cover_class[i] = cl; + break; + } + } + + } +} + + + /* Map: register class x machine mode -> number of hard registers of given class needed to store value of given mode. If the number is different, the size will be negative. */ @@ -1118,6 +1148,7 @@ ira_init (void) setup_alloc_regs (flag_omit_frame_pointer != 0); setup_class_subset_and_memory_move_costs (); find_reg_class_closure (); + setup_hard_regno_cover_class (); setup_reg_class_nregs (); setup_prohibited_class_mode_regs (); ira_init_costs (); |