This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RFC: Putting target-dependent global state into switchable structures


GCC has a fair number of global variables that cache target-dependent
data.  This makes it difficult to switch between subtargets on the fly,
such as when switching between a MIPS16 and a non-MIPS16 function.

Our current approach is to call target_reinit each time we make such
a switch.  This function goes off and redoes a fair chunk of the target
initialisation process, and although it works (or least worked) pretty well,
it is very slow.

I've got a series of patches that speed up the switching process by
avoiding target_reinit.  Rather than spam the list with the entire
series now, I thought I'd better ask for feedback on the general approach.

Take the following very contrived example:

int x = 1;
#define B(X)							       \
  void __attribute__((mips16, noinline)) X##_mips16 (void) { x++; }    \
  void __attribute__((nomips16, noinline)) X (void) { X##_mips16 (); }
#define C(X) B(X##0) B(X##1) B(X##2) B(X##3) B(X##4) \
  B(X##5) B(X##6) B(X##7) B(X##8) B(X##9)
#define D(X) C(X##0) C(X##1) C(X##2) C(X##3) C(X##4) \
  C(X##5) C(X##6) C(X##7) C(X##8) C(X##9)
D(foo)

(that's 100 non-MIPS16 functions and 100 MIPS16 functions).  At the
moment, a typical -O2 -g compilation takes:

real    0m17.705s
user    0m17.533s
sys     0m0.172s

After the patches it takes:

real    0m0.336s
user    0m0.324s
sys     0m0.016s

The generated code is the same.

The approach I went for is very similar to what we already we for
cfun and crtl.  That is, we have structures of the form:

   type1 x_field1;
   ...
   typeN x_fieldN;

and the current versions of the variables are then accessed using macros
such as:

   #define field1 (...->x_field1)
   ...
   #define fieldN (...->x_fieldN)

I wanted to make it as easy as possible to add more global variables
(caching data is good!) so I ended up describing them in special .def files.
A new generator program, gentarget-globals, then produces the actual
C code.

Also, I didn't want to pessimise the majority of targets by adding
extra pointer chasing where it wasn't needed.  If a target doesn't
want to switch subtargets -- the default assumption -- then the
macros above actually have the form:

   #define field1 (global_state.x_field1)
   ...
   #define fieldN (global_state.x_fieldN)

The advantages I see of this approach are:

  - There's very little code churn.  Most code that uses these variables
    isn't affected.

  - It puts all the target-dependent global state in separate files.
    At the moment, this state tends to be intermingled with
    target-independent or short-lived data, and it isn't always
    easy to see which is which.

  - It should be easier to make systematic changes to the global state
    in future.

The main disadvantage I see is that it makes debugging a bit harder.
My defence against that is:

  - It's no worse than what we already do for cfun and crtl.
    (A very weak argument at best.)

  - AIUI, you can avoid the problem by using macro debugging,
    although I've never tried it myself.

I'm afraid it's also true that the new .def files are closer to
syntactic vinegar than syntactic sugar.

As a taster, I've attached four patches:

  - the main infrastructure patch
  - a mechanical and uninteresting patch to add HARD_REG_SET_H to Makefile.in
  - a patch to put some hard-reg-set.h variables in a .def file
  - the patch to make MIPS use this infrastructure

Thoughts?

Richard


gcc/
	* doc/tm.texi (SWITCHABLE_TARGET): Document.
	* Makefile.in (target_globals_def): New variable.
	(target_globals_h): Likewise.
	(TARGET_GLOBALS_H): Likewise.
	(OBJS-common): Add target-globals.o.
	(gtype-desc.o): Depend on $(TARGET_GLOBALS_H).
	(target-globals.o): New rule.
	($(target_globals_h)): Likewise.
	(s-target-globals): Likewise.
	(GTFILES): Add $(target_globals_h).
	(build/gentarget-globals.o): New rule.
	* defaults.h (SWITCHABLE_TARGET): Define.
	* gengtype.c (open_base_files): Add target-globals.h to the
	include list.
	* target-globals.def: New file.
	* gentarget-globals.c: Likewise.
	* target-globals.c: Likewise.

Index: gcc/doc/tm.texi
===================================================================
--- gcc/doc/tm.texi	2010-06-26 09:21:23.000000000 +0100
+++ gcc/doc/tm.texi	2010-06-26 09:22:06.000000000 +0100
@@ -871,6 +871,25 @@ pointer.  If this macro is defined, GCC
 @option{-fomit-frame-pointer} option whenever @option{-O} is specified.
 @end defmac
 
+@defmac SWITCHABLE_TARGET
+Some targets need to switch between substantially different subtargets
+during compilation.  For example, the MIPS target has one subtarget for
+the traditional MIPS architecture and another for MIPS16.  Source code
+can switch between these two subarchitectures using the @code{mips16}
+and @code{nomips16} attributes.
+
+Such subtargets can differ in things like the set of available
+registers, the set of available instructions, the costs of various
+operations, and so on.  GCC caches a lot of this type of information
+in global variables, and recomputing them for each subtarget takes a
+significant amount of time.  The compiler therefore provides a facility
+for maintaining several versions of the global variables and quickly
+switching between them; see @file{target-globals.def} for details.
+
+Define this macro to 1 if your target needs this facility.  The default
+is 0.
+@end defmac
+
 @node Per-Function Data
 @section Defining data structures for per-function information.
 @cindex per-function data
Index: gcc/Makefile.in
===================================================================
--- gcc/Makefile.in	2010-06-26 09:21:23.000000000 +0100
+++ gcc/Makefile.in	2010-06-26 19:07:17.000000000 +0100
@@ -857,6 +857,18 @@ else
 REVISION_s  := "\"\""
 endif
 
+# target-globals.def is required to be a simple list of '#include "foo.def"'
+# directives, so get the list of individual definition files directly from
+# there.
+target_globals_def := $(shell sed -n 's/^\#include "\(.*\)"/\1/p' \
+  < $(srcdir)/target-globals.def)
+
+# Each .def file in target_globals_def produces a similarly-named .h file.
+# The generator also produces target-globals.h and target-globals-def.h.
+target_globals_h = $(target_globals_def:.def=.h) \
+		   target-globals.h \
+		   target-globals-def.h
+
 # Shorthand variables for dependency lists.
 VEC_H = vec.h statistics.h
 EXCEPT_H = except.h $(HASHTAB_H) vecprim.h vecir.h
@@ -968,6 +980,7 @@ GCC_PLUGIN_H = gcc-plugin.h highlev-plug
 		$(HASHTAB_H)
 PLUGIN_H = plugin.h $(GCC_PLUGIN_H)
 PLUGIN_VERSION_H = plugin-version.h configargs.h
+TARGET_GLOBALS_H = target-globals.h
 
 #
 # Now figure out from those variables how to compile and link.
@@ -1336,6 +1349,7 @@ OBJS-common = \
 	stor-layout.o \
 	store-motion.o \
 	stringpool.o \
+	target-globals.o \
 	targhooks.o \
 	timevar.o \
 	toplev.o \
@@ -2247,7 +2261,7 @@ gtype-desc.o: gtype-desc.c $(CONFIG_H) $
 	hard-reg-set.h $(BASIC_BLOCK_H) cselib.h $(INSN_ADDR_H) $(OPTABS_H) \
 	libfuncs.h debug.h $(GGC_H) $(CGRAPH_H) $(TREE_FLOW_H) reload.h \
 	$(CPP_ID_DATA_H) tree-chrec.h $(CFGLAYOUT_H) $(EXCEPT_H) output.h \
-	$(CFGLOOP_H) $(TARGET_H)
+	$(CFGLOOP_H) $(TARGET_H) $(TARGET_GLOBALS_H)
 
 ggc-common.o: ggc-common.c $(CONFIG_H) $(SYSTEM_H) coretypes.h		\
 	$(GGC_H) $(HASHTAB_H) $(TOPLEV_H) $(PARAMS_H) hosthooks.h	\
@@ -3467,6 +3481,8 @@ lower-subreg.o : lower-subreg.c $(CONFIG
    $(MACHMODE_H) $(TM_H) $(RTL_H) $(TM_P_H) $(TIMEVAR_H) $(FLAGS_H) \
    insn-config.h $(BASIC_BLOCK_H) $(RECOG_H) $(OBSTACK_H) $(BITMAP_H) \
    $(EXPR_H) $(EXCEPT_H) $(REGS_H) $(TREE_PASS_H) $(DF_H)
+target-globals.o : target-globals.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
+   $(TM_H) $(GGC_H) $(TOPLEV_H) $(target_globals_h)
 
 $(out_object_file): $(out_file) $(CONFIG_H) coretypes.h $(TM_H) $(TREE_H) \
    $(RTL_H) $(REGS_H) hard-reg-set.h insn-config.h conditions.h \
@@ -3669,6 +3685,14 @@ s-constrs-h: $(MD_DEPS) build/genpreds$(
 	$(SHELL) $(srcdir)/../move-if-change tmp-constrs.h tm-constrs.h
 	$(STAMP) s-constrs-h
 
+$(target_globals_h): s-target-globals; @true
+s-target-globals: build/gentarget-globals$(build_exeext)
+	build/gentarget-globals$(build_exeext)
+	for file in $(target_globals_h); do \
+	  $(SHELL) $(srcdir)/../move-if-change tmp-$$file $$file; \
+	done
+	$(STAMP) s-target-globals
+
 GTFILES = $(CPP_ID_DATA_H) $(srcdir)/input.h $(srcdir)/coretypes.h \
   $(srcdir)/vecprim.h $(srcdir)/vecir.h \
   $(host_xm_file_list) \
@@ -3714,6 +3738,7 @@ GTFILES = $(CPP_ID_DATA_H) $(srcdir)/inp
   $(srcdir)/tree-ssa-alias.h \
   $(srcdir)/ipa-prop.h \
   $(srcdir)/lto-streamer.h \
+  $(target_globals_h) \
   @all_gtfiles@
 
 # Compute the list of GT header files from the corresponding C sources,
@@ -3847,6 +3872,8 @@ build/genpreds.o : genpreds.c $(RTL_BASE
   coretypes.h $(GTM_H) errors.h $(READ_MD_H) gensupport.h $(OBSTACK_H)
 build/genrecog.o : genrecog.c $(RTL_BASE_H) $(BCONFIG_H) $(SYSTEM_H)	\
   coretypes.h $(GTM_H) errors.h $(READ_MD_H) gensupport.h
+build/gentarget-globals.o : gentarget-globals.c $(BCONFIG_H) $(SYSTEM_H) \
+  target-globals.def $(target_globals_def)
 
 # Compile the programs that generate insn-* from the machine description.
 # They are compiled with $(COMPILER_FOR_BUILD), and associated libraries,
Index: gcc/defaults.h
===================================================================
--- gcc/defaults.h	2010-06-26 09:21:23.000000000 +0100
+++ gcc/defaults.h	2010-06-26 19:06:41.000000000 +0100
@@ -1368,6 +1368,10 @@ #define STACK_CHECK_FIXED_FRAME_SIZE (4
 #define STACK_CHECK_MAX_VAR_SIZE (STACK_CHECK_MAX_FRAME_SIZE / 100)
 #endif
 
+#ifndef SWITCHABLE_TARGET
+#define SWITCHABLE_TARGET 0
+#endif
+
 #endif /* GCC_INSN_FLAGS_H  */
 
 #endif  /* ! GCC_DEFAULTS_H */
Index: gcc/gengtype.c
===================================================================
--- gcc/gengtype.c	2010-06-26 09:41:03.000000000 +0100
+++ gcc/gengtype.c	2010-06-26 09:41:10.000000000 +0100
@@ -1571,7 +1571,7 @@ open_base_files (void)
       "optabs.h", "libfuncs.h", "debug.h", "ggc.h", "cgraph.h",
       "tree-flow.h", "reload.h", "cpp-id-data.h", "tree-chrec.h",
       "cfglayout.h", "except.h", "output.h", "gimple.h", "cfgloop.h",
-      "target.h", "ipa-prop.h", "lto-streamer.h", NULL
+      "target.h", "ipa-prop.h", "lto-streamer.h", "target-globals.h", NULL
     };
     const char *const *ifp;
     outf_p gtype_desc_c;
Index: gcc/target-globals.def
===================================================================
--- /dev/null	2010-06-26 09:30:32.426301926 +0100
+++ gcc/target-globals.def	2010-06-26 19:06:47.000000000 +0100
@@ -0,0 +1,70 @@
+/* List of target-dependent global variables.
+   Copyright (C) 2010  Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3.  If not see
+<http://www.gnu.org/licenses/>.  */
+
+/* This file lists all persistent global variables that hold target-dependent
+   data.  It is structured as a list of #include "foo.def" statements,
+   with each foo.def describing one logical group of variables.
+   The .def files themselves are structured as follows:
+
+     START_GROUP (group_name)
+       VAR (type1, name_and_modifiers1)
+       ...
+       VAR (typeN, name_and_modifiersN)
+     END_GROUP
+
+   The VAR lines are basically just normal variable declarations,
+   but with a comma immediately before the variable name.  The variable
+   name cannot be wrapped in parentheses.  The GTY rules for these
+   variables are the same as for any other global variable.
+
+   The gentarget-globals program generates a foo.h file for each
+   foo.def file.  For each group G, the foo.h file defines:
+
+     - struct target_G, a structure that stores all the variables in G.
+
+     - default_target_G, the target_G structure for the default target.
+
+     - this_target_G, a pointer to the target_G structure for the
+       current target.
+
+   For each variable V in G, it defines a macro V that accesses the
+   corresponding field of this_target_G.
+
+   gentarget-globals also creates a target-globals.h file that contains:
+
+     - struct target_globals, a structure that encapsulates the target_G
+       state for all groups G.
+
+     - default_target_globals, the target_globals structure for the
+       default target.
+
+     - this_target_globals, a pointer to the target_globals structure
+       for the current target.
+
+   If SWITCHABLE_TARGET is defined, target-globals.h also provides
+   functions for switching between targets:
+
+     - struct target_globals *save_target_globals (void)
+	 Create, initialize and return a target_globals structure for
+	 the current target (i.e. the target specified by things like
+	 target_flags).  This is generally a very slow function.
+
+     - void restore_target_globals (struct target_globals *globals)
+	 Switch back to previously-created target globals GLOBALS.
+	 This is intended to be a very quick function.  */
Index: gcc/gentarget-globals.c
===================================================================
--- /dev/null	2010-06-26 09:30:32.426301926 +0100
+++ gcc/gentarget-globals.c	2010-06-26 19:15:39.000000000 +0100
@@ -0,0 +1,417 @@
+/* Generator for target-dependent global structures.
+   Copyright (C) 2010
+   Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3.  If not see
+<http://www.gnu.org/licenses/>.  */
+
+#include "bconfig.h"
+#include "system.h"
+
+/* Information about a START_GROUP declaration.  */
+struct target_group {
+  /* The next group in the list.  */
+  struct target_group *next;
+
+  /* The header file that should declare the C version of the group,
+     or null if it should go in the same header as the previous group.  */
+  const char *header_file;
+
+  /* The name of the group as it appears in the .def file.  */
+  const char *name;
+
+  /* The list of variables in this group.  */
+  struct target_var *vars;
+
+  /* True if the associated C structure needs to be garbage-collected.  */
+  bool needs_gc_p;
+};
+
+/* Information about a VAR declaration.  */
+struct target_var {
+  /* The next variable in the list.  */
+  struct target_var *next;
+
+  /* The two VAR operands.  */
+  const char *type;
+  const char *name_and_modifiers;
+
+  /* The length of the name part of NAME_AND_MODIFIERS.  */
+  int name_length;
+
+  /* True if the variable needs to be garbage-collected.  */
+  bool needs_gc_p;
+};
+
+/* The list of all groups.  */
+static struct target_group *groups;
+
+/* Tail pointers used while constructing group and variable lists.  */
+static struct target_group **groups_tail = &groups;
+static struct target_var **vars_tail;
+
+/* The group we are currently processing.  */
+static struct target_group *this_group;
+
+/* The last source file seen by start_group.  */
+static const char *last_source_file;
+
+/* The current output file.  */
+static FILE *file;
+
+/* Start writing to the file that will become FILENAME.  Write the contents
+   to tmp-FILENAME for now, leaving the makefile to rename it if the
+   contents have changed.  */
+
+static void
+start_file (const char *filename)
+{
+  filename = ACONCAT (("tmp-", filename, NULL));
+  file = fopen (filename, "w");
+  if (!file)
+    {
+      fprintf (stderr, "could not create `%s': %s", filename, strerror (errno));
+      exit (1);
+    }
+
+  fprintf (file, "/* Automatically generated; do not edit.  */\n");
+  fprintf (file, "\n");
+}
+
+/* Stop writing to the current output file.  */
+
+static void
+end_file (void)
+{
+  fclose (file);
+}
+
+/* Like start_file, but specifically for headers.  Write the #ifdef
+   guard for it too.  */
+
+static void
+start_header (const char *filename)
+{
+  char *p;
+  char *guard;
+
+  start_file (filename);
+
+  guard = ASTRDUP (filename);
+  for (p = guard; *p; p++)
+    if (*p == '-' || *p == '.')
+      *p = '_';
+    else
+      *p = TOUPPER (*p);
+
+  fprintf (file, "#ifndef %s\n", guard);
+  fprintf (file, "#define %s\n", guard);
+  fprintf (file, "\n");
+}
+
+/* Close out the #ifdef guard started by start_header and close the file.  */
+
+static void
+end_header (void)
+{
+  fprintf (file, "#endif\n");
+  end_file ();
+}
+
+/* Process a START_GROUP (NAME) statement in FROM_FILE.  */
+
+static void
+start_group (const char *from_file, const char *name)
+{
+  struct target_group *g;
+  char *filename;
+  size_t len;
+
+  if (this_group)
+    {
+      fprintf (file, "%s: two START_GROUPs without"
+	       " an intervening END_GROUP\n", from_file);
+      exit (1);
+    }
+
+  /* See if this group is the first in FROM_FILE.  */
+  if (last_source_file && strcmp (last_source_file, from_file) == 0)
+    filename = 0;
+  else
+    {
+      /* Use s/\.def$/.h/ to get the name of the header file.  */
+      last_source_file = from_file;
+      filename = xstrdup (lbasename (from_file));
+      len = strlen (filename);
+      if (len < 4 || strcmp (filename + len - 4, ".def") != 0)
+	{
+	  fprintf (stderr, "filename '%s' does not end in .def\n", filename);
+	  exit (1);
+	}
+      filename[len - 3] = 'h';
+      filename[len - 2] = 0;
+    }
+
+  g = XNEW (struct target_group);
+  g->next = 0;
+  g->header_file = filename;
+  g->name = name;
+  g->vars = 0;
+  g->needs_gc_p = false;
+
+  *groups_tail = g;
+  this_group = g;
+
+  groups_tail = &g->next;
+  vars_tail = &g->vars;
+}
+
+/* Process a VAR (TYPE, NAME_AND_MODIFIERS) statement in FROM_FILE.  */
+
+static void
+var (const char *from_file, const char *type, const char *name_and_modifiers)
+{
+  struct target_var *v;
+  const char *name_end;
+
+  if (!this_group)
+    {
+      fprintf (file, "%s: VAR without START_GROUP\n", from_file);
+      exit (1);
+    }
+
+  /* Find the end of the name part of NAME_AND_MODIFIERS.  */
+  name_end = name_and_modifiers;
+  while (*name_end == '_' || ISALNUM (*name_end))
+    name_end++;
+
+  v = XNEW (struct target_var);
+  v->next = 0;
+  v->type = type;
+  v->name_and_modifiers = name_and_modifiers;
+  v->name_length = name_end - name_and_modifiers;
+  v->needs_gc_p = (strstr (type, "GTY") != 0);
+  if (v->needs_gc_p)
+    this_group->needs_gc_p = true;
+
+  *vars_tail = v;
+  vars_tail = &v->next;
+}
+
+/* Process an END_GROUP statement in FROM_FILE.  */
+
+static void
+end_group (const char *from_file)
+{
+  if (!this_group)
+    {
+      fprintf (file, "%s: END_GROUP without START_GROUP\n", from_file);
+      exit (1);
+    }
+
+  this_group = 0;
+}
+
+/* Write the target-foo.h file for each target-foo.def file.  */
+
+static void
+write_individual_headers (void)
+{
+  struct target_group *g;
+  struct target_var *v;
+  const char *gty;
+
+  for (g = groups; g; g = g->next)
+    {
+      /* See if G starts a new header file.  */
+      if (g->header_file)
+	{
+	  if (file)
+	    end_header ();
+	  start_header (g->header_file);
+	  fprintf (file, "#include \"tm.h\"\n");
+	  fprintf (file, "\n");
+	}
+
+      /* Declare the main target structure, target_G.  Mark it with
+	 GTY(()) if any variable needs to be garbage-collected.  Mark
+	 any non-garbage-collected vars of a garbage-collected structure
+	 with GTY((skip)).  */
+      gty = g->needs_gc_p ? "GTY(()) " : "";
+      fprintf (file, "struct %starget_%s {\n", gty, g->name);
+      for (v = g->vars; v; v = v->next)
+	{
+	  gty = !g->needs_gc_p || v->needs_gc_p ? "" : " GTY((skip))";
+	  fprintf (file, "  %s%s x_%s;\n", v->type, gty, v->name_and_modifiers);
+	}
+      fprintf (file, "};\n");
+      fprintf (file, "\n");
+
+      /* Declare the default version of the group, default_target_G.  */
+      fprintf (file, "extern %sstruct target_%s default_target_%s;\n",
+	       g->needs_gc_p ? "GTY(()) " : "", g->name, g->name);
+
+      /* Declare the pointer to the current version of the group,
+	 this_target_G.  This is not garbage-collected because there
+	 must always be a containing target_globals.  */
+      fprintf (file, "extern struct target_%s *this_target_%s;\n",
+	       g->name, g->name);
+      fprintf (file, "\n");
+
+      /* Define macros to access each variable.  Use direct accesses
+	 to the default group if only one target is supported.  */
+      fprintf (file, "#if SWITCHABLE_TARGET\n");
+      for (v = g->vars; v; v = v->next)
+	{
+	  fprintf (file, "#define %.*s \\\n",
+		   v->name_length, v->name_and_modifiers);
+	  fprintf (file, "  (this_target_%s->x_%.*s)\n",
+		   g->name, v->name_length, v->name_and_modifiers);
+	}
+      fprintf (file, "#else\n");
+      for (v = g->vars; v; v = v->next)
+	{
+	  fprintf (file, "#define %.*s \\\n",
+		   v->name_length, v->name_and_modifiers);
+	  fprintf (file, "  (default_target_%s.x_%.*s)\n",
+		   g->name, v->name_length, v->name_and_modifiers);
+	}
+      fprintf (file, "#endif\n");
+      fprintf (file, "\n");
+    }
+  if (file)
+    end_header ();
+}
+
+/* Write the contents of target-globals.h.  */
+
+static void
+write_target_globals_h (void)
+{
+  struct target_group *g;
+
+  start_header ("target-globals.h");
+
+  /* Declare the overall target_globals structure, which is just a bunch
+     of pointers to specific groups.  */
+  fprintf (file, "struct GTY(()) target_globals {\n");
+  for (g = groups; g; g = g->next)
+    fprintf (file, "  struct target_%s *%s%s;\n",
+	     g->name, g->needs_gc_p ? "" : "GTY((skip)) ", g->name);
+  fprintf (file, "};\n");
+  fprintf (file, "\n");
+
+  /* Declare the default versions of the globals.  */
+  fprintf (file, "extern struct target_globals default_target_globals;\n");
+  fprintf (file, "\n");
+
+  /* Declare the current versions of the globals.  */
+  for (g = groups; g; g = g->next)
+    fprintf (file, "extern struct target_%s *this_target_%s;\n",
+	     g->name, g->name);
+  fprintf (file, "\n");
+
+  /* Declare the C functions in target-global-defs.h.  */
+  fprintf (file, "#if SWITCHABLE_TARGET\n");
+  fprintf (file, "extern struct target_globals *save_target_globals (void);\n");
+  fprintf (file, "#endif\n");
+  fprintf (file, "\n");
+
+  fprintf (file, "#if SWITCHABLE_TARGET\n");
+  fprintf (file, "static inline void\n");
+  fprintf (file, "restore_target_globals (struct target_globals *globals)\n");
+  fprintf (file, "{\n");
+  for (g = groups; g; g = g->next)
+    fprintf (file, "  this_target_%s = globals->%s;\n", g->name, g->name);
+  fprintf (file, "}\n");
+  fprintf (file, "#endif\n");
+  fprintf (file, "\n");
+  end_header ();
+}
+
+/* Write the contents of target-globals-def.h.  */
+
+static void
+write_target_globals_def_h (void)
+{
+  struct target_group *g;
+
+  start_header ("target-globals-def.h");
+
+  /* Print all the includes.  */
+  fprintf (file, "#include \"target-globals.h\"\n");
+  for (g = groups; g; g = g->next)
+    if (g->header_file)
+      fprintf (file, "#include \"%s\"\n", g->header_file);
+  fprintf (file, "\n");
+
+  /* Define default_target_G for each group G.  */
+  for (g = groups; g; g = g->next)
+    fprintf (file, "struct target_%s default_target_%s;\n", g->name, g->name);
+  fprintf (file, "\n");
+
+  /* Define default_target_globals.  */
+  fprintf (file, "struct target_globals default_target_globals = {\n");
+  for (g = groups; g; g = g->next)
+    fprintf (file, "  &default_target_%s%s\n", g->name, g->next ? ", \\" : "");
+  fprintf (file, "};\n");
+  fprintf (file, "\n");
+
+  /* Define this_target_G for each group G.  */
+  for (g = groups; g; g = g->next)
+    fprintf (file, "struct target_%s *this_target_%s = &default_target_%s;\n",
+	     g->name, g->name, g->name);
+  fprintf (file, "\n");
+
+  /* Define save_target_globals.  This requires gcc_alloc_target_globals,
+     so can only be defined if there are target_globals structures to mark.  */
+  fprintf (file, "#if SWITCHABLE_TARGET\n");
+  fprintf (file, "struct target_globals *\n");
+  fprintf (file, "save_target_globals (void)\n");
+  fprintf (file, "{\n");
+  fprintf (file, "  struct target_globals *globals;\n");
+  fprintf (file, "\n");
+  fprintf (file, "  globals = ggc_alloc_target_globals ();\n");
+  for (g = groups; g; g = g->next)
+    if (g->needs_gc_p)
+      fprintf (file, "  globals->%s = ggc_alloc_cleared_target_%s ();\n",
+	       g->name, g->name);
+    else
+      fprintf (file, "  globals->%s = XCNEW (struct target_%s);\n",
+	       g->name, g->name);
+  fprintf (file, "  restore_target_globals (globals);\n");
+  fprintf (file, "  target_reinit ();\n");
+  fprintf (file, "  return globals;\n");
+  fprintf (file, "}\n");
+  fprintf (file, "#endif\n");
+  fprintf (file, "\n");
+
+  end_header ();
+}
+
+int
+main (void)
+{
+#define START_GROUP(X) start_group (__FILE__, #X);
+#define VAR(X, Y) var (__FILE__, #X, #Y);
+#define END_GROUP end_group (__FILE__);
+#include "target-globals.def"
+
+  write_individual_headers ();
+  write_target_globals_h ();
+  write_target_globals_def_h ();
+  return 0;
+}
Index: gcc/target-globals.c
===================================================================
--- /dev/null	2010-06-26 09:30:32.426301926 +0100
+++ gcc/target-globals.c	2010-06-26 19:06:47.000000000 +0100
@@ -0,0 +1,27 @@
+/* Management of target-dependent global variables.
+   Copyright (C) 2010  Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3.  If not see
+<http://www.gnu.org/licenses/>.  */
+
+#include "config.h"
+#include "system.h"
+#include "coretypes.h"
+#include "tm.h"
+#include "ggc.h"
+#include "toplev.h"
+
+#include "target-globals-def.h"
gcc/
	* Makefile.in (HARD_REG_SET_H): New variable.  Use it instead of
	hard-reg-set.h in all dependency lists.

Index: gcc/Makefile.in
===================================================================
--- gcc/Makefile.in	2010-06-26 19:07:17.000000000 +0100
+++ gcc/Makefile.in	2010-06-26 19:22:43.000000000 +0100
@@ -891,7 +891,8 @@ TREE_H = tree.h all-tree.def tree.def c-
 	$(INPUT_H) statistics.h $(VEC_H) treestruct.def $(HASHTAB_H) \
 	double-int.h alias.h $(SYMTAB_H) options.h vecir.h \
 	$(REAL_H) $(FIXED_VALUE_H)
-REGSET_H = regset.h $(BITMAP_H) hard-reg-set.h
+HARD_REG_SET_H = hard-reg-set.h
+REGSET_H = regset.h $(BITMAP_H) $(HARD_REG_SET_H)
 BASIC_BLOCK_H = basic-block.h $(PREDICT_H) $(VEC_H) $(FUNCTION_H) cfghooks.h
 GIMPLE_H = gimple.h gimple.def gsstruct.def pointer-set.h $(VEC_H) \
 	$(GGC_H) $(BASIC_BLOCK_H) $(TM_H) $(TARGET_H) tree-ssa-operands.h \
@@ -906,7 +907,7 @@ FLAGS_H = flags.h coretypes.h options.h
 FUNCTION_H = function.h $(TREE_H) $(HASHTAB_H) vecprim.h $(TM_H)
 EXPR_H = expr.h insn-config.h $(FUNCTION_H) $(RTL_H) $(FLAGS_H) $(TREE_H) $(MACHMODE_H) $(EMIT_RTL_H)
 OPTABS_H = optabs.h insn-codes.h
-REGS_H = regs.h $(MACHMODE_H) hard-reg-set.h
+REGS_H = regs.h $(MACHMODE_H) $(HARD_REG_SET_H)
 SCHED_INT_H = sched-int.h $(INSN_ATTR_H) $(BASIC_BLOCK_H) $(RTL_H) $(DF_H) \
 	vecprim.h $(REGSET_H)
 SEL_SCHED_IR_H = sel-sched-ir.h $(INSN_ATTR_H) $(BASIC_BLOCK_H) $(RTL_H) \
@@ -923,7 +924,7 @@ CGRAPH_H = cgraph.h $(VEC_H) $(TREE_H) $
 	cif-code.def ipa-ref.h ipa-ref-inline.h
 DF_H = df.h $(BITMAP_H) $(REGSET_H) sbitmap.h $(BASIC_BLOCK_H) \
 	alloc-pool.h $(TIMEVAR_H)
-RESOURCE_H = resource.h hard-reg-set.h $(DF_H)
+RESOURCE_H = resource.h $(HARD_REG_SET_H) $(DF_H)
 DDG_H = ddg.h sbitmap.h $(DF_H)
 GCC_H = gcc.h version.h $(DIAGNOSTIC_CORE_H)
 GGC_H = ggc.h gtype-desc.h statistics.h
@@ -2045,8 +2046,8 @@ c-typeck.o : c-typeck.c c-lang.h $(CONFI
 
 
 graph.o: graph.c $(SYSTEM_H) coretypes.h $(TM_H) $(TOPLEV_H) $(FLAGS_H) output.h \
-    $(RTL_H) $(FUNCTION_H) hard-reg-set.h $(BASIC_BLOCK_H) graph.h $(OBSTACK_H) \
-    $(CONFIG_H) $(EMIT_RTL_H)
+    $(RTL_H) $(FUNCTION_H) $(HARD_REG_SET_H) $(BASIC_BLOCK_H) graph.h \
+    $(OBSTACK_H) $(CONFIG_H) $(EMIT_RTL_H)
 
 sbitmap.o: sbitmap.c sbitmap.h $(CONFIG_H) $(SYSTEM_H) coretypes.h $(BASIC_BLOCK_H)
 ebitmap.o: ebitmap.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
@@ -2111,7 +2112,7 @@ c-family/c-gimplify.o : c-family/c-gimpl
 	$(C_COMMON_H) $(DIAGNOSTIC_CORE_H) $(GIMPLE_H) \
 	$(FLAGS_H) langhooks.h $(TOPLEV_H) $(TREE_FLOW_H) $(LANGHOOKS_DEF_H) \
 	$(TM_H) coretypes.h $(C_PRETTY_PRINT_H) $(CGRAPH_H) $(BASIC_BLOCK_H) \
-	hard-reg-set.h $(TREE_DUMP_H) $(TREE_INLINE_H)
+	$(HARD_REG_SET_H) $(TREE_DUMP_H) $(TREE_INLINE_H)
 
 c-family/c-lex.o : c-family/c-lex.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
 	$(TM_H) $(TREE_H) $(FIXED_VALUE_H) debug.h $(C_COMMON_H) $(SPLAY_TREE_H) \
@@ -2258,7 +2259,7 @@ endif
 gtype-desc.o: gtype-desc.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
 	$(HASHTAB_H) $(SPLAY_TREE_H) $(OBSTACK_H) $(BITMAP_H) \
 	$(INPUT_H) $(TREE_H) $(RTL_H) $(FUNCTION_H) insn-config.h $(EXPR_H) \
-	hard-reg-set.h $(BASIC_BLOCK_H) cselib.h $(INSN_ADDR_H) $(OPTABS_H) \
+	$(HARD_REG_SET_H) $(BASIC_BLOCK_H) cselib.h $(INSN_ADDR_H) $(OPTABS_H) \
 	libfuncs.h debug.h $(GGC_H) $(CGRAPH_H) $(TREE_FLOW_H) reload.h \
 	$(CPP_ID_DATA_H) tree-chrec.h $(CFGLAYOUT_H) $(EXCEPT_H) output.h \
 	$(CFGLOOP_H) $(TARGET_H) $(TARGET_GLOBALS_H)
@@ -2814,7 +2815,7 @@ opts-common.o : opts-common.c opts.h $(C
 targhooks.o : targhooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TREE_H) \
    $(EXPR_H) $(TM_H) $(RTL_H) $(TM_P_H) $(FUNCTION_H) output.h $(TOPLEV_H) \
    $(MACHMODE_H) $(TARGET_DEF_H) $(TARGET_H) $(GGC_H) gt-targhooks.h \
-   $(OPTABS_H) $(RECOG_H) reload.h hard-reg-set.h
+   $(OPTABS_H) $(RECOG_H) reload.h $(HARD_REG_SET_H)
 
 bversion.h: s-bversion; @true
 s-bversion: BASE-VER
@@ -2830,10 +2831,10 @@ toplev.o : toplev.c $(CONFIG_H) $(SYSTEM
    version.h $(RTL_H) $(FUNCTION_H) $(FLAGS_H) xcoffout.h $(INPUT_H) \
    $(INSN_ATTR_H) output.h $(DIAGNOSTIC_H) debug.h insn-config.h intl.h \
    $(RECOG_H) Makefile $(TOPLEV_H) dwarf2out.h sdbout.h dbxout.h $(EXPR_H) \
-   hard-reg-set.h $(BASIC_BLOCK_H) graph.h $(EXCEPT_H) $(REGS_H) $(TIMEVAR_H) \
-   value-prof.h $(PARAMS_H) $(TM_P_H) reload.h ira.h dwarf2asm.h $(TARGET_H) \
-   langhooks.h insn-flags.h $(CFGLAYOUT_H) $(CFGLOOP_H) hosthooks.h \
-   $(CGRAPH_H) $(COVERAGE_H) alloc-pool.h $(GGC_H) $(INTEGRATE_H) \
+   $(HARD_REG_SET_H) $(BASIC_BLOCK_H) graph.h $(EXCEPT_H) $(REGS_H) \
+   $(TIMEVAR_H) value-prof.h $(PARAMS_H) $(TM_P_H) reload.h ira.h dwarf2asm.h \
+   $(TARGET_H) langhooks.h insn-flags.h $(CFGLAYOUT_H) $(CFGLOOP_H) \
+   hosthooks.h $(CGRAPH_H) $(COVERAGE_H) alloc-pool.h $(GGC_H) $(INTEGRATE_H) \
    opts.h params.def tree-mudflap.h $(TREE_PASS_H) $(GIMPLE_H) \
    tree-ssa-alias.h $(PLUGIN_H) realmpfr.h tree-diagnostic.h \
    tree-pretty-print.h opts-diagnostic.h
@@ -2844,7 +2845,7 @@ toplev.o : toplev.c $(CONFIG_H) $(SYSTEM
 passes.o : passes.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
    $(RTL_H) $(FUNCTION_H) $(FLAGS_H) xcoffout.h $(INPUT_H) $(INSN_ATTR_H) output.h \
    $(DIAGNOSTIC_CORE_H) debug.h insn-config.h intl.h $(RECOG_H) $(TOPLEV_H) \
-   dwarf2out.h sdbout.h dbxout.h $(EXPR_H) hard-reg-set.h $(BASIC_BLOCK_H) \
+   dwarf2out.h sdbout.h dbxout.h $(EXPR_H) $(HARD_REG_SET_H) $(BASIC_BLOCK_H) \
    graph.h $(EXCEPT_H) $(REGS_H) $(TIMEVAR_H) value-prof.h \
    $(PARAMS_H) $(TM_P_H) reload.h dwarf2asm.h $(TARGET_H) \
    langhooks.h insn-flags.h $(CFGLAYOUT_H) $(CFGLOOP_H) \
@@ -2869,35 +2870,35 @@ rtl.o : rtl.c $(CONFIG_H) $(SYSTEM_H) co
   $(GGC_H) $(BCONFIG_H) insn-notes.def reg-notes.def $(TOPLEV_H)
 
 print-rtl.o : print-rtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
-    $(RTL_H) $(TREE_H) hard-reg-set.h $(BASIC_BLOCK_H) $(FLAGS_H) \
+    $(RTL_H) $(TREE_H) $(HARD_REG_SET_H) $(BASIC_BLOCK_H) $(FLAGS_H) \
     $(BCONFIG_H) $(DIAGNOSTIC_H) cselib.h $(TREE_PASS_H) tree-pretty-print.h
 rtlanal.o : rtlanal.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TOPLEV_H) \
-   $(RTL_H) hard-reg-set.h $(TM_P_H) insn-config.h $(RECOG_H) \
+   $(RTL_H) $(HARD_REG_SET_H) $(TM_P_H) insn-config.h $(RECOG_H) \
    $(FLAGS_H) $(REGS_H) output.h $(TARGET_H) $(FUNCTION_H) $(TREE_H) \
    $(DF_H) $(EMIT_RTL_H)
 
 varasm.o : varasm.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
-   $(RTL_H) $(FLAGS_H) $(FUNCTION_H) $(EXPR_H) hard-reg-set.h $(REGS_H) \
+   $(RTL_H) $(FLAGS_H) $(FUNCTION_H) $(EXPR_H) $(HARD_REG_SET_H) $(REGS_H) \
    output.h $(TOPLEV_H) xcoffout.h debug.h $(GGC_H) $(TM_P_H) \
    $(HASHTAB_H) $(TARGET_H) langhooks.h gt-varasm.h $(BASIC_BLOCK_H) \
    $(CFGLAYOUT_H) $(CGRAPH_H) targhooks.h tree-mudflap.h \
    tree-iterator.h
 function.o : function.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
    $(TREE_H) $(CFGLAYOUT_H) $(GIMPLE_H) $(FLAGS_H) $(FUNCTION_H) $(EXPR_H) \
-   $(OPTABS_H) libfuncs.h $(REGS_H) hard-reg-set.h insn-config.h $(RECOG_H) \
+   $(OPTABS_H) libfuncs.h $(REGS_H) $(HARD_REG_SET_H) insn-config.h $(RECOG_H) \
    output.h $(TOPLEV_H) $(EXCEPT_H) $(HASHTAB_H) $(GGC_H) $(TM_P_H) langhooks.h \
    gt-function.h $(TARGET_H) $(BASIC_BLOCK_H) $(INTEGRATE_H) $(PREDICT_H) \
    $(TREE_PASS_H) $(DF_H) $(TIMEVAR_H) vecprim.h
 statistics.o : statistics.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
    $(TREE_PASS_H) $(TREE_DUMP_H) $(HASHTAB_H) statistics.h $(TM_H) $(FUNCTION_H)
 stmt.o : stmt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
-   $(TREE_H) $(FLAGS_H) $(FUNCTION_H) insn-config.h hard-reg-set.h $(EXPR_H) \
-   libfuncs.h $(EXCEPT_H) $(RECOG_H) $(TOPLEV_H) output.h $(GGC_H) $(TM_P_H) \
-   langhooks.h $(PREDICT_H) $(OPTABS_H) $(TARGET_H) $(GIMPLE_H) $(MACHMODE_H) \
-   $(REGS_H) alloc-pool.h $(PRETTY_PRINT_H) $(BITMAP_H)
+   $(TREE_H) $(FLAGS_H) $(FUNCTION_H) insn-config.h $(HARD_REG_SET_H) \
+   $(EXPR_H) libfuncs.h $(EXCEPT_H) $(RECOG_H) $(TOPLEV_H) output.h $(GGC_H) \
+   $(TM_P_H) langhooks.h $(PREDICT_H) $(OPTABS_H) $(TARGET_H) $(GIMPLE_H) \
+   $(MACHMODE_H) $(REGS_H) alloc-pool.h $(PRETTY_PRINT_H) $(BITMAP_H)
 except.o : except.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
    $(TREE_H) $(FLAGS_H) $(EXCEPT_H) $(FUNCTION_H) $(EXPR_H) libfuncs.h \
-   langhooks.h insn-config.h hard-reg-set.h $(BASIC_BLOCK_H) output.h \
+   langhooks.h insn-config.h $(HARD_REG_SET_H) $(BASIC_BLOCK_H) output.h \
    dwarf2asm.h dwarf2out.h $(TOPLEV_H) $(HASHTAB_H) intl.h $(GGC_H) \
    gt-except.h $(CGRAPH_H) $(INTEGRATE_H) $(DIAGNOSTIC_H) $(DWARF2_H) \
    $(TARGET_H) $(TM_P_H) $(TREE_PASS_H) $(TIMEVAR_H) $(TREE_FLOW_H) \
@@ -2905,7 +2906,7 @@ except.o : except.c $(CONFIG_H) $(SYSTEM
 expr.o : expr.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
    $(TREE_H) $(FLAGS_H) $(FUNCTION_H) $(REGS_H) $(EXPR_H) $(OPTABS_H) \
    libfuncs.h $(INSN_ATTR_H) insn-config.h $(RECOG_H) output.h \
-   typeclass.h hard-reg-set.h $(TOPLEV_H) hard-reg-set.h $(EXCEPT_H) \
+   typeclass.h $(HARD_REG_SET_H) $(TOPLEV_H) $(HARD_REG_SET_H) $(EXCEPT_H) \
    reload.h langhooks.h intl.h $(TM_P_H) $(TARGET_H) \
    tree-iterator.h gt-expr.h $(MACHMODE_H) $(TIMEVAR_H) $(TREE_FLOW_H) \
    $(TREE_PASS_H) $(DF_H) $(DIAGNOSTIC_H) vecprim.h $(SSAEXPAND_H)
@@ -2915,7 +2916,7 @@ dojump.o : dojump.c $(CONFIG_H) $(SYSTEM
 builtins.o : builtins.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
    $(TREE_H) $(GIMPLE_H) $(FLAGS_H) $(TARGET_H) $(FUNCTION_H) $(REGS_H) \
    $(EXPR_H) $(OPTABS_H) insn-config.h $(RECOG_H) output.h typeclass.h \
-   hard-reg-set.h $(TOPLEV_H) hard-reg-set.h $(EXCEPT_H) $(TM_P_H) $(PREDICT_H) \
+   $(HARD_REG_SET_H) $(TOPLEV_H) $(EXCEPT_H) $(TM_P_H) $(PREDICT_H) \
    libfuncs.h langhooks.h $(BASIC_BLOCK_H) tree-mudflap.h realmpfr.h \
    $(BUILTINS_DEF) $(MACHMODE_H) $(DIAGNOSTIC_CORE_H) $(TREE_FLOW_H) \
    value-prof.h
@@ -2927,7 +2928,7 @@ expmed.o : expmed.c $(CONFIG_H) $(SYSTEM
    $(FLAGS_H) insn-config.h $(EXPR_H) $(OPTABS_H) $(RECOG_H) \
    $(TOPLEV_H) $(TM_P_H) langhooks.h $(DF_H) $(TARGET_H)
 explow.o : explow.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) \
-   $(FLAGS_H) hard-reg-set.h insn-config.h $(EXPR_H) $(OPTABS_H) $(RECOG_H) \
+   $(FLAGS_H) $(HARD_REG_SET_H) insn-config.h $(EXPR_H) $(OPTABS_H) $(RECOG_H) \
    $(TOPLEV_H) $(EXCEPT_H) $(FUNCTION_H) $(GGC_H) $(TM_P_H) langhooks.h gt-explow.h \
    $(TARGET_H) output.h
 optabs.o : optabs.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
@@ -2945,7 +2946,7 @@ sdbout.o : sdbout.c $(CONFIG_H) $(SYSTEM
    gt-sdbout.h reload.h
 dwarf2out.o : dwarf2out.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
    $(TREE_H) version.h $(RTL_H) $(DWARF2_H) debug.h $(FLAGS_H) insn-config.h \
-   output.h $(DIAGNOSTIC_H) hard-reg-set.h $(REGS_H) $(EXPR_H) \
+   output.h $(DIAGNOSTIC_H) $(HARD_REG_SET_H) $(REGS_H) $(EXPR_H) \
    libfuncs.h $(TOPLEV_H) dwarf2out.h reload.h $(GGC_H) $(EXCEPT_H) dwarf2asm.h \
    $(TM_P_H) langhooks.h $(HASHTAB_H) gt-dwarf2out.h $(TARGET_H) $(CGRAPH_H) \
    $(MD5_H) $(INPUT_H) $(FUNCTION_H) $(GIMPLE_H) $(TREE_PASS_H) \
@@ -2960,9 +2961,9 @@ xcoffout.o : xcoffout.c $(CONFIG_H) $(SY
    $(GGC_H) $(TARGET_H) debug.h $(GSTAB_H) xcoff.h
 emit-rtl.o : emit-rtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
    $(TREE_H) $(FLAGS_H) $(FUNCTION_H) $(REGS_H) insn-config.h $(RECOG_H) \
-   $(GGC_H) $(EXPR_H) hard-reg-set.h $(BITMAP_H) $(TOPLEV_H) $(BASIC_BLOCK_H) \
-   $(HASHTAB_H) $(TM_P_H) debug.h langhooks.h $(TREE_PASS_H) gt-emit-rtl.h \
-   $(DF_H) $(PARAMS_H) $(TARGET_H)
+   $(GGC_H) $(EXPR_H) $(HARD_REG_SET_H) $(BITMAP_H) $(TOPLEV_H) \
+   $(BASIC_BLOCK_H) $(HASHTAB_H) $(TM_P_H) debug.h langhooks.h $(TREE_PASS_H) \
+   gt-emit-rtl.h $(DF_H) $(PARAMS_H) $(TARGET_H)
 real.o : real.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
    $(TOPLEV_H) $(TM_P_H) $(REAL_H) dfp.h realmpfr.h
 realmpfr.o : realmpfr.c realmpfr.h $(CONFIG_H) $(SYSTEM_H) $(REAL_H)
@@ -2976,12 +2977,12 @@ integrate.o : integrate.c $(CONFIG_H) $(
    $(EXCEPT_H) $(TOPLEV_H) $(PARAMS_H) $(TM_P_H) $(TARGET_H) langhooks.h \
    gt-integrate.h $(GGC_H) $(TREE_PASS_H) $(DF_H)
 jump.o : jump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
-   $(FLAGS_H) hard-reg-set.h $(REGS_H) insn-config.h $(RECOG_H) $(EXPR_H) \
+   $(FLAGS_H) $(HARD_REG_SET_H) $(REGS_H) insn-config.h $(RECOG_H) $(EXPR_H) \
    $(EXCEPT_H) $(FUNCTION_H) $(BASIC_BLOCK_H) $(TREE_PASS_H) \
    $(DIAGNOSTIC_CORE_H) $(TOPLEV_H) $(INSN_ATTR_H) $(TM_P_H) reload.h \
    $(PREDICT_H) $(TIMEVAR_H) $(TARGET_H)
 simplify-rtx.o : simplify-rtx.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
-   $(RTL_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
+   $(RTL_H) $(REGS_H) $(HARD_REG_SET_H) $(FLAGS_H) insn-config.h \
    $(RECOG_H) $(EXPR_H) $(TOPLEV_H) output.h $(FUNCTION_H) $(GGC_H) $(TM_P_H) \
    $(TREE_H) $(TARGET_H)
 cgraph.o : cgraph.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
@@ -3063,21 +3064,21 @@ coverage.o : coverage.c $(GCOV_IO_H) $(C
    $(HASHTAB_H) tree-iterator.h $(CGRAPH_H) $(TREE_PASS_H) gcov-io.c $(TM_P_H) \
    $(DIAGNOSTIC_CORE_H) intl.h gt-coverage.h
 cselib.o : cselib.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
-   $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h $(RECOG_H) \
+   $(REGS_H) $(HARD_REG_SET_H) $(FLAGS_H) insn-config.h $(RECOG_H) \
    $(EMIT_RTL_H) $(TOPLEV_H) output.h $(FUNCTION_H) $(TREE_PASS_H) \
    cselib.h gt-cselib.h $(GGC_H) $(TM_P_H) $(PARAMS_H) alloc-pool.h \
    $(HASHTAB_H) $(TARGET_H) $(BITMAP_H)
 cse.o : cse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(REGS_H) \
-   hard-reg-set.h $(FLAGS_H) insn-config.h $(RECOG_H) $(EXPR_H) $(TOPLEV_H) \
+   $(HARD_REG_SET_H) $(FLAGS_H) insn-config.h $(RECOG_H) $(EXPR_H) $(TOPLEV_H) \
    output.h $(FUNCTION_H) $(BASIC_BLOCK_H) $(GGC_H) $(TM_P_H) $(TIMEVAR_H) \
    $(EXCEPT_H) $(TARGET_H) $(PARAMS_H) rtlhooks-def.h $(TREE_PASS_H) \
    $(DF_H) $(DBGCNT_H)
 dce.o : dce.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
-   $(TREE_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) $(EXCEPT_H) $(DF_H) cselib.h \
-   $(DBGCNT_H) dce.h $(TIMEVAR_H) $(TREE_PASS_H) $(DBGCNT_H) $(TM_P_H) \
-   $(EMIT_RTL_H)
+   $(TREE_H) $(REGS_H) $(HARD_REG_SET_H) $(FLAGS_H) $(EXCEPT_H) $(DF_H) \
+   cselib.h $(DBGCNT_H) dce.h $(TIMEVAR_H) $(TREE_PASS_H) $(DBGCNT_H) \
+   $(TM_P_H) $(EMIT_RTL_H)
 dse.o : dse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
-   $(TREE_H) $(TM_P_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
+   $(TREE_H) $(TM_P_H) $(REGS_H) $(HARD_REG_SET_H) $(FLAGS_H) insn-config.h \
    $(RECOG_H) $(EXPR_H) $(DF_H) cselib.h $(DBGCNT_H) $(TIMEVAR_H) \
    $(TREE_PASS_H) alloc-pool.h $(ALIAS_H) dse.h $(OPTABS_H) $(TARGET_H) \
    $(BITMAP_H)
@@ -3086,32 +3087,33 @@ fwprop.o : fwprop.c $(CONFIG_H) $(SYSTEM
    output.h $(DF_H) alloc-pool.h $(TIMEVAR_H) $(TREE_PASS_H) $(TARGET_H) \
    $(TM_P_H) $(CFGLOOP_H) $(EMIT_RTL_H) domwalk.h
 web.o : web.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
-   hard-reg-set.h $(FLAGS_H) $(BASIC_BLOCK_H) $(FUNCTION_H) output.h $(TOPLEV_H) \
-   insn-config.h $(RECOG_H) $(DF_H) $(OBSTACK_H) $(TIMEVAR_H) $(TREE_PASS_H)
+   $(HARD_REG_SET_H) $(FLAGS_H) $(BASIC_BLOCK_H) $(FUNCTION_H) output.h \
+   $(TOPLEV_H) insn-config.h $(RECOG_H) $(DF_H) $(OBSTACK_H) $(TIMEVAR_H) \
+   $(TREE_PASS_H)
 implicit-zee.o : implicit-zee.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
-   hard-reg-set.h $(FLAGS_H) $(BASIC_BLOCK_H) $(FUNCTION_H) output.h \
+   $(HARD_REG_SET_H) $(FLAGS_H) $(BASIC_BLOCK_H) $(FUNCTION_H) output.h \
    $(DF_H) $(TIMEVAR_H) tree-pass.h $(RECOG_H) $(EXPR_H) \
    $(REGS_H) $(TREE_H) $(TM_P_H) insn-config.h $(INSN_ATTR_H) $(TOPLEV_H) \
    $(TARGET_H) $(OPTABS_H) insn-codes.h rtlhooks-def.h $(PARAMS_H) $(CGRAPH_H)
 gcse.o : gcse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
-   $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h $(GGC_H) \
+   $(REGS_H) $(HARD_REG_SET_H) $(FLAGS_H) insn-config.h $(GGC_H) \
    $(RECOG_H) $(EXPR_H) $(BASIC_BLOCK_H) $(FUNCTION_H) output.h $(TOPLEV_H) \
    $(TM_P_H) $(PARAMS_H) cselib.h $(EXCEPT_H) gt-gcse.h $(TREE_H) $(TIMEVAR_H) \
    intl.h $(OBSTACK_H) $(TREE_PASS_H) $(DF_H) $(DBGCNT_H) $(TARGET_H) \
    $(DF_H)
 store-motion.o : store-motion.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
-   $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h $(GGC_H) \
+   $(REGS_H) $(HARD_REG_SET_H) $(FLAGS_H) insn-config.h $(GGC_H) \
    $(RECOG_H) $(EXPR_H) $(BASIC_BLOCK_H) $(FUNCTION_H) output.h $(TOPLEV_H) \
    $(TM_P_H) $(EXCEPT_H) $(TREE_H) $(TIMEVAR_H) \
    intl.h $(OBSTACK_H) $(TREE_PASS_H) $(DF_H) $(DBGCNT_H)
-resource.o : resource.c $(CONFIG_H) $(RTL_H) hard-reg-set.h $(SYSTEM_H) \
+resource.o : resource.c $(CONFIG_H) $(RTL_H) $(HARD_REG_SET_H) $(SYSTEM_H) \
    coretypes.h $(TM_H) $(REGS_H) $(FLAGS_H) output.h $(RESOURCE_H) $(DF_H) \
    $(FUNCTION_H) $(TOPLEV_H) $(INSN_ATTR_H) $(EXCEPT_H) $(PARAMS_H) $(TM_P_H)
 lcm.o : lcm.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(REGS_H) \
-   hard-reg-set.h $(FLAGS_H) insn-config.h $(INSN_ATTR_H) $(RECOG_H) \
+   $(HARD_REG_SET_H) $(FLAGS_H) insn-config.h $(INSN_ATTR_H) $(RECOG_H) \
    $(BASIC_BLOCK_H) $(TM_P_H) $(FUNCTION_H) output.h sbitmap.h
 mode-switching.o : mode-switching.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
-   $(TM_H) $(RTL_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
+   $(TM_H) $(RTL_H) $(REGS_H) $(HARD_REG_SET_H) $(FLAGS_H) insn-config.h \
    $(INSN_ATTR_H) $(RECOG_H) $(BASIC_BLOCK_H) $(TM_P_H) $(FUNCTION_H) \
    output.h $(TREE_PASS_H) $(TIMEVAR_H) $(DF_H) $(TARGET_H) $(EMIT_RTL_H)
 tree-ssa-dce.o : tree-ssa-dce.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \
@@ -3150,24 +3152,24 @@ tree-vect-generic.o : tree-vect-generic.
     coretypes.h insn-codes.h
 df-core.o : df-core.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
    insn-config.h $(RECOG_H) $(FUNCTION_H) $(REGS_H) alloc-pool.h \
-   hard-reg-set.h $(BASIC_BLOCK_H) $(DF_H) $(BITMAP_H) sbitmap.h $(TIMEVAR_H) \
-   $(TM_P_H) $(FLAGS_H) output.h $(TREE_PASS_H) $(PARAMS_H)
+   $(HARD_REG_SET_H) $(BASIC_BLOCK_H) $(DF_H) $(BITMAP_H) sbitmap.h \
+   $(TIMEVAR_H) $(TM_P_H) $(FLAGS_H) output.h $(TREE_PASS_H) $(PARAMS_H)
 df-problems.o : df-problems.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
    $(RTL_H) insn-config.h $(RECOG_H) $(FUNCTION_H) $(REGS_H) alloc-pool.h \
-   hard-reg-set.h $(BASIC_BLOCK_H) $(DF_H) $(BITMAP_H) sbitmap.h $(TIMEVAR_H) \
-   $(TM_P_H) $(FLAGS_H) output.h $(EXCEPT_H) dce.h vecprim.h
+   $(HARD_REG_SET_H) $(BASIC_BLOCK_H) $(DF_H) $(BITMAP_H) sbitmap.h \
+   $(TIMEVAR_H) $(TM_P_H) $(FLAGS_H) output.h $(EXCEPT_H) dce.h vecprim.h
 df-scan.o : df-scan.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
    insn-config.h $(RECOG_H) $(FUNCTION_H) $(REGS_H) alloc-pool.h \
-   hard-reg-set.h $(BASIC_BLOCK_H) $(DF_H) $(BITMAP_H) sbitmap.h $(TIMEVAR_H) \
-   $(TM_P_H) $(FLAGS_H) $(TARGET_H) $(TARGET_DEF_H) $(TREE_H) output.h \
-   $(TREE_PASS_H) $(EMIT_RTL_H)
+   $(HARD_REG_SET_H) $(BASIC_BLOCK_H) $(DF_H) $(BITMAP_H) sbitmap.h \
+   $(TIMEVAR_H) $(TM_P_H) $(FLAGS_H) $(TARGET_H) $(TARGET_DEF_H) $(TREE_H) \
+   output.h $(TREE_PASS_H) $(EMIT_RTL_H)
 df-byte-scan.o : df-byte-scan.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
    $(TM_P_H) $(DF_H) output.h $(DBGCNT_H)
 regstat.o : regstat.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
-   $(TM_P_H) $(FLAGS_H) $(REGS_H) output.h $(EXCEPT_H) hard-reg-set.h \
+   $(TM_P_H) $(FLAGS_H) $(REGS_H) output.h $(EXCEPT_H) $(HARD_REG_SET_H) \
    $(BASIC_BLOCK_H) $(TIMEVAR_H) $(DF_H)
 var-tracking.o : var-tracking.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
-   $(RTL_H) $(TREE_H) hard-reg-set.h insn-config.h reload.h $(FLAGS_H) \
+   $(RTL_H) $(TREE_H) $(HARD_REG_SET_H) insn-config.h reload.h $(FLAGS_H) \
    $(BASIC_BLOCK_H) output.h sbitmap.h alloc-pool.h $(FIBHEAP_H) $(HASHTAB_H) \
    $(REGS_H) $(EXPR_H) $(TIMEVAR_H) $(TREE_PASS_H) $(TREE_FLOW_H) \
    cselib.h $(TARGET_H) $(TOPLEV_H) $(PARAMS_H) $(DIAGNOSTIC_H) pointer-set.h \
@@ -3183,22 +3185,23 @@ tree-profile.o : tree-profile.c $(CONFIG
    $(BASIC_BLOCK_H) $(TOPLEV_H) $(COVERAGE_H) $(TREE_H) value-prof.h $(TREE_DUMP_H) \
    $(TREE_PASS_H) $(TREE_FLOW_H) $(TIMEVAR_H) gt-tree-profile.h $(CGRAPH_H)
 value-prof.o : value-prof.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
-   $(BASIC_BLOCK_H) hard-reg-set.h value-prof.h $(EXPR_H) output.h $(FLAGS_H) \
-   $(RECOG_H) insn-config.h $(OPTABS_H) $(REGS_H) $(GGC_H) $(DIAGNOSTIC_H) \
-   $(TREE_H) $(COVERAGE_H) $(RTL_H) $(GCOV_IO_H) $(TREE_FLOW_H) \
-   tree-flow-inline.h $(TIMEVAR_H) $(TREE_PASS_H) $(TOPLEV_H) pointer-set.h \
-   tree-pretty-print.h gimple-pretty-print.h
+   $(BASIC_BLOCK_H) $(HARD_REG_SET_H) value-prof.h $(EXPR_H) output.h \
+   $(FLAGS_H) $(RECOG_H) insn-config.h $(OPTABS_H) $(REGS_H) $(GGC_H) \
+   $(DIAGNOSTIC_H) $(TREE_H) $(COVERAGE_H) $(RTL_H) $(GCOV_IO_H) \
+   $(TREE_FLOW_H) tree-flow-inline.h $(TIMEVAR_H) $(TREE_PASS_H) $(TOPLEV_H) \
+   pointer-set.h tree-pretty-print.h gimple-pretty-print.h
 loop-doloop.o : loop-doloop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
-   $(RTL_H) $(FLAGS_H) $(EXPR_H) hard-reg-set.h $(BASIC_BLOCK_H) $(TM_P_H) \
+   $(RTL_H) $(FLAGS_H) $(EXPR_H) $(HARD_REG_SET_H) $(BASIC_BLOCK_H) $(TM_P_H) \
    $(TOPLEV_H) $(CFGLOOP_H) output.h $(PARAMS_H) $(TARGET_H)
 alloc-pool.o : alloc-pool.c $(CONFIG_H) $(SYSTEM_H) alloc-pool.h $(HASHTAB_H)
 auto-inc-dec.o : auto-inc-dec.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
-   $(TREE_H) $(RTL_H) $(TM_P_H) hard-reg-set.h $(BASIC_BLOCK_H) insn-config.h \
-   $(REGS_H) $(FLAGS_H) output.h $(FUNCTION_H) $(EXCEPT_H) $(TOPLEV_H) $(RECOG_H) \
-   $(EXPR_H) $(TIMEVAR_H) $(TREE_PASS_H) $(DF_H) $(DBGCNT_H) $(TARGET_H)
+   $(TREE_H) $(RTL_H) $(TM_P_H) $(HARD_REG_SET_H) $(BASIC_BLOCK_H) \
+   insn-config.h $(REGS_H) $(FLAGS_H) output.h $(FUNCTION_H) $(EXCEPT_H) \
+   $(TOPLEV_H) $(RECOG_H) $(EXPR_H) $(TIMEVAR_H) $(TREE_PASS_H) $(DF_H) \
+   $(DBGCNT_H) $(TARGET_H)
 cfg.o : cfg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(FLAGS_H) \
-   $(REGS_H) hard-reg-set.h output.h $(TOPLEV_H) $(FUNCTION_H) $(EXCEPT_H) $(GGC_H) \
-   $(TM_P_H) $(TIMEVAR_H) $(OBSTACK_H) $(TREE_H) alloc-pool.h \
+   $(REGS_H) $(HARD_REG_SET_H) output.h $(TOPLEV_H) $(FUNCTION_H) $(EXCEPT_H) \
+   $(GGC_H) $(TM_P_H) $(TIMEVAR_H) $(OBSTACK_H) $(TREE_H) alloc-pool.h \
    $(HASHTAB_H) $(DF_H) $(CFGLOOP_H) $(TREE_FLOW_H) $(TREE_PASS_H)
 cfghooks.o: cfghooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
    $(TREE_H) $(BASIC_BLOCK_H) $(TREE_FLOW_H) $(TIMEVAR_H) $(TOPLEV_H) $(CFGLOOP_H)
@@ -3209,66 +3212,67 @@ cfgexpand.o : cfgexpand.c $(TREE_FLOW_H)
    value-prof.h $(TREE_INLINE_H) $(TARGET_H) $(SSAEXPAND_H) \
    tree-pretty-print.h gimple-pretty-print.h $(BITMAP_H) sbitmap.h
 cfgrtl.o : cfgrtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
-   $(FLAGS_H) insn-config.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h \
+   $(FLAGS_H) insn-config.h $(BASIC_BLOCK_H) $(REGS_H) $(HARD_REG_SET_H) \
    output.h $(TOPLEV_H) $(FUNCTION_H) $(EXCEPT_H) $(TM_P_H) $(INSN_ATTR_H) \
    insn-config.h $(EXPR_H) \
    $(CFGLAYOUT_H) $(CFGLOOP_H) $(OBSTACK_H) $(TARGET_H) $(TREE_H) \
    $(TREE_PASS_H) $(DF_H) $(GGC_H)
 cfganal.o : cfganal.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
-   $(BASIC_BLOCK_H) hard-reg-set.h insn-config.h $(RECOG_H) $(TM_P_H) \
+   $(BASIC_BLOCK_H) $(HARD_REG_SET_H) insn-config.h $(RECOG_H) $(TM_P_H) \
    $(TIMEVAR_H) $(OBSTACK_H) $(TOPLEV_H) vecprim.h sbitmap.h $(BITMAP_H)
 cfgbuild.o : cfgbuild.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
-   $(FLAGS_H) $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h $(TOPLEV_H) \
-   $(FUNCTION_H) $(EXCEPT_H) $(TIMEVAR_H) $(TREE_H) $(EXPR_H) sbitmap.h
+   $(FLAGS_H) $(BASIC_BLOCK_H) $(REGS_H) $(HARD_REG_SET_H) output.h \
+   $(TOPLEV_H) $(FUNCTION_H) $(EXCEPT_H) $(TIMEVAR_H) $(TREE_H) $(EXPR_H) \
+   sbitmap.h
 cfgcleanup.o : cfgcleanup.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
-   $(RTL_H) $(TIMEVAR_H) hard-reg-set.h output.h $(FLAGS_H) $(RECOG_H) \
+   $(RTL_H) $(TIMEVAR_H) $(HARD_REG_SET_H) output.h $(FLAGS_H) $(RECOG_H) \
    $(TOPLEV_H) insn-config.h cselib.h $(TARGET_H) $(TM_P_H) $(PARAMS_H) \
    $(REGS_H) $(EMIT_RTL_H) $(CFGLAYOUT_H) $(TREE_PASS_H) $(CFGLOOP_H) $(EXPR_H) \
    $(DF_H) $(DBGCNT_H) dce.h
 cfgloop.o : cfgloop.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) coretypes.h $(TM_H) \
-   $(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) $(FLAGS_H) $(FUNCTION_H) \
+   $(BASIC_BLOCK_H) $(HARD_REG_SET_H) $(CFGLOOP_H) $(FLAGS_H) $(FUNCTION_H) \
    $(OBSTACK_H) $(TOPLEV_H) $(TREE_FLOW_H) $(TREE_H) pointer-set.h output.h \
    $(GGC_H)
 cfgloopanal.o : cfgloopanal.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) \
-   $(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) $(EXPR_H) coretypes.h $(TM_H) \
-   $(OBSTACK_H) output.h graphds.h $(PARAMS_H)
+   $(BASIC_BLOCK_H) $(HARD_REG_SET_H) $(CFGLOOP_H) $(EXPR_H) coretypes.h \
+   $(TM_H) $(OBSTACK_H) output.h graphds.h $(PARAMS_H)
 graphds.o : graphds.c graphds.h $(CONFIG_H) $(SYSTEM_H) $(BITMAP_H) $(OBSTACK_H) \
    coretypes.h $(VEC_H) vecprim.h
 loop-iv.o : loop-iv.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(BASIC_BLOCK_H) \
-   hard-reg-set.h $(CFGLOOP_H) $(EXPR_H) coretypes.h $(TM_H) $(OBSTACK_H) \
+   $(HARD_REG_SET_H) $(CFGLOOP_H) $(EXPR_H) coretypes.h $(TM_H) $(OBSTACK_H) \
    output.h intl.h $(TOPLEV_H) $(DF_H) $(HASHTAB_H)
 loop-invariant.o : loop-invariant.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) \
-   $(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) $(EXPR_H) $(RECOG_H) \
+   $(BASIC_BLOCK_H) $(HARD_REG_SET_H) $(CFGLOOP_H) $(EXPR_H) $(RECOG_H) \
    coretypes.h $(TM_H) $(TM_P_H) $(FUNCTION_H) $(FLAGS_H) $(DF_H) \
    $(OBSTACK_H) output.h $(HASHTAB_H) $(EXCEPT_H) $(PARAMS_H) $(REGS_H) ira.h
 cfgloopmanip.o : cfgloopmanip.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) \
-   $(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) $(CFGLAYOUT_H) output.h \
+   $(BASIC_BLOCK_H) $(HARD_REG_SET_H) $(CFGLOOP_H) $(CFGLAYOUT_H) output.h \
    coretypes.h $(TM_H) cfghooks.h $(OBSTACK_H) $(TREE_FLOW_H)
 loop-init.o : loop-init.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(GGC_H) \
-   $(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) $(CFGLAYOUT_H) \
+   $(BASIC_BLOCK_H) $(HARD_REG_SET_H) $(CFGLOOP_H) $(CFGLAYOUT_H) \
    coretypes.h $(TM_H) $(OBSTACK_H) $(TREE_PASS_H) $(TIMEVAR_H) $(FLAGS_H) \
    $(DF_H)
 loop-unswitch.o : loop-unswitch.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TM_H) \
-   $(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) $(CFGLAYOUT_H) $(PARAMS_H) \
+   $(BASIC_BLOCK_H) $(HARD_REG_SET_H) $(CFGLOOP_H) $(CFGLAYOUT_H) $(PARAMS_H) \
    output.h $(EXPR_H) coretypes.h $(TM_H) $(OBSTACK_H)
 loop-unroll.o: loop-unroll.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TM_H) \
-   $(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) $(CFGLAYOUT_H) $(PARAMS_H) \
+   $(BASIC_BLOCK_H) $(HARD_REG_SET_H) $(CFGLOOP_H) $(CFGLAYOUT_H) $(PARAMS_H) \
    output.h $(EXPR_H) coretypes.h $(TM_H) $(HASHTAB_H) $(RECOG_H) \
    $(OBSTACK_H)
 dominance.o : dominance.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
-   hard-reg-set.h $(BASIC_BLOCK_H) et-forest.h $(OBSTACK_H) $(TOPLEV_H) \
+   $(HARD_REG_SET_H) $(BASIC_BLOCK_H) et-forest.h $(OBSTACK_H) $(TOPLEV_H) \
    $(TIMEVAR_H) graphds.h vecprim.h pointer-set.h $(BITMAP_H)
 et-forest.o : et-forest.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
    et-forest.h alloc-pool.h $(BASIC_BLOCK_H)
 combine.o : combine.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
    $(FLAGS_H) $(FUNCTION_H) insn-config.h $(INSN_ATTR_H) $(REGS_H) $(EXPR_H) \
-   rtlhooks-def.h $(BASIC_BLOCK_H) $(RECOG_H) hard-reg-set.h \
+   rtlhooks-def.h $(BASIC_BLOCK_H) $(RECOG_H) $(HARD_REG_SET_H) \
    $(TOPLEV_H) $(TM_P_H) $(TREE_H) $(TARGET_H) output.h $(PARAMS_H) $(OPTABS_H) \
    insn-codes.h $(TIMEVAR_H) $(TREE_PASS_H) $(DF_H) vecprim.h $(CGRAPH_H)
 reginfo.o : reginfo.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
-   hard-reg-set.h $(FLAGS_H) $(BASIC_BLOCK_H) addresses.h $(REGS_H) insn-config.h \
-   $(RECOG_H) reload.h $(TOPLEV_H) $(FUNCTION_H) output.h $(GGC_H) \
-   $(TM_P_H) $(EXPR_H) $(TIMEVAR_H) gt-reginfo.h $(HASHTAB_H) \
+   $(HARD_REG_SET_H) $(FLAGS_H) $(BASIC_BLOCK_H) addresses.h $(REGS_H) \
+   insn-config.h $(RECOG_H) reload.h $(TOPLEV_H) $(FUNCTION_H) output.h \
+   $(GGC_H) $(TM_P_H) $(EXPR_H) $(TIMEVAR_H) gt-reginfo.h $(HASHTAB_H) \
    $(TARGET_H) $(TREE_PASS_H) $(DF_H) ira.h
 bitmap.o : bitmap.c $(CONFIG_H) $(SYSTEM_H)  coretypes.h $(TM_H) $(RTL_H) \
    $(FLAGS_H) $(GGC_H) gt-bitmap.h $(BITMAP_H) $(OBSTACK_H) $(HASHTAB_H)
@@ -3276,10 +3280,10 @@ vec.o : vec.c $(CONFIG_H) $(SYSTEM_H) co
    $(TOPLEV_H) $(HASHTAB_H)
 reload.o : reload.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
    $(FLAGS_H) output.h $(EXPR_H) $(OPTABS_H) reload.h $(RECOG_H) \
-   hard-reg-set.h insn-config.h $(REGS_H) $(FUNCTION_H) real.h $(TOPLEV_H) \
+   $(HARD_REG_SET_H) insn-config.h $(REGS_H) $(FUNCTION_H) real.h $(TOPLEV_H) \
    addresses.h $(TM_P_H) $(PARAMS_H) $(TARGET_H) $(DF_H) ira.h
 reload1.o : reload1.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
-   $(EXPR_H) $(OPTABS_H) reload.h $(REGS_H) hard-reg-set.h insn-config.h \
+   $(EXPR_H) $(OPTABS_H) reload.h $(REGS_H) $(HARD_REG_SET_H) insn-config.h \
    $(BASIC_BLOCK_H) $(RECOG_H) output.h $(FUNCTION_H) $(TOPLEV_H) $(TM_P_H) \
    addresses.h $(EXCEPT_H) $(TREE_H) $(FLAGS_H) $(MACHMODE_H) \
    $(OBSTACK_H) $(DF_H) $(TARGET_H) $(EMIT_RTL_H) ira.h
@@ -3287,32 +3291,32 @@ rtlhooks.o :  rtlhooks.c $(CONFIG_H) $(S
    rtlhooks-def.h $(EXPR_H) $(RECOG_H)
 postreload.o : postreload.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
    $(RTL_H) $(FLAGS_H) $(EXPR_H) $(OPTABS_H) reload.h $(REGS_H) \
-   hard-reg-set.h insn-config.h $(BASIC_BLOCK_H) $(RECOG_H) output.h \
+   $(HARD_REG_SET_H) insn-config.h $(BASIC_BLOCK_H) $(RECOG_H) output.h \
    $(FUNCTION_H) $(TOPLEV_H) cselib.h $(TM_P_H) $(EXCEPT_H) $(TREE_H) $(MACHMODE_H) \
    $(OBSTACK_H) $(TIMEVAR_H) $(TREE_PASS_H) $(DF_H) $(DBGCNT_H)
 postreload-gcse.o : postreload-gcse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
-   $(TM_H) $(RTL_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
+   $(TM_H) $(RTL_H) $(REGS_H) $(HARD_REG_SET_H) $(FLAGS_H) insn-config.h \
    $(RECOG_H) $(EXPR_H) $(BASIC_BLOCK_H) $(FUNCTION_H) output.h $(TOPLEV_H) \
    $(TM_P_H) $(EXCEPT_H) $(TREE_H) $(TARGET_H) $(HASHTAB_H) intl.h $(OBSTACK_H) \
    $(PARAMS_H) $(TIMEVAR_H) $(TREE_PASS_H) $(DBGCNT_H)
 caller-save.o : caller-save.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
-   $(FLAGS_H) $(REGS_H) hard-reg-set.h insn-config.h $(BASIC_BLOCK_H) $(FUNCTION_H) \
-   addresses.h $(RECOG_H) reload.h $(EXPR_H) $(TOPLEV_H) $(TM_P_H) $(DF_H) \
-   output.h gt-caller-save.h $(GGC_H)
+   $(FLAGS_H) $(REGS_H) $(HARD_REG_SET_H) insn-config.h $(BASIC_BLOCK_H) \
+   $(FUNCTION_H) addresses.h $(RECOG_H) reload.h $(EXPR_H) $(TOPLEV_H) \
+   $(TM_P_H) $(DF_H) output.h gt-caller-save.h $(GGC_H)
 bt-load.o : bt-load.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(EXCEPT_H) \
-   $(RTL_H) hard-reg-set.h $(REGS_H) $(TM_P_H) $(FIBHEAP_H) output.h $(EXPR_H) \
-   $(TARGET_H) $(FLAGS_H) $(INSN_ATTR_H) $(FUNCTION_H) $(TREE_PASS_H) \
-   $(TOPLEV_H) $(DF_H) vecprim.h $(RECOG_H)
+   $(RTL_H) $(HARD_REG_SET_H) $(REGS_H) $(TM_P_H) $(FIBHEAP_H) output.h \
+   $(EXPR_H) $(TARGET_H) $(FLAGS_H) $(INSN_ATTR_H) $(FUNCTION_H) \
+   $(TREE_PASS_H) $(TOPLEV_H) $(DF_H) vecprim.h $(RECOG_H)
 reorg.o : reorg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
-   conditions.h hard-reg-set.h $(BASIC_BLOCK_H) $(REGS_H) insn-config.h \
+   conditions.h $(HARD_REG_SET_H) $(BASIC_BLOCK_H) $(REGS_H) insn-config.h \
    $(INSN_ATTR_H) $(EXCEPT_H) $(RECOG_H) $(FUNCTION_H) $(FLAGS_H) output.h \
    $(EXPR_H) $(TOPLEV_H) $(PARAMS_H) $(TM_P_H) $(OBSTACK_H) $(RESOURCE_H) \
    $(TIMEVAR_H) $(TARGET_H) $(TREE_PASS_H)
 alias.o : alias.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
-   $(FLAGS_H) hard-reg-set.h $(BASIC_BLOCK_H) $(REGS_H) $(TOPLEV_H) output.h \
-   $(ALIAS_H) $(EMIT_RTL_H) $(GGC_H) $(FUNCTION_H) cselib.h $(TREE_H) $(TM_P_H) \
-   langhooks.h $(TARGET_H) gt-alias.h $(TIMEVAR_H) $(CGRAPH_H) \
-   $(SPLAY_TREE_H) $(IPA_TYPE_ESCAPE_H) $(DF_H) $(TREE_PASS_H) \
+   $(FLAGS_H) $(HARD_REG_SET_H) $(BASIC_BLOCK_H) $(REGS_H) $(TOPLEV_H) \
+   output.h $(ALIAS_H) $(EMIT_RTL_H) $(GGC_H) $(FUNCTION_H) cselib.h \
+   $(TREE_H) $(TM_P_H) langhooks.h $(TARGET_H) gt-alias.h $(TIMEVAR_H) \
+   $(CGRAPH_H) $(SPLAY_TREE_H) $(IPA_TYPE_ESCAPE_H) $(DF_H) $(TREE_PASS_H) \
    tree-ssa-alias.h pointer-set.h $(TREE_FLOW_H)
 stack-ptr-mod.o : stack-ptr-mod.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
    $(TM_H) $(TREE_H) $(RTL_H) $(REGS_H) $(EXPR_H) $(TREE_PASS_H) \
@@ -3321,94 +3325,95 @@ init-regs.o : init-regs.c $(CONFIG_H) $(
    $(TM_H) $(TREE_H) $(RTL_H) $(REGS_H) $(EXPR_H) $(TREE_PASS_H) \
    $(BASIC_BLOCK_H) $(FLAGS_H) $(DF_H)
 ira-build.o: ira-build.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
-   $(TARGET_H) $(RTL_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) \
+   $(TARGET_H) $(RTL_H) $(REGS_H) $(HARD_REG_SET_H) $(FLAGS_H) \
    insn-config.h $(RECOG_H) $(BASIC_BLOCK_H) $(TOPLEV_H) $(TM_P_H) \
    $(PARAMS_H) $(DF_H) sparseset.h $(IRA_INT_H) output.h reload.h
 ira-costs.o: ira-costs.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
-   hard-reg-set.h $(RTL_H) $(EXPR_H) $(TM_P_H) $(FLAGS_H) $(BASIC_BLOCK_H) \
+   $(HARD_REG_SET_H) $(RTL_H) $(EXPR_H) $(TM_P_H) $(FLAGS_H) $(BASIC_BLOCK_H) \
    $(REGS_H) addresses.h insn-config.h $(RECOG_H) $(TOPLEV_H) $(TARGET_H) \
    $(PARAMS_H) $(IRA_INT_H) reload.h
 ira-conflicts.o: ira-conflicts.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
-   $(TARGET_H) $(RTL_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) \
+   $(TARGET_H) $(RTL_H) $(REGS_H) $(HARD_REG_SET_H) $(FLAGS_H) \
    insn-config.h $(RECOG_H) $(BASIC_BLOCK_H) $(TOPLEV_H) $(TM_P_H) $(PARAMS_H) \
    $(DF_H) sparseset.h addresses.h $(IRA_INT_H)
 ira-color.o: ira-color.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
-   $(TARGET_H) $(RTL_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) \
+   $(TARGET_H) $(RTL_H) $(REGS_H) $(HARD_REG_SET_H) $(FLAGS_H) \
    $(EXPR_H) $(BASIC_BLOCK_H) $(TOPLEV_H) $(TM_P_H) reload.h $(PARAMS_H) \
    $(DF_H) $(SPLAY_TREE_H) $(IRA_INT_H)
 ira-emit.o: ira-emit.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
-   $(REGS_H) $(RTL_H) $(TM_P_H) $(TARGET_H) $(FLAGS_H) hard-reg-set.h \
+   $(REGS_H) $(RTL_H) $(TM_P_H) $(TARGET_H) $(FLAGS_H) $(HARD_REG_SET_H) \
    $(BASIC_BLOCK_H) $(EXPR_H) $(RECOG_H) $(PARAMS_H) $(TIMEVAR_H) \
    $(TREE_PASS_H) output.h reload.h $(DF_H) $(IRA_INT_H)
 ira-lives.o: ira-lives.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
-   $(TARGET_H) $(RTL_H) $(REGS_H) $(EXCEPT_H) hard-reg-set.h $(FLAGS_H) \
+   $(TARGET_H) $(RTL_H) $(REGS_H) $(EXCEPT_H) $(HARD_REG_SET_H) $(FLAGS_H) \
    insn-config.h $(RECOG_H) $(BASIC_BLOCK_H) $(TOPLEV_H) $(TM_P_H) $(PARAMS_H) \
    $(DF_H) sparseset.h $(IRA_INT_H)
 ira.o: ira.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
    $(TM_H) $(REGS_H) $(RTL_H) $(TM_P_H) $(TARGET_H) $(FLAGS_H) $(OBSTACK_H) \
-   $(BITMAP_H) hard-reg-set.h $(BASIC_BLOCK_H) \
+   $(BITMAP_H) $(HARD_REG_SET_H) $(BASIC_BLOCK_H) \
    $(EXPR_H) $(RECOG_H) $(PARAMS_H) $(TIMEVAR_H) $(TREE_PASS_H) output.h \
    $(EXCEPT_H) reload.h $(TOPLEV_H) $(INTEGRATE_H) $(DF_H) $(GGC_H) $(IRA_INT_H)
 regmove.o : regmove.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
    insn-config.h $(TIMEVAR_H) $(TREE_PASS_H) $(DF_H)\
-   $(RECOG_H) output.h $(REGS_H) hard-reg-set.h $(FLAGS_H) $(FUNCTION_H) \
+   $(RECOG_H) output.h $(REGS_H) $(HARD_REG_SET_H) $(FLAGS_H) $(FUNCTION_H) \
    $(EXPR_H) $(BASIC_BLOCK_H) $(TOPLEV_H) $(TM_P_H) $(EXCEPT_H) ira.h reload.h
 combine-stack-adj.o : combine-stack-adj.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
    $(TM_H) $(RTL_H) insn-config.h $(TIMEVAR_H) $(TREE_PASS_H) \
-   $(RECOG_H) output.h $(REGS_H) hard-reg-set.h $(FLAGS_H) $(FUNCTION_H) \
+   $(RECOG_H) output.h $(REGS_H) $(HARD_REG_SET_H) $(FLAGS_H) $(FUNCTION_H) \
    $(EXPR_H) $(BASIC_BLOCK_H) $(TOPLEV_H) $(TM_P_H) $(DF_H) $(EXCEPT_H) reload.h
 ddg.o : ddg.c $(DDG_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TARGET_H) \
    $(TOPLEV_H) $(RTL_H) $(TM_P_H) $(REGS_H) $(FUNCTION_H) \
    $(FLAGS_H) insn-config.h $(INSN_ATTR_H) $(EXCEPT_H) $(RECOG_H) \
    $(SCHED_INT_H) $(CFGLAYOUT_H) $(CFGLOOP_H) $(EXPR_H) $(BITMAP_H) \
-   hard-reg-set.h sbitmap.h $(TM_H)
+   $(HARD_REG_SET_H) sbitmap.h $(TM_H)
 modulo-sched.o : modulo-sched.c $(DDG_H) $(CONFIG_H) $(CONFIG_H) $(SYSTEM_H) \
    coretypes.h $(TARGET_H) $(TOPLEV_H) $(RTL_H) $(TM_P_H) $(REGS_H) $(FUNCTION_H) \
    $(FLAGS_H) insn-config.h $(INSN_ATTR_H) $(EXCEPT_H) $(RECOG_H) \
    $(SCHED_INT_H) $(CFGLAYOUT_H) $(CFGLOOP_H) $(EXPR_H) $(PARAMS_H) \
-   cfghooks.h $(GCOV_IO_H) hard-reg-set.h $(TM_H) $(TIMEVAR_H) $(TREE_PASS_H) \
-   $(DF_H) $(DBGCNT_H)
+   cfghooks.h $(GCOV_IO_H) $(HARD_REG_SET_H) $(TM_H) $(TIMEVAR_H) \
+   $(TREE_PASS_H) $(DF_H) $(DBGCNT_H)
 haifa-sched.o : haifa-sched.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
-   $(SCHED_INT_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h $(FUNCTION_H) \
-   $(INSN_ATTR_H) $(TOPLEV_H) $(RECOG_H) $(EXCEPT_H) $(TM_P_H) $(TARGET_H) output.h \
-   $(PARAMS_H) $(DBGCNT_H) $(CFGLOOP_H) ira.h $(EMIT_RTL_H)
+   $(SCHED_INT_H) $(REGS_H) $(HARD_REG_SET_H) $(FLAGS_H) insn-config.h \
+   $(FUNCTION_H) $(INSN_ATTR_H) $(TOPLEV_H) $(RECOG_H) $(EXCEPT_H) $(TM_P_H) \
+   $(TARGET_H) output.h $(PARAMS_H) $(DBGCNT_H) $(CFGLOOP_H) ira.h \
+   $(EMIT_RTL_H)
 sched-deps.o : sched-deps.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
-   $(RTL_H) $(SCHED_INT_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
-   $(FUNCTION_H) $(INSN_ATTR_H) $(TOPLEV_H) $(RECOG_H) $(EXCEPT_H) cselib.h \
-   ira.h $(PARAMS_H) $(TM_P_H) ira.h $(TARGET_H)
+   $(RTL_H) $(SCHED_INT_H) $(REGS_H) $(HARD_REG_SET_H) $(FLAGS_H) \
+   insn-config.h $(FUNCTION_H) $(INSN_ATTR_H) $(TOPLEV_H) $(RECOG_H) \
+   $(EXCEPT_H) cselib.h ira.h $(PARAMS_H) $(TM_P_H) ira.h $(TARGET_H)
 sched-rgn.o : sched-rgn.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
-   $(RTL_H) $(SCHED_INT_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
-   $(FUNCTION_H) $(INSN_ATTR_H) $(TOPLEV_H) $(RECOG_H) $(EXCEPT_H) $(PARAMS_H) \
-   $(TM_P_H) sel-sched.h $(TARGET_H) $(CFGLAYOUT_H) $(TIMEVAR_H) $(TREE_PASS_H)  \
-   $(DBGCNT_H)
+   $(RTL_H) $(SCHED_INT_H) $(REGS_H) $(HARD_REG_SET_H) $(FLAGS_H) \
+   insn-config.h $(FUNCTION_H) $(INSN_ATTR_H) $(TOPLEV_H) $(RECOG_H) \
+   $(EXCEPT_H) $(PARAMS_H) $(TM_P_H) sel-sched.h $(TARGET_H) $(CFGLAYOUT_H) \
+   $(TIMEVAR_H) $(TREE_PASS_H) $(DBGCNT_H)
 sched-ebb.o : sched-ebb.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
-   $(RTL_H) $(SCHED_INT_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
-   $(FUNCTION_H) $(INSN_ATTR_H) $(TOPLEV_H) $(RECOG_H) $(EXCEPT_H) $(TM_P_H) \
-   $(PARAMS_H) $(CFGLAYOUT_H) $(TARGET_H) output.h
+   $(RTL_H) $(SCHED_INT_H) $(REGS_H) $(HARD_REG_SET_H) $(FLAGS_H) \
+   insn-config.h $(FUNCTION_H) $(INSN_ATTR_H) $(TOPLEV_H) $(RECOG_H) \
+   $(EXCEPT_H) $(TM_P_H) $(PARAMS_H) $(CFGLAYOUT_H) $(TARGET_H) output.h
 sched-vis.o : sched-vis.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
-   $(RTL_H) $(SCHED_INT_H) hard-reg-set.h $(BASIC_BLOCK_H) $(OBSTACK_H) \
+   $(RTL_H) $(SCHED_INT_H) $(HARD_REG_SET_H) $(BASIC_BLOCK_H) $(OBSTACK_H) \
    $(TREE_PASS_H) $(INSN_ATTR_H)
 sel-sched.o : sel-sched.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
-   $(RTL_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
+   $(RTL_H) $(REGS_H) $(HARD_REG_SET_H) $(FLAGS_H) insn-config.h \
    $(FUNCTION_H) $(INSN_ATTR_H) $(TOPLEV_H) $(RECOG_H) $(EXCEPT_H) $(PARAMS_H) \
    $(TM_P_H) output.h $(TARGET_H) $(TIMEVAR_H) $(TREE_PASS_H)  \
    $(SCHED_INT_H) $(GGC_H) $(TREE_H) langhooks.h rtlhooks-def.h \
    $(SEL_SCHED_IR_H) $(SEL_SCHED_DUMP_H) sel-sched.h $(DBGCNT_H) $(EMIT_RTL_H)
 sel-sched-dump.o : sel-sched-dump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
-   $(RTL_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
+   $(RTL_H) $(REGS_H) $(HARD_REG_SET_H) $(FLAGS_H) insn-config.h \
    $(FUNCTION_H) $(INSN_ATTR_H) $(TOPLEV_H) $(RECOG_H) $(EXCEPT_H) $(PARAMS_H) \
    $(TM_P_H) $(TARGET_H) $(CFGLAYOUT_H) $(TIMEVAR_H) $(TREE_PASS_H) \
    $(SEL_SCHED_DUMP_H) $(GGC_H) $(TREE_H) $(LANGHOOKS_DEF_H) $(SEL_SCHED_IR_H) \
    output.h $(BASIC_BLOCK_H) cselib.h
 sel-sched-ir.o : sel-sched-ir.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
-   $(RTL_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
+   $(RTL_H) $(REGS_H) $(HARD_REG_SET_H) $(FLAGS_H) insn-config.h \
    $(FUNCTION_H) $(INSN_ATTR_H) $(TOPLEV_H) $(RECOG_H) $(EXCEPT_H) $(PARAMS_H) \
    $(TM_P_H) $(TARGET_H) $(TIMEVAR_H) $(TREE_PASS_H) $(SCHED_INT_H) $(GGC_H) \
    $(TREE_H) langhooks.h rtlhooks-def.h $(SEL_SCHED_IR_H) $(SEL_SCHED_DUMP_H) \
    $(EMIT_RTL_H)
 final.o : final.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
    $(TREE_H) $(FLAGS_H) intl.h $(REGS_H) $(RECOG_H) conditions.h \
-   insn-config.h $(INSN_ATTR_H) $(FUNCTION_H) output.h hard-reg-set.h \
+   insn-config.h $(INSN_ATTR_H) $(FUNCTION_H) output.h $(HARD_REG_SET_H) \
    $(EXCEPT_H) debug.h xcoffout.h $(TOPLEV_H) reload.h dwarf2out.h \
    $(TREE_PASS_H) $(BASIC_BLOCK_H) $(TM_P_H) $(TARGET_H) $(EXPR_H) \
    $(CFGLAYOUT_H) dbxout.h $(TIMEVAR_H) $(CGRAPH_H) $(COVERAGE_H) \
@@ -3416,17 +3421,17 @@ final.o : final.c $(CONFIG_H) $(SYSTEM_H
 recog.o : recog.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
    $(FUNCTION_H) $(BASIC_BLOCK_H) $(REGS_H) $(RECOG_H) $(EXPR_H) \
    $(FLAGS_H) insn-config.h $(INSN_ATTR_H) $(TOPLEV_H) output.h reload.h \
-   addresses.h $(TM_P_H) $(TIMEVAR_H) $(TREE_PASS_H) hard-reg-set.h \
+   addresses.h $(TM_P_H) $(TIMEVAR_H) $(TREE_PASS_H) $(HARD_REG_SET_H) \
    $(DF_H) $(DBGCNT_H) $(TARGET_H)
 reg-stack.o : reg-stack.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
-   $(RTL_H) $(TREE_H) $(RECOG_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) \
+   $(RTL_H) $(TREE_H) $(RECOG_H) $(REGS_H) $(HARD_REG_SET_H) $(FLAGS_H) \
    insn-config.h $(TOPLEV_H) reload.h $(FUNCTION_H) $(TM_P_H) $(GGC_H) \
    $(BASIC_BLOCK_H) $(CFGLAYOUT_H) output.h $(TIMEVAR_H) \
    $(TREE_PASS_H) $(TARGET_H) vecprim.h $(DF_H) $(EMIT_RTL_H)
 sreal.o: sreal.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) sreal.h
 predict.o: predict.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
    $(TREE_H) $(FLAGS_H) insn-config.h $(BASIC_BLOCK_H) $(REGS_H) \
-   hard-reg-set.h output.h $(TOPLEV_H) $(RECOG_H) $(FUNCTION_H) $(EXCEPT_H) \
+   $(HARD_REG_SET_H) output.h $(TOPLEV_H) $(RECOG_H) $(FUNCTION_H) $(EXCEPT_H) \
    $(TM_P_H) $(PREDICT_H) sreal.h $(PARAMS_H) $(TARGET_H) $(CFGLOOP_H) \
    $(COVERAGE_H) $(SCEV_H) $(GGC_H) predict.def $(TIMEVAR_H) $(TREE_DUMP_H) \
    $(TREE_FLOW_H) $(TREE_PASS_H) $(EXPR_H) pointer-set.h
@@ -3437,28 +3442,28 @@ bb-reorder.o : bb-reorder.c $(CONFIG_H)
    $(TARGET_H) $(FUNCTION_H) $(TM_P_H) $(OBSTACK_H) $(EXPR_H) $(REGS_H) \
    $(PARAMS_H) $(TOPLEV_H) $(TREE_PASS_H) $(DF_H)
 tracer.o : tracer.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
-   $(TREE_H) $(BASIC_BLOCK_H) hard-reg-set.h output.h $(CFGLAYOUT_H) \
+   $(TREE_H) $(BASIC_BLOCK_H) $(HARD_REG_SET_H) output.h $(CFGLAYOUT_H) \
    $(FLAGS_H) $(TIMEVAR_H) $(PARAMS_H) $(COVERAGE_H) $(FIBHEAP_H) \
    $(TREE_PASS_H) $(TREE_FLOW_H) $(TREE_INLINE_H)
 cfglayout.o : cfglayout.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
-   $(RTL_H) $(TREE_H) insn-config.h $(BASIC_BLOCK_H) hard-reg-set.h output.h \
-   $(FUNCTION_H) $(CFGLAYOUT_H) $(CFGLOOP_H) $(TARGET_H) gt-cfglayout.h \
-   $(GGC_H) alloc-pool.h $(FLAGS_H) $(OBSTACK_H) $(TREE_PASS_H) vecprim.h \
-   $(DF_H) $(EMIT_RTL_H)
+   $(RTL_H) $(TREE_H) insn-config.h $(BASIC_BLOCK_H) $(HARD_REG_SET_H) \
+   output.h $(FUNCTION_H) $(CFGLAYOUT_H) $(CFGLOOP_H) $(TARGET_H) \
+   gt-cfglayout.h $(GGC_H) alloc-pool.h $(FLAGS_H) $(OBSTACK_H) \
+   $(TREE_PASS_H) vecprim.h $(DF_H) $(EMIT_RTL_H)
 timevar.o : timevar.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
    $(TIMEVAR_H) $(FLAGS_H) intl.h $(TOPLEV_H) $(RTL_H) timevar.def
 regcprop.o : regcprop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
-   $(RTL_H) insn-config.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h \
+   $(RTL_H) insn-config.h $(BASIC_BLOCK_H) $(REGS_H) $(HARD_REG_SET_H) \
    output.h $(RECOG_H) $(FUNCTION_H) $(OBSTACK_H) $(FLAGS_H) $(TM_P_H) \
    addresses.h reload.h $(TOPLEV_H) $(TIMEVAR_H) $(TREE_PASS_H) $(DF_H)
 regrename.o : regrename.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
-   $(RTL_H) insn-config.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h \
+   $(RTL_H) insn-config.h $(BASIC_BLOCK_H) $(REGS_H) $(HARD_REG_SET_H) \
    output.h $(RECOG_H) $(FUNCTION_H) $(OBSTACK_H) $(FLAGS_H) $(TM_P_H) \
    addresses.h reload.h $(TOPLEV_H) $(TIMEVAR_H) $(TREE_PASS_H) $(DF_H)
 ifcvt.o : ifcvt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
    $(REGS_H) $(TOPLEV_H) $(FLAGS_H) insn-config.h $(FUNCTION_H) $(RECOG_H) \
    $(TARGET_H) $(BASIC_BLOCK_H) $(EXPR_H) output.h $(EXCEPT_H) $(TM_P_H) \
-   $(OPTABS_H) $(CFGLOOP_H) hard-reg-set.h $(TIMEVAR_H) \
+   $(OPTABS_H) $(CFGLOOP_H) $(HARD_REG_SET_H) $(TIMEVAR_H) \
    $(TREE_PASS_H) $(DF_H) $(DBGCNT_H)
 lambda-mat.o : lambda-mat.c $(LAMBDA_H) $(GGC_H) $(SYSTEM_H) $(CONFIG_H) \
    $(TM_H) coretypes.h $(TREE_H) $(TREE_FLOW_H)
@@ -3485,7 +3490,7 @@ target-globals.o : target-globals.c $(CO
    $(TM_H) $(GGC_H) $(TOPLEV_H) $(target_globals_h)
 
 $(out_object_file): $(out_file) $(CONFIG_H) coretypes.h $(TM_H) $(TREE_H) \
-   $(RTL_H) $(REGS_H) hard-reg-set.h insn-config.h conditions.h \
+   $(RTL_H) $(REGS_H) $(HARD_REG_SET_H) insn-config.h conditions.h \
    output.h $(INSN_ATTR_H) $(SYSTEM_H) $(TOPLEV_H) $(TARGET_H) libfuncs.h \
    $(TARGET_DEF_H) $(FUNCTION_H) $(SCHED_INT_H) $(TM_P_H) $(EXPR_H) \
    langhooks.h $(GGC_H) $(OPTABS_H) $(REAL_H) tm-constrs.h $(GIMPLE_H) $(DF_H) \
@@ -3549,7 +3554,7 @@ insn-automata.o : insn-automata.c $(CONF
   insn-config.h $(TOPLEV_H) $(RECOG_H) $(TM_P_H) $(FLAGS_H) $(EMIT_RTL_H)
 insn-emit.o : insn-emit.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H)	\
   $(RTL_H) $(TM_P_H) $(FUNCTION_H) $(EXPR_H) $(OPTABS_H) 		\
-  dfp.h $(FLAGS_H) output.h insn-config.h hard-reg-set.h $(RECOG_H)	\
+  dfp.h $(FLAGS_H) output.h insn-config.h $(HARD_REG_SET_H) $(RECOG_H)	\
   $(RESOURCE_H) reload.h $(TOPLEV_H) $(REGS_H) tm-constrs.h $(GGC_H)	\
   $(BASIC_BLOCK_H) $(INTEGRATE_H)
 insn-enums.o : insn-enums.c $(CONFIG_H) $(SYSTEM_H)
@@ -3562,7 +3567,7 @@ insn-opinit.o : insn-opinit.c $(CONFIG_H
   $(EXPR_H) $(OPTABS_H) reload.h
 insn-output.o : insn-output.c $(CONFIG_H) $(SYSTEM_H) coretypes.h	\
   $(TM_H) $(RTL_H) $(GGC_H) $(REGS_H) conditions.h			\
-  hard-reg-set.h insn-config.h $(INSN_ATTR_H) $(EXPR_H) output.h	\
+  $(HARD_REG_SET_H) insn-config.h $(INSN_ATTR_H) $(EXPR_H) output.h	\
   $(RECOG_H) $(FUNCTION_H) $(TOPLEV_H) $(FLAGS_H) insn-codes.h $(TM_P_H)\
   $(TARGET_H) tm-constrs.h
 insn-peep.o : insn-peep.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H)	\
@@ -3570,11 +3575,11 @@ insn-peep.o : insn-peep.c $(CONFIG_H) $(
   $(RECOG_H) $(EXCEPT_H) $(FUNCTION_H) $(TOPLEV_H) $(FLAGS_H) tm-constrs.h
 insn-preds.o : insn-preds.c $(CONFIG_H) $(SYSTEM_H) coretypes.h		\
   $(TM_H) $(RTL_H) $(TREE_H) insn-config.h $(RECOG_H) output.h		\
-  $(FLAGS_H) $(FUNCTION_H) hard-reg-set.h $(RESOURCE_H) $(TM_P_H)	\
+  $(FLAGS_H) $(FUNCTION_H) $(HARD_REG_SET_H) $(RESOURCE_H) $(TM_P_H)	\
   $(TOPLEV_H) reload.h $(REGS_H) tm-constrs.h
 insn-recog.o : insn-recog.c $(CONFIG_H) $(SYSTEM_H) coretypes.h		\
   $(TM_H) $(RTL_H) insn-config.h $(RECOG_H) output.h $(FLAGS_H)		\
-  $(FUNCTION_H) hard-reg-set.h $(RESOURCE_H) $(TM_P_H) $(TOPLEV_H)	\
+  $(FUNCTION_H) $(HARD_REG_SET_H) $(RESOURCE_H) $(TM_P_H) $(TOPLEV_H)	\
   reload.h $(REGS_H) tm-constrs.h
 
 # For each of the files generated by running a generator program over
gcc/
	* Makefile.in (HARD_REG_SET_H): Add target-hard-regs.h and $(TM_H).
	(target-globals.o): Depend on $(HARD_REG_SET_H).
	* target-hard-regs.def: New file.
	* target-globals.def: Include it.
	* target-globals.c: Include hard-reg-set.h.
	* hard-reg-set.h: Include target-hard-regs.h.
	(fixed_regs): Delete.
	(fixed_reg_set, call_used_regs, call_really_used_regs): Likewise.
	(call_used_reg_set, call_fixed_reg_set): Likewise.
	(regs_invalidated_by_call, no_caller_save_reg_set): Likewise.
	(reg_alloc_order, inv_reg_alloc_order, reg_class_contents): Likewise.
	(reg_class_size, reg_class_subclasses, reg_class_subunion): Likewise.
	(reg_class_superunion, reg_names, reg_class_names): Likewise.
	* reginfo.c (fixed_regs, fixed_reg_set, call_used_regs): Delete.
	(call_used_reg_set, call_really_used_regs): Likewise.
	(call_fixed_reg_set, regs_invalidated_by_call): Likewise.
	(reg_alloc_order, inv_reg_alloc_order, reg_class_contents): Likewise.
	(reg_class_size, reg_class_subclasses, reg_class_subunion): Likewise.
	(reg_class_superunion, reg_names, reg_class_names): Likewise.
	(initial_call_really_used_regs): New variable.
	(initial_reg_alloc_order): Likewise.
	(initial_reg_names, initial_reg_class_names): Likewise.
	(init_reg_sets): Assert that initial_call_really_used_regs,
	initial_reg_alloc_order, initial_reg_names and initial_reg_class_names
	are all the same size as their variable counterparts.  Use them to
	initialize those counterparts.
	* caller-save.c (no_caller_save_reg_set): Delete.
	* ira.c (setup_reg_class_relations): Remove local reg_class_names.
	* config/mep/mep.c (reg_class_names): Delete commented-out definition.

Index: gcc/Makefile.in
===================================================================
--- gcc/Makefile.in	2010-06-26 19:22:47.000000000 +0100
+++ gcc/Makefile.in	2010-06-26 19:22:49.000000000 +0100
@@ -891,7 +891,7 @@ TREE_H = tree.h all-tree.def tree.def c-
 	$(INPUT_H) statistics.h $(VEC_H) treestruct.def $(HASHTAB_H) \
 	double-int.h alias.h $(SYMTAB_H) options.h vecir.h \
 	$(REAL_H) $(FIXED_VALUE_H)
-HARD_REG_SET_H = hard-reg-set.h
+HARD_REG_SET_H = hard-reg-set.h target-hard-regs.h $(TM_H)
 REGSET_H = regset.h $(BITMAP_H) $(HARD_REG_SET_H)
 BASIC_BLOCK_H = basic-block.h $(PREDICT_H) $(VEC_H) $(FUNCTION_H) cfghooks.h
 GIMPLE_H = gimple.h gimple.def gsstruct.def pointer-set.h $(VEC_H) \
@@ -3490,7 +3490,7 @@ lower-subreg.o : lower-subreg.c $(CONFIG
    insn-config.h $(BASIC_BLOCK_H) $(RECOG_H) $(OBSTACK_H) $(BITMAP_H) \
    $(EXPR_H) $(EXCEPT_H) $(REGS_H) $(TREE_PASS_H) $(DF_H)
 target-globals.o : target-globals.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
-   $(TM_H) $(GGC_H) $(TOPLEV_H) $(target_globals_h)
+   $(TM_H) $(GGC_H) $(TOPLEV_H) $(HARD_REG_SET_H) $(target_globals_h)
 
 $(out_object_file): $(out_file) $(CONFIG_H) coretypes.h $(TM_H) $(TREE_H) \
    $(RTL_H) $(REGS_H) $(HARD_REG_SET_H) insn-config.h conditions.h \
Index: gcc/target-hard-regs.def
===================================================================
--- /dev/null	2010-06-26 09:30:32.426301926 +0100
+++ gcc/target-hard-regs.def	2010-06-26 19:22:49.000000000 +0100
@@ -0,0 +1,88 @@
+/* Target-specific global state for hard-reg-set.h.
+   Copyright (C) 1987, 1992, 1994, 2000, 2003, 2004, 2005, 2007, 2008, 2009
+   Free Software Foundation, Inc.
+
+This file is part of GCC
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3.  If not see
+<http://www.gnu.org/licenses/>.  */
+
+START_GROUP (hard_regs)
+  /* Indexed by hard register number, contains 1 for registers
+     that are fixed use (stack pointer, pc, frame pointer, etc.).
+     These are the registers that cannot be used to allocate
+     a pseudo reg whose life does not cross calls.  */
+  VAR (char, fixed_regs[FIRST_PSEUDO_REGISTER])
+
+  /* The same info as a HARD_REG_SET.  */
+  VAR (HARD_REG_SET, fixed_reg_set)
+
+  /* Indexed by hard register number, contains 1 for registers
+     that are fixed use or are clobbered by function calls.
+     These are the registers that cannot be used to allocate
+     a pseudo reg whose life crosses calls.  */
+  VAR (char, call_used_regs[FIRST_PSEUDO_REGISTER])
+
+  VAR (char, call_really_used_regs[FIRST_PSEUDO_REGISTER])
+
+  /* The same info as a HARD_REG_SET.  */
+  VAR (HARD_REG_SET, call_used_reg_set)
+
+  /* Contains registers that are fixed use -- i.e. in fixed_reg_set -- or
+     a function value return register or TARGET_STRUCT_VALUE_RTX or
+     STATIC_CHAIN_REGNUM.  These are the registers that cannot hold quantities
+     across calls even if we are willing to save and restore them.  */
+  VAR (HARD_REG_SET, call_fixed_reg_set)
+
+  /* Contains 1 for registers that are set or clobbered by calls.  */
+  /* ??? Ideally, this would be just call_used_regs plus global_regs, but
+     for someone's bright idea to have call_used_regs strictly include
+     fixed_regs.  Which leaves us guessing as to the set of fixed_regs
+     that are actually preserved.  We know for sure that those associated
+     with the local stack frame are safe, but scant others.  */
+  VAR (HARD_REG_SET, regs_invalidated_by_call)
+
+  /* Call used hard registers which can not be saved because there is no
+     insn for this.  */
+  VAR (HARD_REG_SET, no_caller_save_reg_set)
+
+  /* Table of register numbers in the order in which to try to use them.  */
+  VAR (int, reg_alloc_order[FIRST_PSEUDO_REGISTER])
+
+  /* The inverse of reg_alloc_order.  */
+  VAR (int, inv_reg_alloc_order[FIRST_PSEUDO_REGISTER])
+
+  /* For each reg class, a HARD_REG_SET saying which registers are in it.  */
+  VAR (HARD_REG_SET, reg_class_contents[N_REG_CLASSES])
+
+  /* For each reg class, number of regs it contains.  */
+  VAR (unsigned int, reg_class_size[N_REG_CLASSES])
+
+  /* For each reg class, table listing all the classes contained in it.  */
+  VAR (enum reg_class, reg_class_subclasses[N_REG_CLASSES][N_REG_CLASSES])
+
+  /* For each pair of reg classes,
+     a largest reg class contained in their union.  */
+  VAR (enum reg_class, reg_class_subunion[N_REG_CLASSES][N_REG_CLASSES])
+
+  /* For each pair of reg classes,
+     the smallest reg class that contains their union.  */
+  VAR (enum reg_class, reg_class_superunion[N_REG_CLASSES][N_REG_CLASSES])
+
+  /* Vector indexed by hardware reg giving its name.  */
+  VAR (const char *, reg_names[FIRST_PSEUDO_REGISTER])
+
+  /* Vector indexed by reg class giving its name.  */
+  VAR (const char *, reg_class_names[N_REG_CLASSES])
+END_GROUP
Index: gcc/target-globals.def
===================================================================
--- gcc/target-globals.def	2010-06-26 19:06:47.000000000 +0100
+++ gcc/target-globals.def	2010-06-26 19:22:49.000000000 +0100
@@ -68,3 +68,5 @@ along with GCC; see the file COPYING3.
      - void restore_target_globals (struct target_globals *globals)
 	 Switch back to previously-created target globals GLOBALS.
 	 This is intended to be a very quick function.  */
+
+#include "target-hard-regs.def"
Index: gcc/target-globals.c
===================================================================
--- gcc/target-globals.c	2010-06-26 19:06:47.000000000 +0100
+++ gcc/target-globals.c	2010-06-26 19:22:49.000000000 +0100
@@ -23,5 +23,6 @@ Software Foundation; either version 3, o
 #include "tm.h"
 #include "ggc.h"
 #include "toplev.h"
+#include "hard-reg-set.h"
 
 #include "target-globals-def.h"
Index: gcc/hard-reg-set.h
===================================================================
--- gcc/hard-reg-set.h	2010-06-26 19:06:47.000000000 +0100
+++ gcc/hard-reg-set.h	2010-06-26 19:22:49.000000000 +0100
@@ -576,98 +576,13 @@ #define EXECUTE_IF_SET_IN_HARD_REG_SET(S
 /* Define some standard sets of registers.  */
 
 /* Indexed by hard register number, contains 1 for registers
-   that are fixed use (stack pointer, pc, frame pointer, etc.).
-   These are the registers that cannot be used to allocate
-   a pseudo reg whose life does not cross calls.  */
-
-extern char fixed_regs[FIRST_PSEUDO_REGISTER];
-
-/* The same info as a HARD_REG_SET.  */
-
-extern HARD_REG_SET fixed_reg_set;
-
-/* Indexed by hard register number, contains 1 for registers
-   that are fixed use or are clobbered by function calls.
-   These are the registers that cannot be used to allocate
-   a pseudo reg whose life crosses calls.  */
-
-extern char call_used_regs[FIRST_PSEUDO_REGISTER];
-
-#ifdef CALL_REALLY_USED_REGISTERS
-extern char call_really_used_regs[];
-#endif
-
-/* The same info as a HARD_REG_SET.  */
-
-extern HARD_REG_SET call_used_reg_set;
-
-/* Contains registers that are fixed use -- i.e. in fixed_reg_set -- or
-   a function value return register or TARGET_STRUCT_VALUE_RTX or
-   STATIC_CHAIN_REGNUM.  These are the registers that cannot hold quantities
-   across calls even if we are willing to save and restore them.  */
-
-extern HARD_REG_SET call_fixed_reg_set;
-
-/* Indexed by hard register number, contains 1 for registers
    that are being used for global register decls.
    These must be exempt from ordinary flow analysis
    and are also considered fixed.  */
 
 extern char global_regs[FIRST_PSEUDO_REGISTER];
 
-/* Contains 1 for registers that are set or clobbered by calls.  */
-/* ??? Ideally, this would be just call_used_regs plus global_regs, but
-   for someone's bright idea to have call_used_regs strictly include
-   fixed_regs.  Which leaves us guessing as to the set of fixed_regs
-   that are actually preserved.  We know for sure that those associated
-   with the local stack frame are safe, but scant others.  */
-
-extern HARD_REG_SET regs_invalidated_by_call;
-
-/* Call used hard registers which can not be saved because there is no
-   insn for this.  */
-
-extern HARD_REG_SET no_caller_save_reg_set;
-
-#ifdef REG_ALLOC_ORDER
-/* Table of register numbers in the order in which to try to use them.  */
-
-extern int reg_alloc_order[FIRST_PSEUDO_REGISTER];
-
-/* The inverse of reg_alloc_order.  */
-
-extern int inv_reg_alloc_order[FIRST_PSEUDO_REGISTER];
-#endif
-
-/* For each reg class, a HARD_REG_SET saying which registers are in it.  */
-
-extern HARD_REG_SET reg_class_contents[N_REG_CLASSES];
-
-/* For each reg class, number of regs it contains.  */
-
-extern unsigned int reg_class_size[N_REG_CLASSES];
-
-/* For each reg class, table listing all the classes contained in it.  */
-
-extern enum reg_class reg_class_subclasses[N_REG_CLASSES][N_REG_CLASSES];
-
-/* For each pair of reg classes,
-   a largest reg class contained in their union.  */
-
-extern enum reg_class reg_class_subunion[N_REG_CLASSES][N_REG_CLASSES];
-
-/* For each pair of reg classes,
-   the smallest reg class that contains their union.  */
-
-extern enum reg_class reg_class_superunion[N_REG_CLASSES][N_REG_CLASSES];
-
-/* Vector indexed by hardware reg giving its name.  */
-
-extern const char * reg_names[FIRST_PSEUDO_REGISTER];
-
-/* Vector indexed by reg class giving its name.  */
-
-extern const char * reg_class_names[];
+#include "target-hard-regs.h"
 
 /* Given a hard REGN a FROM mode and a TO mode, return nonzero if
    REGN cannot change modes between the specified modes.  */
Index: gcc/reginfo.c
===================================================================
--- gcc/reginfo.c	2010-06-26 19:06:47.000000000 +0100
+++ gcc/reginfo.c	2010-06-26 19:22:49.000000000 +0100
@@ -58,39 +58,15 @@ Software Foundation; either version 3, o
 int max_regno;
 
 
-/* Register tables used by many passes.  */
-
-/* Indexed by hard register number, contains 1 for registers
-   that are fixed use (stack pointer, pc, frame pointer, etc.).
-   These are the registers that cannot be used to allocate
-   a pseudo reg for general use.  */
-char fixed_regs[FIRST_PSEUDO_REGISTER];
-
-/* Same info as a HARD_REG_SET.  */
-HARD_REG_SET fixed_reg_set;
-
-/* Data for initializing the above.  */
+/* Data for initializing fixed_regs.  */
 static const char initial_fixed_regs[] = FIXED_REGISTERS;
 
-/* Indexed by hard register number, contains 1 for registers
-   that are fixed use or are clobbered by function calls.
-   These are the registers that cannot be used to allocate
-   a pseudo reg whose life crosses calls unless we are able
-   to save/restore them across the calls.  */
-char call_used_regs[FIRST_PSEUDO_REGISTER];
-
-/* Same info as a HARD_REG_SET.  */
-HARD_REG_SET call_used_reg_set;
-
-/* Data for initializing the above.  */
+/* Data for initializing call_used_regs.  */
 static const char initial_call_used_regs[] = CALL_USED_REGISTERS;
 
-/* This is much like call_used_regs, except it doesn't have to
-   be a superset of FIXED_REGISTERS. This vector indicates
-   what is really call clobbered, and is used when defining
-   regs_invalidated_by_call.  */
+/* Data for initializing call_really_used_regs.  */
 #ifdef CALL_REALLY_USED_REGISTERS
-char call_really_used_regs[] = CALL_REALLY_USED_REGISTERS;
+static const char initial_call_really_used_regs[] = CALL_REALLY_USED_REGISTERS;
 #endif
 
 #ifdef CALL_REALLY_USED_REGISTERS
@@ -99,28 +75,12 @@ #define CALL_REALLY_USED_REGNO_P(X)  cal
 #define CALL_REALLY_USED_REGNO_P(X)  call_used_regs[X]
 #endif
 
-
-/* Contains registers that are fixed use -- i.e. in fixed_reg_set -- or
-   a function value return register or TARGET_STRUCT_VALUE_RTX or
-   STATIC_CHAIN_REGNUM.  These are the registers that cannot hold quantities
-   across calls even if we are willing to save and restore them.  */
-
-HARD_REG_SET call_fixed_reg_set;
-
 /* Indexed by hard register number, contains 1 for registers
    that are being used for global register decls.
    These must be exempt from ordinary flow analysis
    and are also considered fixed.  */
 char global_regs[FIRST_PSEUDO_REGISTER];
 
-/* Contains 1 for registers that are set or clobbered by calls.  */
-/* ??? Ideally, this would be just call_used_regs plus global_regs, but
-   for someone's bright idea to have call_used_regs strictly include
-   fixed_regs.  Which leaves us guessing as to the set of fixed_regs
-   that are actually preserved.  We know for sure that those associated
-   with the local stack frame are safe, but scant others.  */
-HARD_REG_SET regs_invalidated_by_call;
-
 /* Same information as REGS_INVALIDATED_BY_CALL but in regset form to be used
    in dataflow more conveniently.  */
 regset regs_invalidated_by_call_regset;
@@ -129,17 +89,11 @@ #define CALL_REALLY_USED_REGNO_P(X)  cal
    should not be reset after each function is compiled.  */
 static bitmap_obstack persistent_obstack;
 
-/* Table of register numbers in the order in which to try to use them.  */
+/* Used to initialize reg_alloc_order.  */
 #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];
+static int initial_reg_alloc_order[FIRST_PSEUDO_REGISTER] = REG_ALLOC_ORDER;
 #endif
 
-/* For each reg class, a HARD_REG_SET saying which registers are in it.  */
-HARD_REG_SET reg_class_contents[N_REG_CLASSES];
-
 /* The same information, but as an array of unsigned ints.  We copy from
    these unsigned ints to the table above.  We do this so the tm.h files
    do not have to be aware of the wordsize for machines with <= 64 regs.
@@ -150,25 +104,11 @@ #define N_REG_INTS  \
 static const unsigned int_reg_class_contents[N_REG_CLASSES][N_REG_INTS]
   = REG_CLASS_CONTENTS;
 
-/* For each reg class, number of regs it contains.  */
-unsigned int reg_class_size[N_REG_CLASSES];
-
-/* For each reg class, table listing all the classes contained in it.  */
-enum reg_class reg_class_subclasses[N_REG_CLASSES][N_REG_CLASSES];
-
-/* For each pair of reg classes,
-   a largest reg class contained in their union.  */
-enum reg_class reg_class_subunion[N_REG_CLASSES][N_REG_CLASSES];
-
-/* For each pair of reg classes,
-   the smallest reg class containing their union.  */
-enum reg_class reg_class_superunion[N_REG_CLASSES][N_REG_CLASSES];
-
 /* Array containing all of the register names.  */
-const char * reg_names[] = REGISTER_NAMES;
+static const char *const initial_reg_names[] = REGISTER_NAMES;
 
 /* Array containing all of the register class names.  */
-const char * reg_class_names[] = REG_CLASS_NAMES;
+static const char *const initial_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
@@ -250,9 +190,27 @@ init_reg_sets (void)
      CALL_USED_REGISTERS had the right number of initializers.  */
   gcc_assert (sizeof fixed_regs == sizeof initial_fixed_regs);
   gcc_assert (sizeof call_used_regs == sizeof initial_call_used_regs);
+#ifdef CALL_REALLY_USED_REGISTERS
+  gcc_assert (sizeof call_really_used_regs
+	      == sizeof initial_call_really_used_regs);
+#endif
+#ifdef REG_ALLOC_ORDER
+  gcc_assert (sizeof reg_alloc_order == sizeof initial_reg_alloc_order);
+#endif
+  gcc_assert (sizeof reg_names == sizeof initial_reg_names);
+  gcc_assert (sizeof reg_class_names == sizeof initial_reg_class_names);
 
   memcpy (fixed_regs, initial_fixed_regs, sizeof fixed_regs);
   memcpy (call_used_regs, initial_call_used_regs, sizeof call_used_regs);
+#ifdef CALL_REALLY_USED_REGISTERS
+  memcpy (call_really_used_regs, initial_call_really_used_regs,
+	  sizeof call_really_used_regs);
+#endif
+#ifdef REG_ALLOC_ORDER
+  memcpy (reg_alloc_order, initial_reg_alloc_order, sizeof reg_alloc_order);
+#endif
+  memcpy (reg_names, initial_reg_names, sizeof reg_names);
+  memcpy (reg_class_names, initial_reg_class_names, sizeof reg_class_names);
   memset (global_regs, 0, sizeof global_regs);
 }
 
Index: gcc/caller-save.c
===================================================================
--- gcc/caller-save.c	2010-06-26 19:06:47.000000000 +0100
+++ gcc/caller-save.c	2010-06-26 19:22:49.000000000 +0100
@@ -43,10 +43,6 @@ Software Foundation; either version 3, o
 /* True if caller-save has been initialized.  */
 bool caller_save_initialized_p;
 
-/* Call used hard registers which can not be saved because there is no
-   insn for this.  */
-HARD_REG_SET no_caller_save_reg_set;
-
 #ifndef MAX_MOVE_MAX
 #define MAX_MOVE_MAX MOVE_MAX
 #endif
Index: gcc/ira.c
===================================================================
--- gcc/ira.c	2010-06-26 19:06:47.000000000 +0100
+++ gcc/ira.c	2010-06-26 19:22:49.000000000 +0100
@@ -1106,7 +1106,6 @@ setup_reg_class_relations (void)
 static void
 print_class_cover (FILE *f)
 {
-  static const char *const reg_class_names[] = REG_CLASS_NAMES;
   int i;
 
   fprintf (f, "Class cover:\n");
Index: gcc/config/mep/mep.c
===================================================================
--- gcc/config/mep/mep.c	2010-06-26 19:06:47.000000000 +0100
+++ gcc/config/mep/mep.c	2010-06-26 19:22:49.000000000 +0100
@@ -451,8 +451,6 @@ symbolref_p (rtx x)
 	  || c == SYMBOL_REF);
 }
 
-/* static const char *reg_class_names[] = REG_CLASS_NAMES; */
-
 #define GEN_REG(R, STRICT)				\
   (GR_REGNO_P (R)					\
    || (!STRICT						\
gcc/
	* config/mips/mips.h (mips16_globals): Declare.
	(SWITCHABLE_TARGET): Define.
	* config/mips/mips.c: Include target-globals.h.
	(mips16_globals): New variable.
	(mips_set_mips16_mode): Use save_target_globals and
	restore_target_globals instead of target_reinit.

Index: gcc/config/mips/mips.h
===================================================================
--- gcc/config/mips/mips.h	2010-06-26 19:06:40.000000000 +0100
+++ gcc/config/mips/mips.h	2010-06-26 19:51:54.000000000 +0100
@@ -3027,6 +3027,7 @@ struct mips_asm_switch {
 extern const struct mips_rtx_cost_data *mips_cost;
 extern bool mips_base_mips16;
 extern enum mips_code_readable_setting mips_code_readable;
+extern GTY(()) struct target_globals *mips16_globals;
 #endif
 
 /* Enable querying of DFA units.  */
@@ -3061,3 +3062,6 @@ #define FINAL_PRESCAN_INSN(INSN, OPVEC,
    support this feature.  */
 #define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \
   (((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_absptr)
+
+/* For switching between MIPS16 and non-MIPS16 modes.  */
+#define SWITCHABLE_TARGET 1
Index: gcc/config/mips/mips.c
===================================================================
--- gcc/config/mips/mips.c	2010-06-26 19:06:40.000000000 +0100
+++ gcc/config/mips/mips.c	2010-06-26 19:51:54.000000000 +0100
@@ -58,6 +58,7 @@ the Free Software Foundation; either ver
 #include "gimple.h"
 #include "bitmap.h"
 #include "diagnostic.h"
+#include "target-globals.h"
 
 /* True if X is an UNSPEC wrapper around a SYMBOL_REF or LABEL_REF.  */
 #define UNSPEC_ADDRESS_P(X)					\
@@ -568,6 +569,9 @@ static GTY (()) int mips_output_filename
 /* Likewise for HIGHs.  */
 static const char *mips_hi_relocs[NUM_SYMBOL_TYPES];
 
+/* Target state for MIPS16.  */
+struct target_globals *mips16_globals;
+
 /* Index R is the smallest register class that contains register R.  */
 const enum reg_class mips_regno_to_class[FIRST_PSEUDO_REGISTER] = {
   LEA_REGS,	LEA_REGS,	M16_REGS,	V1_REG,
@@ -15200,9 +15204,15 @@ mips_set_mips16_mode (int mips16_p)
   /* (Re)initialize MIPS target internals for new ISA.  */
   mips_init_relocs ();
 
-  if (was_mips16_p >= 0 || was_mips16_pch_p >= 0)
-    /* Reinitialize target-dependent state.  */
-    target_reinit ();
+  if (mips16_p)
+    {
+      if (!mips16_globals)
+	mips16_globals = save_target_globals ();
+      else
+	restore_target_globals (mips16_globals);
+    }
+  else
+    restore_target_globals (&default_target_globals);
 
   was_mips16_p = mips16_p;
   was_mips16_pch_p = mips16_p;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]