commit 8abbe9fbce66bdb1b03281fc06bc86707b5b3cf6
Author: David Malcolm <dmalcolm@redhat.com>
Date: Tue Aug 6 13:32:32 2013 -0400
gcc/
* 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
@@ -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);
}
@@ -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 \