* config/sparc/sparc-passes.def: New file.
* config/sparc/t-sparc (PASSES_EXTRA): Add sparc-passes.def.
* config/sparc/sparc-protos.h (make_pass_work_around_errata): New.
* config/sparc/sparc.c (sparc_option_override): Don't register passes.
From-SVN: r241180
+2016-10-14 Eric Botcazou <ebotcazou@adacore.com>
+
+ * config/sparc/sparc-passes.def: New file.
+ * config/sparc/t-sparc (PASSES_EXTRA): Add sparc-passes.def.
+ * config/sparc/sparc-protos.h (make_pass_work_around_errata): New.
+ * config/sparc/sparc.c (sparc_option_override): Don't register passes.
+
2016-10-14 Pat Haugen <pthaugen@us.ibm.com>
* loop-unroll.c (unroll_loop_runtime_iterations): Condition initial
2016-10-14 Pedro Alves <palves@redhat.com>
- * coretypes.h (OVERRIDE, FINAL): Delete, moved to
- include/ansidecl.h.
+ * coretypes.h (OVERRIDE, FINAL): Delete, moved to include/ansidecl.h.
2016-10-14 Catherine Moore <clm@codesourcery.com>
--- /dev/null
+/* Description of target passes for SPARC.
+ Copyright (C) 2016 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/>. */
+
+/*
+ Macros that can be used in this file:
+ INSERT_PASS_AFTER (PASS, INSTANCE, TGT_PASS)
+ INSERT_PASS_BEFORE (PASS, INSTANCE, TGT_PASS)
+ REPLACE_PASS (PASS, INSTANCE, TGT_PASS)
+ */
+
+ INSERT_PASS_AFTER (pass_delay_slots, 1, pass_work_around_errata);
extern void sparc_override_options (void);
extern void sparc_output_scratch_registers (FILE *);
extern void sparc_target_macros (void);
+extern void sparc_emit_membar_for_model (enum memmodel, int, int);
#ifdef RTX_CODE
extern machine_mode select_cc_mode (enum rtx_code, rtx, rtx);
bool sparc_modes_tieable_p (machine_mode, machine_mode);
#endif /* RTX_CODE */
-extern void sparc_emit_membar_for_model (enum memmodel, int, int);
+extern rtl_opt_pass *make_pass_work_around_errata (gcc::context *);
#endif /* __SPARC_PROTOS_H__ */
}
/* We use a machine specific pass to enable workarounds for errata.
+
We need to have the (essentially) final form of the insn stream in order
to properly detect the various hazards. Therefore, this machine specific
- pass runs as late as possible. The pass is inserted in the pass pipeline
- at the end of sparc_option_override. */
+ pass runs as late as possible. */
static unsigned int
sparc_do_work_around_errata (void)
pessimizes for double floating-point registers. */
if (!global_options_set.x_flag_ira_share_save_slots)
flag_ira_share_save_slots = 0;
-
- /* We register a machine specific pass to work around errata, if any.
- The pass mut be scheduled as late as possible so that we have the
- (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
/* Miscellaneous utilities. */
# along with GCC; see the file COPYING3. If not see
# <http://www.gnu.org/licenses/>.
+PASSES_EXTRA += $(srcdir)/config/sparc/sparc-passes.def
+
sparc-c.o: $(srcdir)/config/sparc/sparc-c.c
$(COMPILE) $<
$(POSTCOMPILE)