From 5ee5b32cb20051b96dee793ef1c34355b43f8889 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Wed, 7 Aug 2013 15:48:38 +0000 Subject: [PATCH] sparc.c (insert_pass_work_around_errata): Move into... 2013-08-07 David Malcolm * 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 | 7 +++++++ gcc/config/sparc/sparc.c | 17 +++++++++-------- gcc/config/sparc/t-sparc | 2 +- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 505c79aa5b2..1dd783d7672 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2013-08-07 David Malcolm + + * 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 * config/rs6000/rs6000.c (htm_expand_builtin) : Remove. diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index 66c33f7212d..7080b3364a3 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -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); } diff --git a/gcc/config/sparc/t-sparc b/gcc/config/sparc/t-sparc index 664f4a42418..62ad3f77934 100644 --- a/gcc/config/sparc/t-sparc +++ b/gcc/config/sparc/t-sparc @@ -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 \ -- 2.30.2