summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>2005-01-15 16:06:17 +0000
committersayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>2005-01-15 16:06:17 +0000
commitada8adad9fb17daa49f9e6bcb063739579c82446 (patch)
tree122e9687be647e2b1f0b34ecee7bb59c9eb26914
parent79b312b68fe06a7b882f496b12f9d452b593f3e2 (diff)
downloadgcc-ada8adad9fb17daa49f9e6bcb063739579c82446.tar.gz
* harg-reg-set.h (reg_class_names): Prototype global array.
* regclass.c (reg_class_names): Declare here and initialize to REG_CLASS_NAMES. (dump_regclass): Remove local declaration of reg_class_names. (regclass): Likewise. * cfg.c (dump_flow_info): Likewise. * ra-debug.c (reg_class_names): Likewise. * regrename.c (reg_class_names): Likewise. * reload.c (reg_class_names): Likewise. * reload1.c (spill_failure): Likewise. * config/m68hc11/m68hc11.c (reg_class_names): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@93696 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog14
-rw-r--r--gcc/cfg.c4
-rw-r--r--gcc/config/m68hc11/m68hc11.c4
-rw-r--r--gcc/hard-reg-set.h6
-rw-r--r--gcc/ra-debug.c5
-rw-r--r--gcc/regclass.c8
-rw-r--r--gcc/regrename.c5
-rw-r--r--gcc/reload.c4
-rw-r--r--gcc/reload1.c1
9 files changed, 31 insertions, 20 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d07cea1a268..42c0e98166f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,17 @@
+2004-01-15 Roger Sayle <roger@eyesopen.com>
+
+ * harg-reg-set.h (reg_class_names): Prototype global array.
+ * regclass.c (reg_class_names): Declare here and initialize to
+ REG_CLASS_NAMES.
+ (dump_regclass): Remove local declaration of reg_class_names.
+ (regclass): Likewise.
+ * cfg.c (dump_flow_info): Likewise.
+ * ra-debug.c (reg_class_names): Likewise.
+ * regrename.c (reg_class_names): Likewise.
+ * reload.c (reg_class_names): Likewise.
+ * reload1.c (spill_failure): Likewise.
+ * config/m68hc11/m68hc11.c (reg_class_names): Likewise.
+
2005-01-15 Ulrich Weigand <uweigand@de.ibm.com>
* config/s390/s390.md ("reload_outti"): Remove predicate for
diff --git a/gcc/cfg.c b/gcc/cfg.c
index b36a96f812d..bc68faab799 100644
--- a/gcc/cfg.c
+++ b/gcc/cfg.c
@@ -1,6 +1,7 @@
/* Control flow graph manipulation code for GNU compiler.
Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005
+ Free Software Foundation, Inc.
This file is part of GCC.
@@ -515,7 +516,6 @@ dump_flow_info (FILE *file)
{
int i;
basic_block bb;
- static const char * const reg_class_names[] = REG_CLASS_NAMES;
/* There are no pseudo registers after reload. Don't dump them. */
if (reg_n_info && !reload_completed)
diff --git a/gcc/config/m68hc11/m68hc11.c b/gcc/config/m68hc11/m68hc11.c
index e134f576f62..f2a44fb8def 100644
--- a/gcc/config/m68hc11/m68hc11.c
+++ b/gcc/config/m68hc11/m68hc11.c
@@ -1,5 +1,5 @@
/* Subroutines for code generation on Motorola 68HC11 and 68HC12.
- Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
+ Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Contributed by Stephane Carrez (stcarrez@nerim.fr)
@@ -387,8 +387,6 @@ m68hc11_conditional_register_usage (void)
/* Reload and register operations. */
-static const char *const reg_class_names[] = REG_CLASS_NAMES;
-
void
create_regs_rtx (void)
diff --git a/gcc/hard-reg-set.h b/gcc/hard-reg-set.h
index b4654b17039..c78527e4cf6 100644
--- a/gcc/hard-reg-set.h
+++ b/gcc/hard-reg-set.h
@@ -1,5 +1,5 @@
/* Sets (bit vectors) of hard registers, and operations on them.
- Copyright (C) 1987, 1992, 1994, 2000, 2003, 2004
+ Copyright (C) 1987, 1992, 1994, 2000, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of GCC
@@ -490,6 +490,10 @@ extern int n_non_fixed_regs;
extern const char * reg_names[FIRST_PSEUDO_REGISTER];
+/* Vector indexed by reg class giving its name. */
+
+extern const char * reg_class_names[];
+
/* Given a hard REGN a FROM mode and a TO mode, return nonzero if
REGN cannot change modes between the specified modes. */
#define REG_CANNOT_CHANGE_MODE_P(REGN, FROM, TO) \
diff --git a/gcc/ra-debug.c b/gcc/ra-debug.c
index 84315343f19..1d4bfc722c4 100644
--- a/gcc/ra-debug.c
+++ b/gcc/ra-debug.c
@@ -1,5 +1,5 @@
/* Graph coloring register allocator
- Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2004, 2005 Free Software Foundation, Inc.
Contributed by Michael Matz <matz@suse.de>
and Daniel Berlin <dan@cgsoftware.com>.
@@ -41,9 +41,6 @@ static void ra_print_rtx_2op (FILE *, rtx);
static void ra_print_rtx_3op (FILE *, rtx);
static void ra_print_rtx_object (FILE *, rtx);
-/* The hardregs as names, for debugging. */
-static const char *const reg_class_names[] = REG_CLASS_NAMES;
-
/* Print a message to the dump file, if debug_new_regalloc and LEVEL
have any bits in common. */
diff --git a/gcc/regclass.c b/gcc/regclass.c
index 3fd8281e3e5..ab8f7c8a780 100644
--- a/gcc/regclass.c
+++ b/gcc/regclass.c
@@ -1,6 +1,6 @@
/* Compute register class preferences for pseudo-registers.
Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996
- 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+ 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of GCC.
@@ -192,6 +192,10 @@ enum reg_class reg_class_superunion[N_REG_CLASSES][N_REG_CLASSES];
const char * reg_names[] = REGISTER_NAMES;
+/* Array containing all of the register class names. */
+
+const char * reg_class_names[] = REG_CLASS_NAMES;
+
/* For each hard register, the widest mode object that it can contain.
This will be a MODE_INT mode if the register can hold integers. Otherwise
it will be a MODE_FLOAT or a MODE_CC mode, whichever is valid for the
@@ -925,7 +929,6 @@ regclass_init (void)
static void
dump_regclass (FILE *dump)
{
- static const char *const reg_class_names[] = REG_CLASS_NAMES;
int i;
for (i = FIRST_PSEUDO_REGISTER; i < max_regno; i++)
{
@@ -1348,7 +1351,6 @@ regclass (rtx f, int nregs, FILE *dump)
&& (reg_pref[i].prefclass != (int) best
|| reg_pref[i].altclass != (int) alt))
{
- static const char *const reg_class_names[] = REG_CLASS_NAMES;
fprintf (dump, " Register %i", i);
if (alt == ALL_REGS || best == ALL_REGS)
fprintf (dump, " pref %s\n", reg_class_names[(int) best]);
diff --git a/gcc/regrename.c b/gcc/regrename.c
index 4b3860c647c..eec594c7647 100644
--- a/gcc/regrename.c
+++ b/gcc/regrename.c
@@ -1,5 +1,6 @@
/* Register renaming for the GNU compiler.
- Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005
+ Free Software Foundation, Inc.
This file is part of GCC.
@@ -36,8 +37,6 @@
#include "toplev.h"
#include "obstack.h"
-static const char *const reg_class_names[] = REG_CLASS_NAMES;
-
struct du_chain
{
struct du_chain *next_chain;
diff --git a/gcc/reload.c b/gcc/reload.c
index 2bb2fb96a95..0b865a1925f 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -1,6 +1,6 @@
/* Search an insn for pseudo regs that must be in hard regs and are not.
Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GCC.
@@ -7017,8 +7017,6 @@ static const char *const reload_when_needed_name[] =
"RELOAD_FOR_OTHER_ADDRESS"
};
-static const char * const reg_class_names[] = REG_CLASS_NAMES;
-
/* These functions are used to print the variables set by 'find_reloads' */
void
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 71c1afadd54..7961c99b9c4 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -1861,7 +1861,6 @@ delete_caller_save_insns (void)
static void
spill_failure (rtx insn, enum reg_class class)
{
- static const char *const reg_class_names[] = REG_CLASS_NAMES;
if (asm_noperands (PATTERN (insn)) >= 0)
error_for_asm (insn, "can't find a register in class %qs while "
"reloading %<asm%>",