aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Makarov <vmakarov@redhat.com>2009-03-30 18:51:25 +0000
committerVladimir Makarov <vmakarov@gcc.gnu.org>2009-03-30 18:51:25 +0000
commit5b0c0b2c05d84902395b6a21d82c2be2f6406812 (patch)
treec91f5be24ed9d4e8c7defad54927509c718991a7
parent9a48a93f5f4b08879c6156529560bdeb44e4c91a (diff)
downloadgcc-5b0c0b2c05d84902395b6a21d82c2be2f6406812.zip
gcc-5b0c0b2c05d84902395b6a21d82c2be2f6406812.tar.gz
gcc-5b0c0b2c05d84902395b6a21d82c2be2f6406812.tar.bz2
ira-int.h (ira_allocno): Rename left_conflicts_num to left_conflicts_size.
2009-03-30 Vladimir Makarov <vmakarov@redhat.com> * ira-int.h (ira_allocno): Rename left_conflicts_num to left_conflicts_size. (ALLOCNO_LEFT_CONFLICTS_NUM): Rename to ALLOCNO_LEFT_CONFLICTS_SIZE. * ira-color.c (allocno_spill_priority, push_allocno_to_stack, remove_allocno_from_bucket_and_push, allocno_spill_priority_compare, push_allocnos_to_stack, setup_allocno_available_regs_num): Use ALLOCNO_LEFT_CONFLICTS_SIZE instead of ALLOCNO_LEFT_CONFLICTS_NUM. (setup_allocno_left_conflicts_num): Ditto. Rename to setup_allocno_left_conflicts_size. (put_allocno_into_bucket): Use ALLOCNO_LEFT_CONFLICTS_SIZE instead of ALLOCNO_LEFT_CONFLICTS_NUM and setup_allocno_left_conflicts_size instead of setup_allocno_left_conflicts_num. * ira-build.c (ira_create_allocno): Use ALLOCNO_LEFT_CONFLICTS_SIZE instead of ALLOCNO_LEFT_CONFLICTS_NUM. From-SVN: r145312
-rw-r--r--gcc/ChangeLog23
-rw-r--r--gcc/ira-build.c2
-rw-r--r--gcc/ira-color.c44
-rw-r--r--gcc/ira-int.h10
4 files changed, 52 insertions, 27 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 0a22fef..c01e6ad 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,28 @@
2009-03-30 Vladimir Makarov <vmakarov@redhat.com>
+ * ira-int.h (ira_allocno): Rename left_conflicts_num to
+ left_conflicts_size.
+ (ALLOCNO_LEFT_CONFLICTS_NUM): Rename to
+ ALLOCNO_LEFT_CONFLICTS_SIZE.
+
+ * ira-color.c (allocno_spill_priority, push_allocno_to_stack,
+ remove_allocno_from_bucket_and_push,
+ allocno_spill_priority_compare, push_allocnos_to_stack,
+ setup_allocno_available_regs_num): Use ALLOCNO_LEFT_CONFLICTS_SIZE
+ instead of ALLOCNO_LEFT_CONFLICTS_NUM.
+ (setup_allocno_left_conflicts_num): Ditto. Rename to
+ setup_allocno_left_conflicts_size.
+ (put_allocno_into_bucket): Use ALLOCNO_LEFT_CONFLICTS_SIZE
+ instead of ALLOCNO_LEFT_CONFLICTS_NUM and
+ setup_allocno_left_conflicts_size instead of
+ setup_allocno_left_conflicts_num.
+
+ * ira-build.c (ira_create_allocno): Use
+ ALLOCNO_LEFT_CONFLICTS_SIZE instead of
+ ALLOCNO_LEFT_CONFLICTS_NUM.
+
+2009-03-30 Vladimir Makarov <vmakarov@redhat.com>
+
* reload.c (push_reload, find_dummy_reload): Use df_get_live_out
instead of DF_LR_OUT.
diff --git a/gcc/ira-build.c b/gcc/ira-build.c
index 2535964..ff406077c 100644
--- a/gcc/ira-build.c
+++ b/gcc/ira-build.c
@@ -468,7 +468,7 @@ ira_create_allocno (int regno, bool cap_p, ira_loop_tree_node_t loop_tree_node)
ALLOCNO_CONFLICT_HARD_REG_COSTS (a) = NULL;
ALLOCNO_UPDATED_HARD_REG_COSTS (a) = NULL;
ALLOCNO_UPDATED_CONFLICT_HARD_REG_COSTS (a) = NULL;
- ALLOCNO_LEFT_CONFLICTS_NUM (a) = -1;
+ ALLOCNO_LEFT_CONFLICTS_SIZE (a) = -1;
ALLOCNO_COVER_CLASS (a) = NO_REGS;
ALLOCNO_UPDATED_COVER_CLASS_COST (a) = 0;
ALLOCNO_COVER_CLASS_COST (a) = 0;
diff --git a/gcc/ira-color.c b/gcc/ira-color.c
index c298376..d61d39e 100644
--- a/gcc/ira-color.c
+++ b/gcc/ira-color.c
@@ -683,7 +683,7 @@ static int
allocno_spill_priority (ira_allocno_t a)
{
return (ALLOCNO_TEMP (a)
- / (ALLOCNO_LEFT_CONFLICTS_NUM (a)
+ / (ALLOCNO_LEFT_CONFLICTS_SIZE (a)
* ira_reg_class_nregs[ALLOCNO_COVER_CLASS (a)][ALLOCNO_MODE (a)]
+ 1));
}
@@ -861,7 +861,7 @@ static splay_tree uncolorable_allocnos_splay_tree[N_REG_CLASSES];
static void
push_allocno_to_stack (ira_allocno_t allocno)
{
- int conflicts_num, conflict_size, size;
+ int left_conflicts_size, conflict_size, size;
ira_allocno_t a, conflict_allocno;
enum reg_class cover_class;
ira_allocno_conflict_iterator aci;
@@ -896,20 +896,21 @@ push_allocno_to_stack (ira_allocno_t allocno)
if (ALLOCNO_IN_GRAPH_P (conflict_allocno)
&& ! ALLOCNO_ASSIGNED_P (conflict_allocno))
{
- conflicts_num = ALLOCNO_LEFT_CONFLICTS_NUM (conflict_allocno);
+ left_conflicts_size
+ = ALLOCNO_LEFT_CONFLICTS_SIZE (conflict_allocno);
conflict_size
= (ira_reg_class_nregs
[cover_class][ALLOCNO_MODE (conflict_allocno)]);
ira_assert
- (ALLOCNO_LEFT_CONFLICTS_NUM (conflict_allocno) >= size);
- if (conflicts_num + conflict_size
+ (ALLOCNO_LEFT_CONFLICTS_SIZE (conflict_allocno) >= size);
+ if (left_conflicts_size + conflict_size
<= ALLOCNO_AVAILABLE_REGS_NUM (conflict_allocno))
{
- ALLOCNO_LEFT_CONFLICTS_NUM (conflict_allocno) -= size;
+ ALLOCNO_LEFT_CONFLICTS_SIZE (conflict_allocno) -= size;
continue;
}
- conflicts_num
- = ALLOCNO_LEFT_CONFLICTS_NUM (conflict_allocno) - size;
+ left_conflicts_size
+ = ALLOCNO_LEFT_CONFLICTS_SIZE (conflict_allocno) - size;
if (uncolorable_allocnos_splay_tree[cover_class] != NULL
&& !ALLOCNO_SPLAY_REMOVED_P (conflict_allocno)
&& USE_SPLAY_P (cover_class))
@@ -926,8 +927,9 @@ push_allocno_to_stack (ira_allocno_t allocno)
removed_splay_allocno_vec,
conflict_allocno);
}
- ALLOCNO_LEFT_CONFLICTS_NUM (conflict_allocno) = conflicts_num;
- if (conflicts_num + conflict_size
+ ALLOCNO_LEFT_CONFLICTS_SIZE (conflict_allocno)
+ = left_conflicts_size;
+ if (left_conflicts_size + conflict_size
<= ALLOCNO_AVAILABLE_REGS_NUM (conflict_allocno))
{
delete_allocno_from_bucket
@@ -967,11 +969,11 @@ remove_allocno_from_bucket_and_push (ira_allocno_t allocno, bool colorable_p)
}
cover_class = ALLOCNO_COVER_CLASS (allocno);
ira_assert ((colorable_p
- && (ALLOCNO_LEFT_CONFLICTS_NUM (allocno)
+ && (ALLOCNO_LEFT_CONFLICTS_SIZE (allocno)
+ ira_reg_class_nregs[cover_class][ALLOCNO_MODE (allocno)]
<= ALLOCNO_AVAILABLE_REGS_NUM (allocno)))
|| (! colorable_p
- && (ALLOCNO_LEFT_CONFLICTS_NUM (allocno)
+ && (ALLOCNO_LEFT_CONFLICTS_SIZE (allocno)
+ ira_reg_class_nregs[cover_class][ALLOCNO_MODE
(allocno)]
> ALLOCNO_AVAILABLE_REGS_NUM (allocno))));
@@ -1084,11 +1086,11 @@ allocno_spill_priority_compare (splay_tree_key k1, splay_tree_key k2)
ira_allocno_t a1 = (ira_allocno_t) k1, a2 = (ira_allocno_t) k2;
pri1 = (ALLOCNO_TEMP (a1)
- / (ALLOCNO_LEFT_CONFLICTS_NUM (a1)
+ / (ALLOCNO_LEFT_CONFLICTS_SIZE (a1)
* ira_reg_class_nregs[ALLOCNO_COVER_CLASS (a1)][ALLOCNO_MODE (a1)]
+ 1));
pri2 = (ALLOCNO_TEMP (a2)
- / (ALLOCNO_LEFT_CONFLICTS_NUM (a2)
+ / (ALLOCNO_LEFT_CONFLICTS_SIZE (a2)
* ira_reg_class_nregs[ALLOCNO_COVER_CLASS (a2)][ALLOCNO_MODE (a2)]
+ 1));
if ((diff = pri1 - pri2) != 0)
@@ -1225,7 +1227,7 @@ push_allocnos_to_stack (void)
allocno = VEC_pop (ira_allocno_t, removed_splay_allocno_vec);
ALLOCNO_SPLAY_REMOVED_P (allocno) = false;
rclass = ALLOCNO_COVER_CLASS (allocno);
- if (ALLOCNO_LEFT_CONFLICTS_NUM (allocno)
+ if (ALLOCNO_LEFT_CONFLICTS_SIZE (allocno)
+ ira_reg_class_nregs [rclass][ALLOCNO_MODE (allocno)]
> ALLOCNO_AVAILABLE_REGS_NUM (allocno))
splay_tree_insert
@@ -1288,7 +1290,7 @@ push_allocnos_to_stack (void)
}
ira_assert (ALLOCNO_IN_GRAPH_P (allocno)
&& ALLOCNO_COVER_CLASS (allocno) == cover_class
- && (ALLOCNO_LEFT_CONFLICTS_NUM (allocno)
+ && (ALLOCNO_LEFT_CONFLICTS_SIZE (allocno)
+ ira_reg_class_nregs[cover_class][ALLOCNO_MODE
(allocno)]
> ALLOCNO_AVAILABLE_REGS_NUM (allocno)));
@@ -1380,9 +1382,9 @@ setup_allocno_available_regs_num (ira_allocno_t allocno)
ALLOCNO_AVAILABLE_REGS_NUM (allocno) -= n;
}
-/* Set up ALLOCNO_LEFT_CONFLICTS_NUM for ALLOCNO. */
+/* Set up ALLOCNO_LEFT_CONFLICTS_SIZE for ALLOCNO. */
static void
-setup_allocno_left_conflicts_num (ira_allocno_t allocno)
+setup_allocno_left_conflicts_size (ira_allocno_t allocno)
{
int i, hard_regs_num, hard_regno, conflict_allocnos_size;
ira_allocno_t a, conflict_allocno;
@@ -1466,7 +1468,7 @@ setup_allocno_left_conflicts_num (ira_allocno_t allocno)
if (a == allocno)
break;
}
- ALLOCNO_LEFT_CONFLICTS_NUM (allocno) = conflict_allocnos_size;
+ ALLOCNO_LEFT_CONFLICTS_SIZE (allocno) = conflict_allocnos_size;
}
/* Put ALLOCNO in a bucket corresponding to its number and size of its
@@ -1482,9 +1484,9 @@ put_allocno_into_bucket (ira_allocno_t allocno)
if (ALLOCNO_FIRST_COALESCED_ALLOCNO (allocno) != allocno)
return;
ALLOCNO_IN_GRAPH_P (allocno) = true;
- setup_allocno_left_conflicts_num (allocno);
+ setup_allocno_left_conflicts_size (allocno);
setup_allocno_available_regs_num (allocno);
- if (ALLOCNO_LEFT_CONFLICTS_NUM (allocno)
+ if (ALLOCNO_LEFT_CONFLICTS_SIZE (allocno)
+ ira_reg_class_nregs[cover_class][ALLOCNO_MODE (allocno)]
<= ALLOCNO_AVAILABLE_REGS_NUM (allocno))
add_allocno_to_bucket (allocno, &colorable_allocno_bucket);
diff --git a/gcc/ira-int.h b/gcc/ira-int.h
index 4cb3928..6e66cc4 100644
--- a/gcc/ira-int.h
+++ b/gcc/ira-int.h
@@ -405,10 +405,10 @@ struct ira_allocno
preferences of other allocnos not assigned yet during assigning
to given allocno. */
int *conflict_hard_reg_costs, *updated_conflict_hard_reg_costs;
- /* Number of the same cover class allocnos with TRUE in_graph_p
- value and conflicting with given allocno during each point of
- graph coloring. */
- int left_conflicts_num;
+ /* Size (in hard registers) of the same cover class allocnos with
+ TRUE in_graph_p value and conflicting with given allocno during
+ each point of graph coloring. */
+ int left_conflicts_size;
/* Number of hard registers of the allocno cover class really
available for the allocno allocation. */
int available_regs_num;
@@ -464,7 +464,7 @@ struct ira_allocno
((A)->conflict_hard_reg_costs)
#define ALLOCNO_UPDATED_CONFLICT_HARD_REG_COSTS(A) \
((A)->updated_conflict_hard_reg_costs)
-#define ALLOCNO_LEFT_CONFLICTS_NUM(A) ((A)->left_conflicts_num)
+#define ALLOCNO_LEFT_CONFLICTS_SIZE(A) ((A)->left_conflicts_size)
#define ALLOCNO_COVER_CLASS(A) ((A)->cover_class)
#define ALLOCNO_COVER_CLASS_COST(A) ((A)->cover_class_cost)
#define ALLOCNO_UPDATED_COVER_CLASS_COST(A) ((A)->updated_cover_class_cost)