summaryrefslogtreecommitdiff
path: root/gcc/ira.c
diff options
context:
space:
mode:
authorvmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>2008-10-27 16:24:19 +0000
committervmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>2008-10-27 16:24:19 +0000
commit1e204c7444fe8a80a1183349ccf75766c144d626 (patch)
tree1730ad833e4ff685d5139cd97e10380194193470 /gcc/ira.c
parente3fe8cc4a45fc1741723768cc784138d89ccf698 (diff)
downloadgcc-1e204c7444fe8a80a1183349ccf75766c144d626.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@141384 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ira.c')
-rw-r--r--gcc/ira.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/gcc/ira.c b/gcc/ira.c
index 5fbd713ac75..30ef8c898c7 100644
--- a/gcc/ira.c
+++ b/gcc/ira.c
@@ -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 ();