чт, 29 авг. 2024 г. в 12:22, Georg-Johann Lay <a...@gjlay.de>:
> This patch adds a new C++ module avr-passes.cc for the avr-specific > passes. > > There are currently 5 avr-specific passes, and since avr.cc has > gotten fat, this patch moves the respective classes and support > functions to avr-passes.cc. > > Concerning code generation, this is supposed to be a no-op. > It is just a bit of refactoring that shrinks avr.cc from ~18000 lines > of code to ~15000. > > Ok for trunk? > Please apply. Denis > > Johann > > -- > > AVR: Outsource code for avr-specific passes to new avr-passes.cc. > > gcc/ > * config.gcc (extra_objs) [target=avr]: Add avr-passes.o. > * config/avr/t-avr (avr-passes.o): New rule to make it. > * config/avr/avr.cc (#define INCLUDE_VECTOR): Remove. > (cfganal.h, cfgrtl.h, context.h, tree-pass.h, print-rtl.h): Don't > include them. > (avr_strict_signed_p, avr_strict_unsigned_p, avr_2comparisons_rhs) > (make_avr_pass_recompute_notes, make_avr_pass_casesi) > (make_avr_pass_ifelse, make_avr_pass_pre_proep, > avr_split_tiny_move) > (emit_move_ccc, emit_move_ccc_after, reg_seen_between_p) > (avr_maybe_adjust_cfa, avr_redundant_compare_regs) > (avr_parallel_insn_from_insns, avr_is_casesi_sequence) > (avr_optimize_casesi, avr_redundant_compare, > make_avr_pass_fuse_add) > (avr_optimize_2ifelse, avr_rest_of_handle_ifelse) > (avr_casei_sequence_check_operands) > Move functions... > (avr_pass_data_fuse_add, avr_pass_data_ifelse) > (avr_pass_data_casesi, avr_pass_data_recompute_notes) > (avr_pass_data_pre_proep): Move objects... > (avr_pass_fuse_add, avr_pass_pre_proep, avr_pass_recompute_notes) > (avr_pass_ifelse, avr_pass_casesi, AVR_LdSt_Props): Move classes... > * config/avr/avr-passes.cc: ... to this new C++ module. > (struct Ranges): Move to... > * config/avr/ranges.h: ...this new file. > * config/avr/avr-protos.h: Adjust comments.