+2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
+
+ PR target/80080
+ * config/s390/s390-passes.def: New file.
+ * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
+ declaration.
+ (make_pass_s390_early_mach): Add declaration.
+ * config/s390/s390.c (make_pass_s390_early_mach):
+ (s390_option_override): Remove dynamic registration.
+ * config/s390/t-s390: Add s390-passes.def.
+
2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
* config/s390/s390.c (s390_decompose_constant_pool_ref):
--- /dev/null
+/* Description of target passes for S/390.
+ Copyright (C) 2018 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/>. */
+
+INSERT_PASS_BEFORE (pass_thread_prologue_and_epilogue, 1, pass_s390_early_mach);
/* Routines for s390-c.c */
extern bool s390_const_operand_ok (tree, int, int, tree);
+
+/* Pass management. */
+namespace gcc { class context; }
+class rtl_opt_pass;
+
+extern rtl_opt_pass *make_pass_s390_early_mach (gcc::context *ctxt);
} // anon namespace
+rtl_opt_pass *
+make_pass_s390_early_mach (gcc::context *ctxt)
+{
+ return new pass_s390_early_mach (ctxt);
+}
+
/* Calculate TARGET = REG + OFFSET as s390_emit_prologue would do it.
- push too big immediates to the literal pool and annotate the refs
- emit frame related notes for stack pointer changes. */
if (!global_options_set.x_dwarf_version)
dwarf_version = 2;
}
-
- /* Register a target-specific optimization-and-lowering pass
- to run immediately before prologue and epilogue generation.
-
- Registering the pass must be done at start up. It's
- convenient to do it here. */
- opt_pass *new_pass = new pass_s390_early_mach (g);
- struct register_pass_info insert_pass_s390_early_mach =
- {
- new_pass, /* pass */
- "pro_and_epilogue", /* reference_pass_name */
- 1, /* ref_pass_instance_number */
- PASS_POS_INSERT_BEFORE /* po_op */
- };
- register_pass (&insert_pass_s390_early_mach);
}
#if S390_USE_TARGET_ATTRIBUTE
TM_H += $(srcdir)/config/s390/s390-builtins.def
TM_H += $(srcdir)/config/s390/s390-builtin-types.def
+PASSES_EXTRA += $(srcdir)/config/s390/s390-passes.def
s390-c.o: $(srcdir)/config/s390/s390-c.c \
$(srcdir)/config/s390/s390-protos.h $(CONFIG_H) $(SYSTEM_H) coretypes.h \