sparc.c (insert_pass_work_around_errata): Move into...
authorDavid Malcolm <dmalcolm@redhat.com>
Wed, 7 Aug 2013 15:48:38 +0000 (15:48 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Wed, 7 Aug 2013 15:48:38 +0000 (15:48 +0000)
2013-08-07  David Malcolm  <dmalcolm@redhat.com>

* config/sparc/sparc.c (insert_pass_work_around_errata): Move
into...
(sparc_option_override): ...and port to new C++ pass API.
* config/sparc/t-sparc (sparc.o): Add dep on CONTEXT_H

From-SVN: r201569

gcc/ChangeLog
gcc/config/sparc/sparc.c
gcc/config/sparc/t-sparc

index 505c79a..1dd783d 100644 (file)
@@ -1,3 +1,10 @@
+2013-08-07  David Malcolm  <dmalcolm@redhat.com>
+
+       * config/sparc/sparc.c (insert_pass_work_around_errata): Move
+       into...
+       (sparc_option_override): ...and port to new C++ pass API.
+       * config/sparc/t-sparc (sparc.o): Add dep on CONTEXT_H
+
 2013-08-07  Peter Bergner  <bergner@vnet.ibm.com>
 
        * config/rs6000/rs6000.c (htm_expand_builtin) <case 0>: Remove.
index 66c33f7..7080b33 100644 (file)
@@ -53,6 +53,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "df.h"
 #include "opts.h"
 #include "tree-pass.h"
+#include "context.h"
 
 /* Processor costs */
 
@@ -1038,14 +1039,6 @@ make_pass_work_around_errata (gcc::context *ctxt)
   return new pass_work_around_errata (ctxt);
 }
 
-struct register_pass_info insert_pass_work_around_errata =
-{
-  &pass_work_around_errata.pass,       /* pass */
-  "dbr",                               /* reference_pass_name */
-  1,                                   /* ref_pass_instance_number */
-  PASS_POS_INSERT_AFTER                        /* po_op */
-};
-
 /* Helpers for TARGET_DEBUG_OPTIONS.  */
 static void
 dump_target_flag_bits (const int flags)
@@ -1495,6 +1488,14 @@ sparc_option_override (void)
      (essentially) final form of the insn stream to work on.
      Registering the pass must be done at start up.  It's convenient to
      do it here.  */
+  opt_pass *errata_pass = make_pass_work_around_errata (g);
+  struct register_pass_info insert_pass_work_around_errata =
+    {
+      errata_pass,             /* pass */
+      "dbr",                   /* reference_pass_name */
+      1,                       /* ref_pass_instance_number */
+      PASS_POS_INSERT_AFTER    /* po_op */
+    };
   register_pass (&insert_pass_work_around_errata);
 }
 \f
index 664f4a4..62ad3f7 100644 (file)
@@ -24,7 +24,7 @@ sparc.o: $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
   $(FUNCTION_H) $(EXCEPT_H) $(EXPR_H) $(OPTABS_H) $(RECOG_H) \
   $(DIAGNOSTIC_CORE_H) $(GGC_H) $(TM_P_H) debug.h $(TARGET_H) \
   $(TARGET_DEF_H) $(COMMON_TARGET_H) $(GIMPLE_H) $(TREE_PASS_H) \
-  langhooks.h reload.h $(PARAMS_H) $(DF_H) $(OPTS_H) \
+  langhooks.h reload.h $(PARAMS_H) $(DF_H) $(OPTS_H) $(CONTEXT_H) \
   gt-sparc.h
 
 sparc-c.o: $(srcdir)/config/sparc/sparc-c.c \