OSDN Git Service

* harg-reg-set.h (reg_class_names): Prototype global array.
authorsayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 15 Jan 2005 16:06:17 +0000 (16:06 +0000)
committersayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 15 Jan 2005 16:06:17 +0000 (16:06 +0000)
* 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

gcc/ChangeLog
gcc/cfg.c
gcc/config/m68hc11/m68hc11.c
gcc/hard-reg-set.h
gcc/ra-debug.c
gcc/regclass.c
gcc/regrename.c
gcc/reload.c
gcc/reload1.c

index d07cea1..42c0e98 100644 (file)
@@ -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
index b36a96f..bc68faa 100644 (file)
--- 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)
index e134f57..f2a44fb 100644 (file)
@@ -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)
index b4654b1..c78527e 100644 (file)
@@ -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)                          \
index 8431534..1d4bfc7 100644 (file)
@@ -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.  */
 
index 3fd8281..ab8f7c8 100644 (file)
@@ -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]);
index 4b3860c..eec594c 100644 (file)
@@ -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;
index 2bb2fb9..0b865a1 100644 (file)
@@ -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
index 71c1afa..7961c99 100644 (file)
@@ -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%>",