aboutsummaryrefslogtreecommitdiff
path: root/gcc/regclass.c
diff options
context:
space:
mode:
authorBernd Schmidt <bernds@cygnus.co.uk>1999-12-13 13:21:35 +0000
committerBernd Schmidt <crux@gcc.gnu.org>1999-12-13 13:21:35 +0000
commitf5d8c9f4053985a3694c56239b2c6a08b416bfa5 (patch)
treed9cb4c6b8528afdab21ca0ece166d271c5e19197 /gcc/regclass.c
parent2cf4028a7c28adbbbcbda21a02bd851a140a8652 (diff)
downloadgcc-f5d8c9f4053985a3694c56239b2c6a08b416bfa5.zip
gcc-f5d8c9f4053985a3694c56239b2c6a08b416bfa5.tar.gz
gcc-f5d8c9f4053985a3694c56239b2c6a08b416bfa5.tar.bz2
Simplify reload register allocation
From-SVN: r30890
Diffstat (limited to 'gcc/regclass.c')
-rw-r--r--gcc/regclass.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/regclass.c b/gcc/regclass.c
index 55edc77..630e3e8 100644
--- a/gcc/regclass.c
+++ b/gcc/regclass.c
@@ -118,6 +118,9 @@ char global_regs[FIRST_PSEUDO_REGISTER];
/* Table of register numbers in the order in which to try to use them. */
#ifdef REG_ALLOC_ORDER
int reg_alloc_order[FIRST_PSEUDO_REGISTER] = REG_ALLOC_ORDER;
+
+/* The inverse of reg_alloc_order. */
+int inv_reg_alloc_order[FIRST_PSEUDO_REGISTER];
#endif
/* For each reg class, a HARD_REG_SET saying which registers are in it. */
@@ -251,6 +254,11 @@ init_reg_sets ()
/* Do any additional initialization regsets may need */
INIT_ONCE_REG_SET ();
+
+#ifdef REG_ALLOC_ORDER
+ for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
+ inv_reg_alloc_order[reg_alloc_order[i]] = i;
+#endif
}
/* After switches have been processed, which perhaps alter