-
Robin Dapp authored
Hi, this patch makes genrecog split its output into separate files (10 by default) in the same vein genemit does. The changes are mostly mechanical again, changing printfs and puts to fprintf. As insn-recog.cc relies on being able to call other recog functions a header insn-recog.h is introduced that pre declares all of those. For simplicity the number of files is determined by (re-using) --with-insnemit-partitions. Naming suggestions welcome :) Bootstrapped and regtested on x86 and power10, regtested on riscv. aarch64 bootstrap is currently blocked because of the "maybe uninitialized" issue discussed on IRC. Regards Robin PR target/111600 gcc/ChangeLog: * Makefile.in: Add insn-recog split. * configure: Regenerate. * configure.ac: Document that the number of insnemit partitions is used for insn-recog as well. * genconditions.cc (write_one_condition): Use fprintf. * genpreds.cc (write_predicate_expr): Ditto. (write_init_reg_class_start_regs): Ditto. * genrecog.cc (write_header): Add header file to includes. (printf_indent): Use fprintf. (change_state): Ditto. (print_code): Ditto. (print_host_wide_int): Ditto. (print_parameter_value): Ditto. (print_test_rtx): Ditto. (print_nonbool_test): Ditto. (print_label_value): Ditto. (print_test): Ditto. (print_decision): Ditto. (print_state): Ditto. (print_subroutine_call): Ditto. (print_acceptance): Ditto. (print_subroutine_start): Ditto. (print_pattern): Ditto. (print_subroutine): Ditto. (print_subroutine_group): Ditto. (handle_arg): Add -O and -H for output and header file handling. (main): Use callback. * gentarget-def.cc (def_target_insn): Use fprintf. * read-md.cc (md_reader::print_c_condition): Ditto. * read-md.h (class md_reader): Ditto.
Robin Dapp authoredHi, this patch makes genrecog split its output into separate files (10 by default) in the same vein genemit does. The changes are mostly mechanical again, changing printfs and puts to fprintf. As insn-recog.cc relies on being able to call other recog functions a header insn-recog.h is introduced that pre declares all of those. For simplicity the number of files is determined by (re-using) --with-insnemit-partitions. Naming suggestions welcome :) Bootstrapped and regtested on x86 and power10, regtested on riscv. aarch64 bootstrap is currently blocked because of the "maybe uninitialized" issue discussed on IRC. Regards Robin PR target/111600 gcc/ChangeLog: * Makefile.in: Add insn-recog split. * configure: Regenerate. * configure.ac: Document that the number of insnemit partitions is used for insn-recog as well. * genconditions.cc (write_one_condition): Use fprintf. * genpreds.cc (write_predicate_expr): Ditto. (write_init_reg_class_start_regs): Ditto. * genrecog.cc (write_header): Add header file to includes. (printf_indent): Use fprintf. (change_state): Ditto. (print_code): Ditto. (print_host_wide_int): Ditto. (print_parameter_value): Ditto. (print_test_rtx): Ditto. (print_nonbool_test): Ditto. (print_label_value): Ditto. (print_test): Ditto. (print_decision): Ditto. (print_state): Ditto. (print_subroutine_call): Ditto. (print_acceptance): Ditto. (print_subroutine_start): Ditto. (print_pattern): Ditto. (print_subroutine): Ditto. (print_subroutine_group): Ditto. (handle_arg): Add -O and -H for output and header file handling. (main): Use callback. * gentarget-def.cc (def_target_insn): Use fprintf. * read-md.cc (md_reader::print_c_condition): Ditto. * read-md.h (class md_reader): Ditto.