aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@freesoft.cz>1999-12-14 12:10:11 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>1999-12-14 11:10:11 +0000
commit0dc0641b044cdb525118e4ca1358f95d9930e3d9 (patch)
tree05c586951e437b2a29b481684633d8ba79fe4d11
parentd5e2075dbf087b97a9ab895b335333aa7418700c (diff)
downloadgcc-0dc0641b044cdb525118e4ca1358f95d9930e3d9.zip
gcc-0dc0641b044cdb525118e4ca1358f95d9930e3d9.tar.gz
gcc-0dc0641b044cdb525118e4ca1358f95d9930e3d9.tar.bz2
regclass.c (record_reg_classes): Do not do the copying preferrencing when source does not die.
* regclass.c (record_reg_classes): Do not do the copying preferrencing when source does not die. From-SVN: r30913
-rw-r--r--gcc/ChangeLog3
-rw-r--r--gcc/regclass.c8
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index de821d4..1957893 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,8 @@
Tue Dec 14 12:07:29 MET 1999 Jan Hubicka <hubicka@freesoft.cz>
+ * regclass.c (record_reg_classes): Do not do the copying preferrencing
+ when source does not die.
+
* regclass.c (record_reg_classes): Handle INOUT operands propertly.
1999-12-14 Jakub Jelinek <jakub@redhat.com>
diff --git a/gcc/regclass.c b/gcc/regclass.c
index f48a7c2..a67d91e 100644
--- a/gcc/regclass.c
+++ b/gcc/regclass.c
@@ -1618,11 +1618,15 @@ record_reg_classes (n_alts, n_ops, ops, modes, subreg_changes_size,
/* If this insn is a single set copying operand 1 to operand 0
and one is a pseudo with the other a hard reg that is in its
- own register class, set the cost of that register class to -1. */
+ own register class, set the cost of that register class to -1.
+ Do this only when source dies to avoid stressing of register
+ allocator by preferrencing two coliding registers into single
+ place. */
if ((set = single_set (insn)) != 0
&& ops[0] == SET_DEST (set) && ops[1] == SET_SRC (set)
- && GET_CODE (ops[0]) == REG && GET_CODE (ops[1]) == REG)
+ && GET_CODE (ops[0]) == REG && GET_CODE (ops[1]) == REG
+ && find_regno_note (insn, REG_DEAD, REGNO (ops[1])))
for (i = 0; i <= 1; i++)
if (REGNO (ops[i]) >= FIRST_PSEUDO_REGISTER)
{