aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2008-09-12 05:24:41 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2008-09-12 05:24:41 +0000
commit004a6ce8e739af31a8267c40eb15560610dad28e (patch)
treea4ff3bc869690c38039342a26c73112ce65bd590
parent7d6c3ecb9cedd11e0eeb15925fcf83972de57879 (diff)
downloadgcc-004a6ce8e739af31a8267c40eb15560610dad28e.zip
gcc-004a6ce8e739af31a8267c40eb15560610dad28e.tar.gz
gcc-004a6ce8e739af31a8267c40eb15560610dad28e.tar.bz2
re PR bootstrap/37424 (IRA merge breaks Solaris/SPARC bootstrap)
PR rtl-optimization/37424 * ira-color.c (coalesced_pseudo_reg_slot_compare): Untie by comparing the regnos instead of the addresses. From-SVN: r140312
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/ira-color.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index dea503e..43420dd 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2008-09-12 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR rtl-optimization/37424
+ * ira-color.c (coalesced_pseudo_reg_slot_compare): Untie by comparing
+ the regnos instead of the addresses.
+
2008-09-11 Janis Johnson <janis187@us.ibm.com>
* ginclude/float.h (DEC_EVAL_METHOD): Correct the macro name.
diff --git a/gcc/ira-color.c b/gcc/ira-color.c
index 6342e90..645d7dc 100644
--- a/gcc/ira-color.c
+++ b/gcc/ira-color.c
@@ -2171,7 +2171,7 @@ coalesced_pseudo_reg_slot_compare (const void *v1p, const void *v2p)
if (a1 == NULL || ALLOCNO_HARD_REGNO (a1) >= 0)
{
if (a2 == NULL || ALLOCNO_HARD_REGNO (a2) >= 0)
- return (const int *) v1p - (const int *) v2p; /* Save the order. */
+ return regno1 - regno2;
return 1;
}
else if (a2 == NULL || ALLOCNO_HARD_REGNO (a2) >= 0)
@@ -2185,7 +2185,7 @@ coalesced_pseudo_reg_slot_compare (const void *v1p, const void *v2p)
total_size2 = MAX (PSEUDO_REGNO_BYTES (regno2), regno_max_ref_width[regno2]);
if ((diff = total_size2 - total_size1) != 0)
return diff;
- return (const int *) v1p - (const int *) v2p; /* Save the order. */
+ return regno1 - regno2;
}
/* Setup REGNO_COALESCED_ALLOCNO_COST and REGNO_COALESCED_ALLOCNO_NUM