Automated conversion of passes to C++ classes

gcc/

	Patch autogenerated by refactor_passes.py from
	https://github.com/davidmalcolm/gcc-refactoring-scripts
	revision 03fe39476a4c4ea450b49e087cfa817b5f92021e

	* asan.c (pass_asan): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_asan): ...new pass_data instance and...
	(make_pass_asan): ...new function.
	(pass_asan_O0): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_asan_O0): ...new pass_data instance and...
	(make_pass_asan_O0): ...new function.
	* auto-inc-dec.c (pass_inc_dec): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_inc_dec): ...new pass_data instance and...
	(make_pass_inc_dec): ...new function.
	* bb-reorder.c (pass_reorder_blocks): Convert from a global struct to
	a subclass of rtl_opt_pass along with...
	(pass_data_reorder_blocks): ...new pass_data instance and...
	(make_pass_reorder_blocks): ...new function.
	(pass_duplicate_computed_gotos): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_duplicate_computed_gotos): ...new pass_data instance and...
	(make_pass_duplicate_computed_gotos): ...new function.
	(pass_partition_blocks): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_partition_blocks): ...new pass_data instance and...
	(make_pass_partition_blocks): ...new function.
	* bt-load.c (pass_branch_target_load_optimize1): Convert from a global
	struct to a subclass of rtl_opt_pass along with...
	(pass_data_branch_target_load_optimize1): ...new pass_data instance
	and...
	(make_pass_branch_target_load_optimize1): ...new function.
	(pass_branch_target_load_optimize2): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_branch_target_load_optimize2): ...new pass_data instance
	and...
	(make_pass_branch_target_load_optimize2): ...new function.
	* cfgcleanup.c (pass_jump): Convert from a global struct to a subclass
	of rtl_opt_pass along with...
	(pass_data_jump): ...new pass_data instance and...
	(make_pass_jump): ...new function.
	(pass_jump2): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_jump2): ...new pass_data instance and...
	(make_pass_jump2): ...new function.
	* cfgexpand.c (pass_expand): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_expand): ...new pass_data instance and...
	(make_pass_expand): ...new function.
	* cfgrtl.c (pass_free_cfg): Convert from a global struct to a subclass
	of rtl_opt_pass along with...
	(pass_data_free_cfg): ...new pass_data instance and...
	(make_pass_free_cfg): ...new function.
	(pass_into_cfg_layout_mode): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_into_cfg_layout_mode): ...new pass_data instance and...
	(make_pass_into_cfg_layout_mode): ...new function.
	(pass_outof_cfg_layout_mode): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_outof_cfg_layout_mode): ...new pass_data instance and...
	(make_pass_outof_cfg_layout_mode): ...new function.
	* cgraphbuild.c (pass_build_cgraph_edges): Convert from a global
	struct to a subclass of gimple_opt_pass along with...
	(pass_data_build_cgraph_edges): ...new pass_data instance and...
	(make_pass_build_cgraph_edges): ...new function.
	(pass_rebuild_cgraph_edges): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_rebuild_cgraph_edges): ...new pass_data instance and...
	(make_pass_rebuild_cgraph_edges): ...new function.
	(pass_remove_cgraph_callee_edges): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_remove_cgraph_callee_edges): ...new pass_data instance
	and...
	(make_pass_remove_cgraph_callee_edges): ...new function.
	* combine-stack-adj.c (pass_stack_adjustments): Convert from a global
	struct to a subclass of rtl_opt_pass along with...
	(pass_data_stack_adjustments): ...new pass_data instance and...
	(make_pass_stack_adjustments): ...new function.
	* combine.c (pass_combine): Convert from a global struct to a subclass
	of rtl_opt_pass along with...
	(pass_data_combine): ...new pass_data instance and...
	(make_pass_combine): ...new function.
	* compare-elim.c (pass_compare_elim_after_reload): Convert from a
	global struct to a subclass of rtl_opt_pass along with...
	(pass_data_compare_elim_after_reload): ...new pass_data instance
	and...
	(make_pass_compare_elim_after_reload): ...new function.
	* cprop.c (pass_rtl_cprop): Convert from a global struct to a subclass
	of rtl_opt_pass along with...
	(pass_data_rtl_cprop): ...new pass_data instance and...
	(make_pass_rtl_cprop): ...new function.
	* cse.c (pass_cse): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_cse): ...new pass_data instance and...
	(make_pass_cse): ...new function.
	(pass_cse2): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_cse2): ...new pass_data instance and...
	(make_pass_cse2): ...new function.
	(pass_cse_after_global_opts): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_cse_after_global_opts): ...new pass_data instance and...
	(make_pass_cse_after_global_opts): ...new function.
	* dce.c (pass_ud_rtl_dce): Convert from a global struct to a subclass
	of rtl_opt_pass along with...
	(pass_data_ud_rtl_dce): ...new pass_data instance and...
	(make_pass_ud_rtl_dce): ...new function.
	(pass_fast_rtl_dce): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_fast_rtl_dce): ...new pass_data instance and...
	(make_pass_fast_rtl_dce): ...new function.
	* df-core.c (pass_df_initialize_opt): Convert from a global struct to
	a subclass of rtl_opt_pass along with...
	(pass_data_df_initialize_opt): ...new pass_data instance and...
	(make_pass_df_initialize_opt): ...new function.
	(pass_df_initialize_no_opt): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_df_initialize_no_opt): ...new pass_data instance and...
	(make_pass_df_initialize_no_opt): ...new function.
	(pass_df_finish): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_df_finish): ...new pass_data instance and...
	(make_pass_df_finish): ...new function.
	* dse.c (pass_rtl_dse1): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_rtl_dse1): ...new pass_data instance and...
	(make_pass_rtl_dse1): ...new function.
	(pass_rtl_dse2): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_rtl_dse2): ...new pass_data instance and...
	(make_pass_rtl_dse2): ...new function.
	* dwarf2cfi.c (pass_dwarf2_frame): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_dwarf2_frame): ...new pass_data instance and...
	(make_pass_dwarf2_frame): ...new function.
	* except.c (pass_set_nothrow_function_flags): Convert from a global
	struct to a subclass of rtl_opt_pass along with...
	(pass_data_set_nothrow_function_flags): ...new pass_data instance
	and...
	(make_pass_set_nothrow_function_flags): ...new function.
	(pass_convert_to_eh_region_ranges): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_convert_to_eh_region_ranges): ...new pass_data instance
	and...
	(make_pass_convert_to_eh_region_ranges): ...new function.
	* final.c (pass_compute_alignments): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_compute_alignments): ...new pass_data instance and...
	(make_pass_compute_alignments): ...new function.
	(pass_final): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_final): ...new pass_data instance and...
	(make_pass_final): ...new function.
	(pass_shorten_branches): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_shorten_branches): ...new pass_data instance and...
	(make_pass_shorten_branches): ...new function.
	(pass_clean_state): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_clean_state): ...new pass_data instance and...
	(make_pass_clean_state): ...new function.
	* function.c (pass_instantiate_virtual_regs): Convert from a global
	struct to a subclass of rtl_opt_pass along with...
	(pass_data_instantiate_virtual_regs): ...new pass_data instance and...
	(make_pass_instantiate_virtual_regs): ...new function.
	(pass_leaf_regs): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_leaf_regs): ...new pass_data instance and...
	(make_pass_leaf_regs): ...new function.
	(pass_thread_prologue_and_epilogue): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_thread_prologue_and_epilogue): ...new pass_data instance
	and...
	(make_pass_thread_prologue_and_epilogue): ...new function.
	(pass_match_asm_constraints): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_match_asm_constraints): ...new pass_data instance and...
	(make_pass_match_asm_constraints): ...new function.
	* fwprop.c (pass_rtl_fwprop): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_rtl_fwprop): ...new pass_data instance and...
	(make_pass_rtl_fwprop): ...new function.
	(pass_rtl_fwprop_addr): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_rtl_fwprop_addr): ...new pass_data instance and...
	(make_pass_rtl_fwprop_addr): ...new function.
	* gcse.c (pass_rtl_pre): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_rtl_pre): ...new pass_data instance and...
	(make_pass_rtl_pre): ...new function.
	(pass_rtl_hoist): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_rtl_hoist): ...new pass_data instance and...
	(make_pass_rtl_hoist): ...new function.
	* gimple-low.c (pass_lower_cf): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_lower_cf): ...new pass_data instance and...
	(make_pass_lower_cf): ...new function.
	* gimple-ssa-strength-reduction.c (pass_strength_reduction): Convert
	from a global struct to a subclass of gimple_opt_pass along with...
	(pass_data_strength_reduction): ...new pass_data instance and...
	(make_pass_strength_reduction): ...new function.
	* ifcvt.c (pass_rtl_ifcvt): Convert from a global struct to a subclass
	of rtl_opt_pass along with...
	(pass_data_rtl_ifcvt): ...new pass_data instance and...
	(make_pass_rtl_ifcvt): ...new function.
	(pass_if_after_combine): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_if_after_combine): ...new pass_data instance and...
	(make_pass_if_after_combine): ...new function.
	(pass_if_after_reload): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_if_after_reload): ...new pass_data instance and...
	(make_pass_if_after_reload): ...new function.
	* init-regs.c (pass_initialize_regs): Convert from a global struct to
	a subclass of rtl_opt_pass along with...
	(pass_data_initialize_regs): ...new pass_data instance and...
	(make_pass_initialize_regs): ...new function.
	* ipa-cp.c (pass_ipa_cp): Convert from a global struct to a subclass
	of ipa_opt_pass_d along with...
	(pass_data_ipa_cp): ...new pass_data instance and...
	(make_pass_ipa_cp): ...new function.
	* ipa-inline-analysis.c (pass_inline_parameters): Convert from a
	global struct to a subclass of gimple_opt_pass along with...
	(pass_data_inline_parameters): ...new pass_data instance and...
	(make_pass_inline_parameters): ...new function.
	* ipa-inline.c (pass_early_inline): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_early_inline): ...new pass_data instance and...
	(make_pass_early_inline): ...new function.
	(pass_ipa_inline): Convert from a global struct to a subclass of
	ipa_opt_pass_d along with...
	(pass_data_ipa_inline): ...new pass_data instance and...
	(make_pass_ipa_inline): ...new function.
	* ipa-pure-const.c (pass_local_pure_const): Convert from a global
	struct to a subclass of gimple_opt_pass along with...
	(pass_data_local_pure_const): ...new pass_data instance and...
	(make_pass_local_pure_const): ...new function.
	(pass_ipa_pure_const): Convert from a global struct to a subclass of
	ipa_opt_pass_d along with...
	(pass_data_ipa_pure_const): ...new pass_data instance and...
	(make_pass_ipa_pure_const): ...new function.
	* ipa-reference.c (pass_ipa_reference): Convert from a global struct
	to a subclass of ipa_opt_pass_d along with...
	(pass_data_ipa_reference): ...new pass_data instance and...
	(make_pass_ipa_reference): ...new function.
	* ipa-split.c (pass_split_functions): Convert from a global struct to
	a subclass of gimple_opt_pass along with...
	(pass_data_split_functions): ...new pass_data instance and...
	(make_pass_split_functions): ...new function.
	(pass_feedback_split_functions): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_feedback_split_functions): ...new pass_data instance and...
	(make_pass_feedback_split_functions): ...new function.
	* ipa.c (pass_ipa_function_and_variable_visibility): Convert from a
	global struct to a subclass of simple_ipa_opt_pass along with...
	(pass_data_ipa_function_and_variable_visibility): ...new pass_data
	instance and...
	(make_pass_ipa_function_and_variable_visibility): ...new function.
	(pass_ipa_free_inline_summary): Convert from a global struct to a
	subclass of simple_ipa_opt_pass along with...
	(pass_data_ipa_free_inline_summary): ...new pass_data instance and...
	(make_pass_ipa_free_inline_summary): ...new function.
	(pass_ipa_whole_program_visibility): Convert from a global struct to a
	subclass of ipa_opt_pass_d along with...
	(pass_data_ipa_whole_program_visibility): ...new pass_data instance
	and...
	(make_pass_ipa_whole_program_visibility): ...new function.
	(pass_ipa_profile): Convert from a global struct to a subclass of
	ipa_opt_pass_d along with...
	(pass_data_ipa_profile): ...new pass_data instance and...
	(make_pass_ipa_profile): ...new function.
	(pass_ipa_cdtor_merge): Convert from a global struct to a subclass of
	ipa_opt_pass_d along with...
	(pass_data_ipa_cdtor_merge): ...new pass_data instance and...
	(make_pass_ipa_cdtor_merge): ...new function.
	* ira.c (pass_ira): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_ira): ...new pass_data instance and...
	(make_pass_ira): ...new function.
	(pass_reload): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_reload): ...new pass_data instance and...
	(make_pass_reload): ...new function.
	* jump.c (pass_cleanup_barriers): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_cleanup_barriers): ...new pass_data instance and...
	(make_pass_cleanup_barriers): ...new function.
	* loop-init.c (pass_loop2): Convert from a global struct to a subclass
	of rtl_opt_pass along with...
	(pass_data_loop2): ...new pass_data instance and...
	(make_pass_loop2): ...new function.
	(pass_rtl_loop_init): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_rtl_loop_init): ...new pass_data instance and...
	(make_pass_rtl_loop_init): ...new function.
	(pass_rtl_loop_done): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_rtl_loop_done): ...new pass_data instance and...
	(make_pass_rtl_loop_done): ...new function.
	(pass_rtl_move_loop_invariants): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_rtl_move_loop_invariants): ...new pass_data instance and...
	(make_pass_rtl_move_loop_invariants): ...new function.
	(pass_rtl_unswitch): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_rtl_unswitch): ...new pass_data instance and...
	(make_pass_rtl_unswitch): ...new function.
	(pass_rtl_unroll_and_peel_loops): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_rtl_unroll_and_peel_loops): ...new pass_data instance
	and...
	(make_pass_rtl_unroll_and_peel_loops): ...new function.
	(pass_rtl_doloop): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_rtl_doloop): ...new pass_data instance and...
	(make_pass_rtl_doloop): ...new function.
	* lower-subreg.c (pass_lower_subreg): Convert from a global struct to
	a subclass of rtl_opt_pass along with...
	(pass_data_lower_subreg): ...new pass_data instance and...
	(make_pass_lower_subreg): ...new function.
	(pass_lower_subreg2): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_lower_subreg2): ...new pass_data instance and...
	(make_pass_lower_subreg2): ...new function.
	* lto-streamer-out.c (pass_ipa_lto_gimple_out): Convert from a global
	struct to a subclass of ipa_opt_pass_d along with...
	(pass_data_ipa_lto_gimple_out): ...new pass_data instance and...
	(make_pass_ipa_lto_gimple_out): ...new function.
	(pass_ipa_lto_finish_out): Convert from a global struct to a subclass
	of ipa_opt_pass_d along with...
	(pass_data_ipa_lto_finish_out): ...new pass_data instance and...
	(make_pass_ipa_lto_finish_out): ...new function.
	* mode-switching.c (pass_mode_switching): Convert from a global struct
	to a subclass of rtl_opt_pass along with...
	(pass_data_mode_switching): ...new pass_data instance and...
	(make_pass_mode_switching): ...new function.
	* modulo-sched.c (pass_sms): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_sms): ...new pass_data instance and...
	(make_pass_sms): ...new function.
	* omp-low.c (pass_expand_omp): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_expand_omp): ...new pass_data instance and...
	(make_pass_expand_omp): ...new function.
	(pass_lower_omp): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_lower_omp): ...new pass_data instance and...
	(make_pass_lower_omp): ...new function.
	(pass_diagnose_omp_blocks): Convert from a global struct to a subclass
	of gimple_opt_pass along with...
	(pass_data_diagnose_omp_blocks): ...new pass_data instance and...
	(make_pass_diagnose_omp_blocks): ...new function.
	* passes.c (pass_early_local_passes): Convert from a global struct to
	a subclass of simple_ipa_opt_pass along with...
	(pass_data_early_local_passes): ...new pass_data instance and...
	(make_pass_early_local_passes): ...new function.
	(pass_all_early_optimizations): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_all_early_optimizations): ...new pass_data instance and...
	(make_pass_all_early_optimizations): ...new function.
	(pass_all_optimizations): Convert from a global struct to a subclass
	of gimple_opt_pass along with...
	(pass_data_all_optimizations): ...new pass_data instance and...
	(make_pass_all_optimizations): ...new function.
	(pass_all_optimizations_g): Convert from a global struct to a subclass
	of gimple_opt_pass along with...
	(pass_data_all_optimizations_g): ...new pass_data instance and...
	(make_pass_all_optimizations_g): ...new function.
	(pass_rest_of_compilation): Convert from a global struct to a subclass
	of rtl_opt_pass along with...
	(pass_data_rest_of_compilation): ...new pass_data instance and...
	(make_pass_rest_of_compilation): ...new function.
	(pass_postreload): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_postreload): ...new pass_data instance and...
	(make_pass_postreload): ...new function.
	* postreload-gcse.c (pass_gcse2): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_gcse2): ...new pass_data instance and...
	(make_pass_gcse2): ...new function.
	* postreload.c (pass_postreload_cse): Convert from a global struct to
	a subclass of rtl_opt_pass along with...
	(pass_data_postreload_cse): ...new pass_data instance and...
	(make_pass_postreload_cse): ...new function.
	* predict.c (pass_profile): Convert from a global struct to a subclass
	of gimple_opt_pass along with...
	(pass_data_profile): ...new pass_data instance and...
	(make_pass_profile): ...new function.
	(pass_strip_predict_hints): Convert from a global struct to a subclass
	of gimple_opt_pass along with...
	(pass_data_strip_predict_hints): ...new pass_data instance and...
	(make_pass_strip_predict_hints): ...new function.
	* recog.c (pass_peephole2): Convert from a global struct to a subclass
	of rtl_opt_pass along with...
	(pass_data_peephole2): ...new pass_data instance and...
	(make_pass_peephole2): ...new function.
	(pass_split_all_insns): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_split_all_insns): ...new pass_data instance and...
	(make_pass_split_all_insns): ...new function.
	(pass_split_after_reload): Convert from a global struct to a subclass
	of rtl_opt_pass along with...
	(pass_data_split_after_reload): ...new pass_data instance and...
	(make_pass_split_after_reload): ...new function.
	(pass_split_before_regstack): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_split_before_regstack): ...new pass_data instance and...
	(make_pass_split_before_regstack): ...new function.
	(pass_split_before_sched2): Convert from a global struct to a subclass
	of rtl_opt_pass along with...
	(pass_data_split_before_sched2): ...new pass_data instance and...
	(make_pass_split_before_sched2): ...new function.
	(pass_split_for_shorten_branches): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_split_for_shorten_branches): ...new pass_data instance
	and...
	(make_pass_split_for_shorten_branches): ...new function.
	* ree.c (pass_ree): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_ree): ...new pass_data instance and...
	(make_pass_ree): ...new function.
	* reg-stack.c (pass_stack_regs): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_stack_regs): ...new pass_data instance and...
	(make_pass_stack_regs): ...new function.
	(pass_stack_regs_run): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_stack_regs_run): ...new pass_data instance and...
	(make_pass_stack_regs_run): ...new function.
	* regcprop.c (pass_cprop_hardreg): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_cprop_hardreg): ...new pass_data instance and...
	(make_pass_cprop_hardreg): ...new function.
	* reginfo.c (pass_reginfo_init): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_reginfo_init): ...new pass_data instance and...
	(make_pass_reginfo_init): ...new function.
	* regmove.c (pass_regmove): Convert from a global struct to a subclass
	of rtl_opt_pass along with...
	(pass_data_regmove): ...new pass_data instance and...
	(make_pass_regmove): ...new function.
	* regrename.c (pass_regrename): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_regrename): ...new pass_data instance and...
	(make_pass_regrename): ...new function.
	* reorg.c (pass_delay_slots): Convert from a global struct to a
	subclass of rtl_opt_pass along with...
	(pass_data_delay_slots): ...new pass_data instance and...
	(make_pass_delay_slots): ...new function.
	(pass_machine_reorg): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_machine_reorg): ...new pass_data instance and...
	(make_pass_machine_reorg): ...new function.
	* sched-rgn.c (pass_sched): Convert from a global struct to a subclass
	of rtl_opt_pass along with...
	(pass_data_sched): ...new pass_data instance and...
	(make_pass_sched): ...new function.
	(pass_sched2): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_sched2): ...new pass_data instance and...
	(make_pass_sched2): ...new function.
	* stack-ptr-mod.c (pass_stack_ptr_mod): Convert from a global struct
	to a subclass of rtl_opt_pass along with...
	(pass_data_stack_ptr_mod): ...new pass_data instance and...
	(make_pass_stack_ptr_mod): ...new function.
	* store-motion.c (pass_rtl_store_motion): Convert from a global struct
	to a subclass of rtl_opt_pass along with...
	(pass_data_rtl_store_motion): ...new pass_data instance and...
	(make_pass_rtl_store_motion): ...new function.
	* tracer.c (pass_tracer): Convert from a global struct to a subclass
	of gimple_opt_pass along with...
	(pass_data_tracer): ...new pass_data instance and...
	(make_pass_tracer): ...new function.
	* trans-mem.c (pass_diagnose_tm_blocks): Convert from a global struct
	to a subclass of gimple_opt_pass along with...
	(pass_data_diagnose_tm_blocks): ...new pass_data instance and...
	(make_pass_diagnose_tm_blocks): ...new function.
	(pass_lower_tm): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_lower_tm): ...new pass_data instance and...
	(make_pass_lower_tm): ...new function.
	(pass_tm_init): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_tm_init): ...new pass_data instance and...
	(make_pass_tm_init): ...new function.
	(pass_tm_mark): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_tm_mark): ...new pass_data instance and...
	(make_pass_tm_mark): ...new function.
	(pass_tm_edges): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_tm_edges): ...new pass_data instance and...
	(make_pass_tm_edges): ...new function.
	(pass_tm_memopt): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_tm_memopt): ...new pass_data instance and...
	(make_pass_tm_memopt): ...new function.
	(pass_ipa_tm): Convert from a global struct to a subclass of
	simple_ipa_opt_pass along with...
	(pass_data_ipa_tm): ...new pass_data instance and...
	(make_pass_ipa_tm): ...new function.
	* tree-call-cdce.c (pass_call_cdce): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_call_cdce): ...new pass_data instance and...
	(make_pass_call_cdce): ...new function.
	* tree-cfg.c (pass_build_cfg): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_build_cfg): ...new pass_data instance and...
	(make_pass_build_cfg): ...new function.
	(pass_split_crit_edges): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_split_crit_edges): ...new pass_data instance and...
	(make_pass_split_crit_edges): ...new function.
	(pass_warn_function_return): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_warn_function_return): ...new pass_data instance and...
	(make_pass_warn_function_return): ...new function.
	(pass_warn_function_noreturn): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_warn_function_noreturn): ...new pass_data instance and...
	(make_pass_warn_function_noreturn): ...new function.
	(pass_warn_unused_result): Convert from a global struct to a subclass
	of gimple_opt_pass along with...
	(pass_data_warn_unused_result): ...new pass_data instance and...
	(make_pass_warn_unused_result): ...new function.
	* tree-cfgcleanup.c (pass_merge_phi): Convert from a global struct to
	a subclass of gimple_opt_pass along with...
	(pass_data_merge_phi): ...new pass_data instance and...
	(make_pass_merge_phi): ...new function.
	* tree-complex.c (pass_lower_complex): Convert from a global struct to
	a subclass of gimple_opt_pass along with...
	(pass_data_lower_complex): ...new pass_data instance and...
	(make_pass_lower_complex): ...new function.
	(pass_lower_complex_O0): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_lower_complex_O0): ...new pass_data instance and...
	(make_pass_lower_complex_O0): ...new function.
	* tree-eh.c (pass_lower_eh): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_lower_eh): ...new pass_data instance and...
	(make_pass_lower_eh): ...new function.
	(pass_refactor_eh): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_refactor_eh): ...new pass_data instance and...
	(make_pass_refactor_eh): ...new function.
	(pass_lower_resx): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_lower_resx): ...new pass_data instance and...
	(make_pass_lower_resx): ...new function.
	(pass_lower_eh_dispatch): Convert from a global struct to a subclass
	of gimple_opt_pass along with...
	(pass_data_lower_eh_dispatch): ...new pass_data instance and...
	(make_pass_lower_eh_dispatch): ...new function.
	(pass_cleanup_eh): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_cleanup_eh): ...new pass_data instance and...
	(make_pass_cleanup_eh): ...new function.
	* tree-emutls.c (pass_ipa_lower_emutls): Convert from a global struct
	to a subclass of simple_ipa_opt_pass along with...
	(pass_data_ipa_lower_emutls): ...new pass_data instance and...
	(make_pass_ipa_lower_emutls): ...new function.
	* tree-if-conv.c (pass_if_conversion): Convert from a global struct to
	a subclass of gimple_opt_pass along with...
	(pass_data_if_conversion): ...new pass_data instance and...
	(make_pass_if_conversion): ...new function.
	* tree-into-ssa.c (pass_build_ssa): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_build_ssa): ...new pass_data instance and...
	(make_pass_build_ssa): ...new function.
	* tree-loop-distribution.c (pass_loop_distribution): Convert from a
	global struct to a subclass of gimple_opt_pass along with...
	(pass_data_loop_distribution): ...new pass_data instance and...
	(make_pass_loop_distribution): ...new function.
	* tree-mudflap.c (pass_mudflap_1): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_mudflap_1): ...new pass_data instance and...
	(make_pass_mudflap_1): ...new function.
	(pass_mudflap_2): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_mudflap_2): ...new pass_data instance and...
	(make_pass_mudflap_2): ...new function.
	* tree-nomudflap.c (pass_mudflap_1): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_mudflap_1): ...new pass_data instance and...
	(make_pass_mudflap_1): ...new function.
	(pass_mudflap_2): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_mudflap_2): ...new pass_data instance and...
	(make_pass_mudflap_2): ...new function.
	* tree-nrv.c (pass_nrv): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_nrv): ...new pass_data instance and...
	(make_pass_nrv): ...new function.
	(pass_return_slot): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_return_slot): ...new pass_data instance and...
	(make_pass_return_slot): ...new function.
	* tree-object-size.c (pass_object_sizes): Convert from a global struct
	to a subclass of gimple_opt_pass along with...
	(pass_data_object_sizes): ...new pass_data instance and...
	(make_pass_object_sizes): ...new function.
	* tree-optimize.c (pass_cleanup_cfg_post_optimizing): Convert from a
	global struct to a subclass of gimple_opt_pass along with...
	(pass_data_cleanup_cfg_post_optimizing): ...new pass_data instance
	and...
	(make_pass_cleanup_cfg_post_optimizing): ...new function.
	(pass_fixup_cfg): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_fixup_cfg): ...new pass_data instance and...
	(make_pass_fixup_cfg): ...new function.
	* tree-pass.h (pass_mudflap_1): Replace declaration with that of...
	(make_pass_mudflap_1): ...new function.
	(pass_mudflap_2): Replace declaration with that of...
	(make_pass_mudflap_2): ...new function.
	(pass_asan): Replace declaration with that of...
	(make_pass_asan): ...new function.
	(pass_asan_O0): Replace declaration with that of...
	(make_pass_asan_O0): ...new function.
	(pass_tsan): Replace declaration with that of...
	(make_pass_tsan): ...new function.
	(pass_tsan_O0): Replace declaration with that of...
	(make_pass_tsan_O0): ...new function.
	(pass_lower_cf): Replace declaration with that of...
	(make_pass_lower_cf): ...new function.
	(pass_refactor_eh): Replace declaration with that of...
	(make_pass_refactor_eh): ...new function.
	(pass_lower_eh): Replace declaration with that of...
	(make_pass_lower_eh): ...new function.
	(pass_lower_eh_dispatch): Replace declaration with that of...
	(make_pass_lower_eh_dispatch): ...new function.
	(pass_lower_resx): Replace declaration with that of...
	(make_pass_lower_resx): ...new function.
	(pass_build_cfg): Replace declaration with that of...
	(make_pass_build_cfg): ...new function.
	(pass_early_tree_profile): Replace declaration with that of...
	(make_pass_early_tree_profile): ...new function.
	(pass_cleanup_eh): Replace declaration with that of...
	(make_pass_cleanup_eh): ...new function.
	(pass_sra): Replace declaration with that of...
	(make_pass_sra): ...new function.
	(pass_sra_early): Replace declaration with that of...
	(make_pass_sra_early): ...new function.
	(pass_early_ipa_sra): Replace declaration with that of...
	(make_pass_early_ipa_sra): ...new function.
	(pass_tail_recursion): Replace declaration with that of...
	(make_pass_tail_recursion): ...new function.
	(pass_tail_calls): Replace declaration with that of...
	(make_pass_tail_calls): ...new function.
	(pass_tree_loop): Replace declaration with that of...
	(make_pass_tree_loop): ...new function.
	(pass_tree_loop_init): Replace declaration with that of...
	(make_pass_tree_loop_init): ...new function.
	(pass_lim): Replace declaration with that of...
	(make_pass_lim): ...new function.
	(pass_tree_unswitch): Replace declaration with that of...
	(make_pass_tree_unswitch): ...new function.
	(pass_predcom): Replace declaration with that of...
	(make_pass_predcom): ...new function.
	(pass_iv_canon): Replace declaration with that of...
	(make_pass_iv_canon): ...new function.
	(pass_scev_cprop): Replace declaration with that of...
	(make_pass_scev_cprop): ...new function.
	(pass_empty_loop): Replace declaration with that of...
	(make_pass_empty_loop): ...new function.
	(pass_record_bounds): Replace declaration with that of...
	(make_pass_record_bounds): ...new function.
	(pass_graphite): Replace declaration with that of...
	(make_pass_graphite): ...new function.
	(pass_graphite_transforms): Replace declaration with that of...
	(make_pass_graphite_transforms): ...new function.
	(pass_if_conversion): Replace declaration with that of...
	(make_pass_if_conversion): ...new function.
	(pass_loop_distribution): Replace declaration with that of...
	(make_pass_loop_distribution): ...new function.
	(pass_vectorize): Replace declaration with that of...
	(make_pass_vectorize): ...new function.
	(pass_slp_vectorize): Replace declaration with that of...
	(make_pass_slp_vectorize): ...new function.
	(pass_complete_unroll): Replace declaration with that of...
	(make_pass_complete_unroll): ...new function.
	(pass_complete_unrolli): Replace declaration with that of...
	(make_pass_complete_unrolli): ...new function.
	(pass_parallelize_loops): Replace declaration with that of...
	(make_pass_parallelize_loops): ...new function.
	(pass_loop_prefetch): Replace declaration with that of...
	(make_pass_loop_prefetch): ...new function.
	(pass_iv_optimize): Replace declaration with that of...
	(make_pass_iv_optimize): ...new function.
	(pass_tree_loop_done): Replace declaration with that of...
	(make_pass_tree_loop_done): ...new function.
	(pass_ch): Replace declaration with that of...
	(make_pass_ch): ...new function.
	(pass_ccp): Replace declaration with that of...
	(make_pass_ccp): ...new function.
	(pass_phi_only_cprop): Replace declaration with that of...
	(make_pass_phi_only_cprop): ...new function.
	(pass_build_ssa): Replace declaration with that of...
	(make_pass_build_ssa): ...new function.
	(pass_build_alias): Replace declaration with that of...
	(make_pass_build_alias): ...new function.
	(pass_build_ealias): Replace declaration with that of...
	(make_pass_build_ealias): ...new function.
	(pass_dominator): Replace declaration with that of...
	(make_pass_dominator): ...new function.
	(pass_dce): Replace declaration with that of...
	(make_pass_dce): ...new function.
	(pass_dce_loop): Replace declaration with that of...
	(make_pass_dce_loop): ...new function.
	(pass_cd_dce): Replace declaration with that of...
	(make_pass_cd_dce): ...new function.
	(pass_call_cdce): Replace declaration with that of...
	(make_pass_call_cdce): ...new function.
	(pass_merge_phi): Replace declaration with that of...
	(make_pass_merge_phi): ...new function.
	(pass_split_crit_edges): Replace declaration with that of...
	(make_pass_split_crit_edges): ...new function.
	(pass_pre): Replace declaration with that of...
	(make_pass_pre): ...new function.
	(pass_profile): Replace declaration with that of...
	(make_pass_profile): ...new function.
	(pass_strip_predict_hints): Replace declaration with that of...
	(make_pass_strip_predict_hints): ...new function.
	(pass_lower_complex_O0): Replace declaration with that of...
	(make_pass_lower_complex_O0): ...new function.
	(pass_lower_complex): Replace declaration with that of...
	(make_pass_lower_complex): ...new function.
	(pass_lower_vector): Replace declaration with that of...
	(make_pass_lower_vector): ...new function.
	(pass_lower_vector_ssa): Replace declaration with that of...
	(make_pass_lower_vector_ssa): ...new function.
	(pass_lower_omp): Replace declaration with that of...
	(make_pass_lower_omp): ...new function.
	(pass_diagnose_omp_blocks): Replace declaration with that of...
	(make_pass_diagnose_omp_blocks): ...new function.
	(pass_expand_omp): Replace declaration with that of...
	(make_pass_expand_omp): ...new function.
	(pass_expand_omp_ssa): Replace declaration with that of...
	(make_pass_expand_omp_ssa): ...new function.
	(pass_object_sizes): Replace declaration with that of...
	(make_pass_object_sizes): ...new function.
	(pass_strlen): Replace declaration with that of...
	(make_pass_strlen): ...new function.
	(pass_fold_builtins): Replace declaration with that of...
	(make_pass_fold_builtins): ...new function.
	(pass_stdarg): Replace declaration with that of...
	(make_pass_stdarg): ...new function.
	(pass_early_warn_uninitialized): Replace declaration with that of...
	(make_pass_early_warn_uninitialized): ...new function.
	(pass_late_warn_uninitialized): Replace declaration with that of...
	(make_pass_late_warn_uninitialized): ...new function.
	(pass_cse_reciprocals): Replace declaration with that of...
	(make_pass_cse_reciprocals): ...new function.
	(pass_cse_sincos): Replace declaration with that of...
	(make_pass_cse_sincos): ...new function.
	(pass_optimize_bswap): Replace declaration with that of...
	(make_pass_optimize_bswap): ...new function.
	(pass_optimize_widening_mul): Replace declaration with that of...
	(make_pass_optimize_widening_mul): ...new function.
	(pass_warn_function_return): Replace declaration with that of...
	(make_pass_warn_function_return): ...new function.
	(pass_warn_function_noreturn): Replace declaration with that of...
	(make_pass_warn_function_noreturn): ...new function.
	(pass_cselim): Replace declaration with that of...
	(make_pass_cselim): ...new function.
	(pass_phiopt): Replace declaration with that of...
	(make_pass_phiopt): ...new function.
	(pass_forwprop): Replace declaration with that of...
	(make_pass_forwprop): ...new function.
	(pass_phiprop): Replace declaration with that of...
	(make_pass_phiprop): ...new function.
	(pass_tree_ifcombine): Replace declaration with that of...
	(make_pass_tree_ifcombine): ...new function.
	(pass_dse): Replace declaration with that of...
	(make_pass_dse): ...new function.
	(pass_nrv): Replace declaration with that of...
	(make_pass_nrv): ...new function.
	(pass_rename_ssa_copies): Replace declaration with that of...
	(make_pass_rename_ssa_copies): ...new function.
	(pass_sink_code): Replace declaration with that of...
	(make_pass_sink_code): ...new function.
	(pass_fre): Replace declaration with that of...
	(make_pass_fre): ...new function.
	(pass_check_data_deps): Replace declaration with that of...
	(make_pass_check_data_deps): ...new function.
	(pass_copy_prop): Replace declaration with that of...
	(make_pass_copy_prop): ...new function.
	(pass_vrp): Replace declaration with that of...
	(make_pass_vrp): ...new function.
	(pass_uncprop): Replace declaration with that of...
	(make_pass_uncprop): ...new function.
	(pass_return_slot): Replace declaration with that of...
	(make_pass_return_slot): ...new function.
	(pass_reassoc): Replace declaration with that of...
	(make_pass_reassoc): ...new function.
	(pass_rebuild_cgraph_edges): Replace declaration with that of...
	(make_pass_rebuild_cgraph_edges): ...new function.
	(pass_remove_cgraph_callee_edges): Replace declaration with that of...
	(make_pass_remove_cgraph_callee_edges): ...new function.
	(pass_build_cgraph_edges): Replace declaration with that of...
	(make_pass_build_cgraph_edges): ...new function.
	(pass_local_pure_const): Replace declaration with that of...
	(make_pass_local_pure_const): ...new function.
	(pass_tracer): Replace declaration with that of...
	(make_pass_tracer): ...new function.
	(pass_warn_unused_result): Replace declaration with that of...
	(make_pass_warn_unused_result): ...new function.
	(pass_diagnose_tm_blocks): Replace declaration with that of...
	(make_pass_diagnose_tm_blocks): ...new function.
	(pass_lower_tm): Replace declaration with that of...
	(make_pass_lower_tm): ...new function.
	(pass_tm_init): Replace declaration with that of...
	(make_pass_tm_init): ...new function.
	(pass_tm_mark): Replace declaration with that of...
	(make_pass_tm_mark): ...new function.
	(pass_tm_memopt): Replace declaration with that of...
	(make_pass_tm_memopt): ...new function.
	(pass_tm_edges): Replace declaration with that of...
	(make_pass_tm_edges): ...new function.
	(pass_split_functions): Replace declaration with that of...
	(make_pass_split_functions): ...new function.
	(pass_feedback_split_functions): Replace declaration with that of...
	(make_pass_feedback_split_functions): ...new function.
	(pass_strength_reduction): Replace declaration with that of...
	(make_pass_strength_reduction): ...new function.
	(pass_ipa_lower_emutls): Replace declaration with that of...
	(make_pass_ipa_lower_emutls): ...new function.
	(pass_ipa_function_and_variable_visibility): Replace declaration with
	that of...
	(make_pass_ipa_function_and_variable_visibility): ...new function.
	(pass_ipa_tree_profile): Replace declaration with that of...
	(make_pass_ipa_tree_profile): ...new function.
	(pass_early_local_passes): Replace declaration with that of...
	(make_pass_early_local_passes): ...new function.
	(pass_ipa_whole_program_visibility): Replace declaration with that
	of...
	(make_pass_ipa_whole_program_visibility): ...new function.
	(pass_ipa_lto_gimple_out): Replace declaration with that of...
	(make_pass_ipa_lto_gimple_out): ...new function.
	(pass_ipa_increase_alignment): Replace declaration with that of...
	(make_pass_ipa_increase_alignment): ...new function.
	(pass_ipa_inline): Replace declaration with that of...
	(make_pass_ipa_inline): ...new function.
	(pass_ipa_free_lang_data): Replace declaration with that of...
	(make_pass_ipa_free_lang_data): ...new function.
	(pass_ipa_free_inline_summary): Replace declaration with that of...
	(make_pass_ipa_free_inline_summary): ...new function.
	(pass_ipa_cp): Replace declaration with that of...
	(make_pass_ipa_cp): ...new function.
	(pass_ipa_reference): Replace declaration with that of...
	(make_pass_ipa_reference): ...new function.
	(pass_ipa_pure_const): Replace declaration with that of...
	(make_pass_ipa_pure_const): ...new function.
	(pass_ipa_pta): Replace declaration with that of...
	(make_pass_ipa_pta): ...new function.
	(pass_ipa_lto_finish_out): Replace declaration with that of...
	(make_pass_ipa_lto_finish_out): ...new function.
	(pass_ipa_tm): Replace declaration with that of...
	(make_pass_ipa_tm): ...new function.
	(pass_ipa_profile): Replace declaration with that of...
	(make_pass_ipa_profile): ...new function.
	(pass_ipa_cdtor_merge): Replace declaration with that of...
	(make_pass_ipa_cdtor_merge): ...new function.
	(pass_cleanup_cfg_post_optimizing): Replace declaration with that
	of...
	(make_pass_cleanup_cfg_post_optimizing): ...new function.
	(pass_init_datastructures): Replace declaration with that of...
	(make_pass_init_datastructures): ...new function.
	(pass_fixup_cfg): Replace declaration with that of...
	(make_pass_fixup_cfg): ...new function.
	(pass_expand): Replace declaration with that of...
	(make_pass_expand): ...new function.
	(pass_instantiate_virtual_regs): Replace declaration with that of...
	(make_pass_instantiate_virtual_regs): ...new function.
	(pass_rtl_fwprop): Replace declaration with that of...
	(make_pass_rtl_fwprop): ...new function.
	(pass_rtl_fwprop_addr): Replace declaration with that of...
	(make_pass_rtl_fwprop_addr): ...new function.
	(pass_jump): Replace declaration with that of...
	(make_pass_jump): ...new function.
	(pass_jump2): Replace declaration with that of...
	(make_pass_jump2): ...new function.
	(pass_lower_subreg): Replace declaration with that of...
	(make_pass_lower_subreg): ...new function.
	(pass_cse): Replace declaration with that of...
	(make_pass_cse): ...new function.
	(pass_fast_rtl_dce): Replace declaration with that of...
	(make_pass_fast_rtl_dce): ...new function.
	(pass_ud_rtl_dce): Replace declaration with that of...
	(make_pass_ud_rtl_dce): ...new function.
	(pass_rtl_dce): Replace declaration with that of...
	(make_pass_rtl_dce): ...new function.
	(pass_rtl_dse1): Replace declaration with that of...
	(make_pass_rtl_dse1): ...new function.
	(pass_rtl_dse2): Replace declaration with that of...
	(make_pass_rtl_dse2): ...new function.
	(pass_rtl_dse3): Replace declaration with that of...
	(make_pass_rtl_dse3): ...new function.
	(pass_rtl_cprop): Replace declaration with that of...
	(make_pass_rtl_cprop): ...new function.
	(pass_rtl_pre): Replace declaration with that of...
	(make_pass_rtl_pre): ...new function.
	(pass_rtl_hoist): Replace declaration with that of...
	(make_pass_rtl_hoist): ...new function.
	(pass_rtl_store_motion): Replace declaration with that of...
	(make_pass_rtl_store_motion): ...new function.
	(pass_cse_after_global_opts): Replace declaration with that of...
	(make_pass_cse_after_global_opts): ...new function.
	(pass_rtl_ifcvt): Replace declaration with that of...
	(make_pass_rtl_ifcvt): ...new function.
	(pass_into_cfg_layout_mode): Replace declaration with that of...
	(make_pass_into_cfg_layout_mode): ...new function.
	(pass_outof_cfg_layout_mode): Replace declaration with that of...
	(make_pass_outof_cfg_layout_mode): ...new function.
	(pass_loop2): Replace declaration with that of...
	(make_pass_loop2): ...new function.
	(pass_rtl_loop_init): Replace declaration with that of...
	(make_pass_rtl_loop_init): ...new function.
	(pass_rtl_move_loop_invariants): Replace declaration with that of...
	(make_pass_rtl_move_loop_invariants): ...new function.
	(pass_rtl_unswitch): Replace declaration with that of...
	(make_pass_rtl_unswitch): ...new function.
	(pass_rtl_unroll_and_peel_loops): Replace declaration with that of...
	(make_pass_rtl_unroll_and_peel_loops): ...new function.
	(pass_rtl_doloop): Replace declaration with that of...
	(make_pass_rtl_doloop): ...new function.
	(pass_rtl_loop_done): Replace declaration with that of...
	(make_pass_rtl_loop_done): ...new function.
	(pass_web): Replace declaration with that of...
	(make_pass_web): ...new function.
	(pass_cse2): Replace declaration with that of...
	(make_pass_cse2): ...new function.
	(pass_df_initialize_opt): Replace declaration with that of...
	(make_pass_df_initialize_opt): ...new function.
	(pass_df_initialize_no_opt): Replace declaration with that of...
	(make_pass_df_initialize_no_opt): ...new function.
	(pass_reginfo_init): Replace declaration with that of...
	(make_pass_reginfo_init): ...new function.
	(pass_inc_dec): Replace declaration with that of...
	(make_pass_inc_dec): ...new function.
	(pass_stack_ptr_mod): Replace declaration with that of...
	(make_pass_stack_ptr_mod): ...new function.
	(pass_initialize_regs): Replace declaration with that of...
	(make_pass_initialize_regs): ...new function.
	(pass_combine): Replace declaration with that of...
	(make_pass_combine): ...new function.
	(pass_if_after_combine): Replace declaration with that of...
	(make_pass_if_after_combine): ...new function.
	(pass_ree): Replace declaration with that of...
	(make_pass_ree): ...new function.
	(pass_partition_blocks): Replace declaration with that of...
	(make_pass_partition_blocks): ...new function.
	(pass_match_asm_constraints): Replace declaration with that of...
	(make_pass_match_asm_constraints): ...new function.
	(pass_regmove): Replace declaration with that of...
	(make_pass_regmove): ...new function.
	(pass_split_all_insns): Replace declaration with that of...
	(make_pass_split_all_insns): ...new function.
	(pass_fast_rtl_byte_dce): Replace declaration with that of...
	(make_pass_fast_rtl_byte_dce): ...new function.
	(pass_lower_subreg2): Replace declaration with that of...
	(make_pass_lower_subreg2): ...new function.
	(pass_mode_switching): Replace declaration with that of...
	(make_pass_mode_switching): ...new function.
	(pass_sms): Replace declaration with that of...
	(make_pass_sms): ...new function.
	(pass_sched): Replace declaration with that of...
	(make_pass_sched): ...new function.
	(pass_ira): Replace declaration with that of...
	(make_pass_ira): ...new function.
	(pass_reload): Replace declaration with that of...
	(make_pass_reload): ...new function.
	(pass_clean_state): Replace declaration with that of...
	(make_pass_clean_state): ...new function.
	(pass_branch_prob): Replace declaration with that of...
	(make_pass_branch_prob): ...new function.
	(pass_value_profile_transformations): Replace declaration with that
	of...
	(make_pass_value_profile_transformations): ...new function.
	(pass_postreload_cse): Replace declaration with that of...
	(make_pass_postreload_cse): ...new function.
	(pass_gcse2): Replace declaration with that of...
	(make_pass_gcse2): ...new function.
	(pass_split_after_reload): Replace declaration with that of...
	(make_pass_split_after_reload): ...new function.
	(pass_branch_target_load_optimize1): Replace declaration with that
	of...
	(make_pass_branch_target_load_optimize1): ...new function.
	(pass_thread_prologue_and_epilogue): Replace declaration with that
	of...
	(make_pass_thread_prologue_and_epilogue): ...new function.
	(pass_stack_adjustments): Replace declaration with that of...
	(make_pass_stack_adjustments): ...new function.
	(pass_peephole2): Replace declaration with that of...
	(make_pass_peephole2): ...new function.
	(pass_if_after_reload): Replace declaration with that of...
	(make_pass_if_after_reload): ...new function.
	(pass_regrename): Replace declaration with that of...
	(make_pass_regrename): ...new function.
	(pass_cprop_hardreg): Replace declaration with that of...
	(make_pass_cprop_hardreg): ...new function.
	(pass_reorder_blocks): Replace declaration with that of...
	(make_pass_reorder_blocks): ...new function.
	(pass_branch_target_load_optimize2): Replace declaration with that
	of...
	(make_pass_branch_target_load_optimize2): ...new function.
	(pass_leaf_regs): Replace declaration with that of...
	(make_pass_leaf_regs): ...new function.
	(pass_split_before_sched2): Replace declaration with that of...
	(make_pass_split_before_sched2): ...new function.
	(pass_compare_elim_after_reload): Replace declaration with that of...
	(make_pass_compare_elim_after_reload): ...new function.
	(pass_sched2): Replace declaration with that of...
	(make_pass_sched2): ...new function.
	(pass_stack_regs): Replace declaration with that of...
	(make_pass_stack_regs): ...new function.
	(pass_stack_regs_run): Replace declaration with that of...
	(make_pass_stack_regs_run): ...new function.
	(pass_df_finish): Replace declaration with that of...
	(make_pass_df_finish): ...new function.
	(pass_compute_alignments): Replace declaration with that of...
	(make_pass_compute_alignments): ...new function.
	(pass_duplicate_computed_gotos): Replace declaration with that of...
	(make_pass_duplicate_computed_gotos): ...new function.
	(pass_variable_tracking): Replace declaration with that of...
	(make_pass_variable_tracking): ...new function.
	(pass_free_cfg): Replace declaration with that of...
	(make_pass_free_cfg): ...new function.
	(pass_machine_reorg): Replace declaration with that of...
	(make_pass_machine_reorg): ...new function.
	(pass_cleanup_barriers): Replace declaration with that of...
	(make_pass_cleanup_barriers): ...new function.
	(pass_delay_slots): Replace declaration with that of...
	(make_pass_delay_slots): ...new function.
	(pass_split_for_shorten_branches): Replace declaration with that of...
	(make_pass_split_for_shorten_branches): ...new function.
	(pass_split_before_regstack): Replace declaration with that of...
	(make_pass_split_before_regstack): ...new function.
	(pass_convert_to_eh_region_ranges): Replace declaration with that
	of...
	(make_pass_convert_to_eh_region_ranges): ...new function.
	(pass_shorten_branches): Replace declaration with that of...
	(make_pass_shorten_branches): ...new function.
	(pass_set_nothrow_function_flags): Replace declaration with that of...
	(make_pass_set_nothrow_function_flags): ...new function.
	(pass_dwarf2_frame): Replace declaration with that of...
	(make_pass_dwarf2_frame): ...new function.
	(pass_final): Replace declaration with that of...
	(make_pass_final): ...new function.
	(pass_rtl_seqabstr): Replace declaration with that of...
	(make_pass_rtl_seqabstr): ...new function.
	(pass_release_ssa_names): Replace declaration with that of...
	(make_pass_release_ssa_names): ...new function.
	(pass_early_inline): Replace declaration with that of...
	(make_pass_early_inline): ...new function.
	(pass_inline_parameters): Replace declaration with that of...
	(make_pass_inline_parameters): ...new function.
	(pass_update_address_taken): Replace declaration with that of...
	(make_pass_update_address_taken): ...new function.
	(pass_convert_switch): Replace declaration with that of...
	(make_pass_convert_switch): ...new function.
	* tree-profile.c (pass_ipa_tree_profile): Convert from a global struct
	to a subclass of simple_ipa_opt_pass along with...
	(pass_data_ipa_tree_profile): ...new pass_data instance and...
	(make_pass_ipa_tree_profile): ...new function.
	* tree-sra.c (pass_sra_early): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_sra_early): ...new pass_data instance and...
	(make_pass_sra_early): ...new function.
	(pass_sra): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_sra): ...new pass_data instance and...
	(make_pass_sra): ...new function.
	(pass_early_ipa_sra): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_early_ipa_sra): ...new pass_data instance and...
	(make_pass_early_ipa_sra): ...new function.
	* tree-ssa-ccp.c (pass_ccp): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_ccp): ...new pass_data instance and...
	(make_pass_ccp): ...new function.
	(pass_fold_builtins): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_fold_builtins): ...new pass_data instance and...
	(make_pass_fold_builtins): ...new function.
	* tree-ssa-copy.c (pass_copy_prop): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_copy_prop): ...new pass_data instance and...
	(make_pass_copy_prop): ...new function.
	* tree-ssa-copyrename.c (pass_rename_ssa_copies): Convert from a
	global struct to a subclass of gimple_opt_pass along with...
	(pass_data_rename_ssa_copies): ...new pass_data instance and...
	(make_pass_rename_ssa_copies): ...new function.
	* tree-ssa-dce.c (pass_dce): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_dce): ...new pass_data instance and...
	(make_pass_dce): ...new function.
	(pass_dce_loop): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_dce_loop): ...new pass_data instance and...
	(make_pass_dce_loop): ...new function.
	(pass_cd_dce): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_cd_dce): ...new pass_data instance and...
	(make_pass_cd_dce): ...new function.
	* tree-ssa-dom.c (pass_dominator): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_dominator): ...new pass_data instance and...
	(make_pass_dominator): ...new function.
	(pass_phi_only_cprop): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_phi_only_cprop): ...new pass_data instance and...
	(make_pass_phi_only_cprop): ...new function.
	* tree-ssa-dse.c (pass_dse): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_dse): ...new pass_data instance and...
	(make_pass_dse): ...new function.
	* tree-ssa-forwprop.c (pass_forwprop): Convert from a global struct to
	a subclass of gimple_opt_pass along with...
	(pass_data_forwprop): ...new pass_data instance and...
	(make_pass_forwprop): ...new function.
	* tree-ssa-ifcombine.c (pass_tree_ifcombine): Convert from a global
	struct to a subclass of gimple_opt_pass along with...
	(pass_data_tree_ifcombine): ...new pass_data instance and...
	(make_pass_tree_ifcombine): ...new function.
	* tree-ssa-loop-ch.c (pass_ch): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_ch): ...new pass_data instance and...
	(make_pass_ch): ...new function.
	* tree-ssa-loop.c (pass_tree_loop): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_tree_loop): ...new pass_data instance and...
	(make_pass_tree_loop): ...new function.
	(pass_tree_loop_init): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_tree_loop_init): ...new pass_data instance and...
	(make_pass_tree_loop_init): ...new function.
	(pass_lim): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_lim): ...new pass_data instance and...
	(make_pass_lim): ...new function.
	(pass_tree_unswitch): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_tree_unswitch): ...new pass_data instance and...
	(make_pass_tree_unswitch): ...new function.
	(pass_predcom): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_predcom): ...new pass_data instance and...
	(make_pass_predcom): ...new function.
	(pass_vectorize): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_vectorize): ...new pass_data instance and...
	(make_pass_vectorize): ...new function.
	(pass_graphite): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_graphite): ...new pass_data instance and...
	(make_pass_graphite): ...new function.
	(pass_graphite_transforms): Convert from a global struct to a subclass
	of gimple_opt_pass along with...
	(pass_data_graphite_transforms): ...new pass_data instance and...
	(make_pass_graphite_transforms): ...new function.
	(pass_check_data_deps): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_check_data_deps): ...new pass_data instance and...
	(make_pass_check_data_deps): ...new function.
	(pass_iv_canon): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_iv_canon): ...new pass_data instance and...
	(make_pass_iv_canon): ...new function.
	(pass_scev_cprop): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_scev_cprop): ...new pass_data instance and...
	(make_pass_scev_cprop): ...new function.
	(pass_record_bounds): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_record_bounds): ...new pass_data instance and...
	(make_pass_record_bounds): ...new function.
	(pass_complete_unroll): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_complete_unroll): ...new pass_data instance and...
	(make_pass_complete_unroll): ...new function.
	(pass_complete_unrolli): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_complete_unrolli): ...new pass_data instance and...
	(make_pass_complete_unrolli): ...new function.
	(pass_parallelize_loops): Convert from a global struct to a subclass
	of gimple_opt_pass along with...
	(pass_data_parallelize_loops): ...new pass_data instance and...
	(make_pass_parallelize_loops): ...new function.
	(pass_loop_prefetch): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_loop_prefetch): ...new pass_data instance and...
	(make_pass_loop_prefetch): ...new function.
	(pass_iv_optimize): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_iv_optimize): ...new pass_data instance and...
	(make_pass_iv_optimize): ...new function.
	(pass_tree_loop_done): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_tree_loop_done): ...new pass_data instance and...
	(make_pass_tree_loop_done): ...new function.
	* tree-ssa-math-opts.c (pass_cse_reciprocals): Convert from a global
	struct to a subclass of gimple_opt_pass along with...
	(pass_data_cse_reciprocals): ...new pass_data instance and...
	(make_pass_cse_reciprocals): ...new function.
	(pass_cse_sincos): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_cse_sincos): ...new pass_data instance and...
	(make_pass_cse_sincos): ...new function.
	(pass_optimize_bswap): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_optimize_bswap): ...new pass_data instance and...
	(make_pass_optimize_bswap): ...new function.
	(pass_optimize_widening_mul): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_optimize_widening_mul): ...new pass_data instance and...
	(make_pass_optimize_widening_mul): ...new function.
	* tree-ssa-phiopt.c (pass_phiopt): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_phiopt): ...new pass_data instance and...
	(make_pass_phiopt): ...new function.
	(pass_cselim): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_cselim): ...new pass_data instance and...
	(make_pass_cselim): ...new function.
	* tree-ssa-phiprop.c (pass_phiprop): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_phiprop): ...new pass_data instance and...
	(make_pass_phiprop): ...new function.
	* tree-ssa-pre.c (pass_pre): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_pre): ...new pass_data instance and...
	(make_pass_pre): ...new function.
	(pass_fre): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_fre): ...new pass_data instance and...
	(make_pass_fre): ...new function.
	* tree-ssa-reassoc.c (pass_reassoc): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_reassoc): ...new pass_data instance and...
	(make_pass_reassoc): ...new function.
	* tree-ssa-sink.c (pass_sink_code): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_sink_code): ...new pass_data instance and...
	(make_pass_sink_code): ...new function.
	* tree-ssa-strlen.c (pass_strlen): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_strlen): ...new pass_data instance and...
	(make_pass_strlen): ...new function.
	* tree-ssa-structalias.c (pass_build_alias): Convert from a global
	struct to a subclass of gimple_opt_pass along with...
	(pass_data_build_alias): ...new pass_data instance and...
	(make_pass_build_alias): ...new function.
	(pass_build_ealias): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_build_ealias): ...new pass_data instance and...
	(make_pass_build_ealias): ...new function.
	(pass_ipa_pta): Convert from a global struct to a subclass of
	simple_ipa_opt_pass along with...
	(pass_data_ipa_pta): ...new pass_data instance and...
	(make_pass_ipa_pta): ...new function.
	* tree-ssa-uncprop.c (pass_uncprop): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_uncprop): ...new pass_data instance and...
	(make_pass_uncprop): ...new function.
	* tree-ssa-uninit.c (pass_late_warn_uninitialized): Convert from a
	global struct to a subclass of gimple_opt_pass along with...
	(pass_data_late_warn_uninitialized): ...new pass_data instance and...
	(make_pass_late_warn_uninitialized): ...new function.
	* tree-ssa.c (pass_init_datastructures): Convert from a global struct
	to a subclass of gimple_opt_pass along with...
	(pass_data_init_datastructures): ...new pass_data instance and...
	(make_pass_init_datastructures): ...new function.
	(pass_early_warn_uninitialized): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_early_warn_uninitialized): ...new pass_data instance and...
	(make_pass_early_warn_uninitialized): ...new function.
	(pass_update_address_taken): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_update_address_taken): ...new pass_data instance and...
	(make_pass_update_address_taken): ...new function.
	* tree-ssanames.c (pass_release_ssa_names): Convert from a global
	struct to a subclass of gimple_opt_pass along with...
	(pass_data_release_ssa_names): ...new pass_data instance and...
	(make_pass_release_ssa_names): ...new function.
	* tree-stdarg.c (pass_stdarg): Convert from a global struct to a
	subclass of gimple_opt_pass along with...
	(pass_data_stdarg): ...new pass_data instance and...
	(make_pass_stdarg): ...new function.
	* tree-switch-conversion.c (pass_convert_switch): Convert from a
	global struct to a subclass of gimple_opt_pass along with...
	(pass_data_convert_switch): ...new pass_data instance and...
	(make_pass_convert_switch): ...new function.
	* tree-tailcall.c (pass_tail_recursion): Convert from a global struct
	to a subclass of gimple_opt_pass along with...
	(pass_data_tail_recursion): ...new pass_data instance and...
	(make_pass_tail_recursion): ...new function.
	(pass_tail_calls): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_tail_calls): ...new pass_data instance and...
	(make_pass_tail_calls): ...new function.
	* tree-vect-generic.c (pass_lower_vector): Convert from a global
	struct to a subclass of gimple_opt_pass along with...
	(pass_data_lower_vector): ...new pass_data instance and...
	(make_pass_lower_vector): ...new function.
	(pass_lower_vector_ssa): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_lower_vector_ssa): ...new pass_data instance and...
	(make_pass_lower_vector_ssa): ...new function.
	* tree-vectorizer.c (pass_slp_vectorize): Convert from a global struct
	to a subclass of gimple_opt_pass along with...
	(pass_data_slp_vectorize): ...new pass_data instance and...
	(make_pass_slp_vectorize): ...new function.
	(pass_ipa_increase_alignment): Convert from a global struct to a
	subclass of simple_ipa_opt_pass along with...
	(pass_data_ipa_increase_alignment): ...new pass_data instance and...
	(make_pass_ipa_increase_alignment): ...new function.
	* tree-vrp.c (pass_vrp): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_vrp): ...new pass_data instance and...
	(make_pass_vrp): ...new function.
	* tree.c (pass_ipa_free_lang_data): Convert from a global struct to a
	subclass of simple_ipa_opt_pass along with...
	(pass_data_ipa_free_lang_data): ...new pass_data instance and...
	(make_pass_ipa_free_lang_data): ...new function.
	* tsan.c (pass_tsan): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_tsan): ...new pass_data instance and...
	(make_pass_tsan): ...new function.
	(pass_tsan_O0): Convert from a global struct to a subclass of
	gimple_opt_pass along with...
	(pass_data_tsan_O0): ...new pass_data instance and...
	(make_pass_tsan_O0): ...new function.
	* var-tracking.c (pass_variable_tracking): Convert from a global
	struct to a subclass of rtl_opt_pass along with...
	(pass_data_variable_tracking): ...new pass_data instance and...
	(make_pass_variable_tracking): ...new function.
	* web.c (pass_web): Convert from a global struct to a subclass of
	rtl_opt_pass along with...
	(pass_data_web): ...new pass_data instance and...
	(make_pass_web): ...new function.
	* config/epiphany/epiphany.h (pass_mode_switch_use): Replace
	declaration with that of...
	(make_pass_mode_switch_use): ...new function.
	(pass_resolve_sw_modes): Replace declaration with that of...
	(make_pass_resolve_sw_modes): ...new function.
	* config/epiphany/mode-switch-use.c (pass_mode_switch_use): Convert
	from a global struct to a subclass of rtl_opt_pass along with...
	(pass_data_mode_switch_use): ...new pass_data instance and...
	(make_pass_mode_switch_use): ...new function.
	* config/epiphany/resolve-sw-modes.c (pass_resolve_sw_modes): Convert
	from a global struct to a subclass of rtl_opt_pass along with...
	(pass_data_resolve_sw_modes): ...new pass_data instance and...
	(make_pass_resolve_sw_modes): ...new function.
	* config/i386/i386.c (pass_insert_vzeroupper): Convert from a global
	struct to a subclass of rtl_opt_pass along with...
	(pass_data_insert_vzeroupper): ...new pass_data instance and...
	(make_pass_insert_vzeroupper): ...new function.
	* config/sparc/sparc.c (pass_work_around_errata): Convert from a
	global struct to a subclass of rtl_opt_pass along with...
	(pass_data_work_around_errata): ...new pass_data instance and...
	(make_pass_work_around_errata): ...new function.
	* config/mips/mips.c (pass_mips_machine_reorg2): Convert from a global
	struct to a subclass of rtl_opt_pass along with...
	(pass_data_mips_machine_reorg2): ...new pass_data instance and...
	(make_pass_mips_machine_reorg2): ...new function.

gcc/testsuite/

	Patch autogenerated by refactor_passes.py from
	https://github.com/davidmalcolm/gcc-refactoring-scripts
	revision 03fe39476a4c4ea450b49e087cfa817b5f92021e

	* gcc.dg/plugin/one_time_plugin.c (one_pass): Convert from a global
	struct to a subclass of gimple_opt_pass along with...
	(pass_data_one_pass): ...new pass_data instance and...
	(make_one_pass): ...new function.
	* gcc.dg/plugin/selfassign.c (pass_warn_self_assign): Convert from a
	global struct to a subclass of gimple_opt_pass along with...
	(pass_data_warn_self_assign): ...new pass_data instance and...
	(make_pass_warn_self_assign): ...new function.
	* g++.dg/plugin/dumb_plugin.c (pass_dumb_plugin_example): Convert from
	a global struct to a subclass of gimple_opt_pass along with...
	(pass_data_dumb_plugin_example): ...new pass_data instance and...
	(make_pass_dumb_plugin_example): ...new function.
	* g++.dg/plugin/selfassign.c (pass_warn_self_assign): Convert from a
	global struct to a subclass of gimple_opt_pass along with...
	(pass_data_warn_self_assign): ...new pass_data instance and...
	(make_pass_warn_self_assign): ...new function.

From-SVN: r201508
This commit is contained in:
David Malcolm 2013-08-05 20:16:05 +00:00 committed by David Malcolm
parent 6a389ed508
commit 27a4cd485d
119 changed files with 9720 additions and 4274 deletions

File diff suppressed because it is too large Load Diff

View File

@ -2241,52 +2241,89 @@ gate_asan (void)
DECL_ATTRIBUTES (current_function_decl));
}
struct gimple_opt_pass pass_asan =
namespace {
const pass_data pass_data_asan =
{
{
GIMPLE_PASS,
"asan", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_asan, /* gate */
asan_instrument, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
PROP_ssa | PROP_cfg | PROP_gimple_leh,/* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_flow | TODO_verify_stmts
| TODO_update_ssa /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"asan", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
( PROP_ssa | PROP_cfg | PROP_gimple_leh ), /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_verify_flow | TODO_verify_stmts
| TODO_update_ssa ), /* todo_flags_finish */
};
class pass_asan : public gimple_opt_pass
{
public:
pass_asan(gcc::context *ctxt)
: gimple_opt_pass(pass_data_asan, ctxt)
{}
/* opt_pass methods: */
opt_pass * clone () { return new pass_asan (ctxt_); }
bool gate () { return gate_asan (); }
unsigned int execute () { return asan_instrument (); }
}; // class pass_asan
} // anon namespace
gimple_opt_pass *
make_pass_asan (gcc::context *ctxt)
{
return new pass_asan (ctxt);
}
static bool
gate_asan_O0 (void)
{
return !optimize && gate_asan ();
}
struct gimple_opt_pass pass_asan_O0 =
namespace {
const pass_data pass_data_asan_O0 =
{
{
GIMPLE_PASS,
"asan0", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_asan_O0, /* gate */
asan_instrument, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
PROP_ssa | PROP_cfg | PROP_gimple_leh,/* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_flow | TODO_verify_stmts
| TODO_update_ssa /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"asan0", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
( PROP_ssa | PROP_cfg | PROP_gimple_leh ), /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_verify_flow | TODO_verify_stmts
| TODO_update_ssa ), /* todo_flags_finish */
};
class pass_asan_O0 : public gimple_opt_pass
{
public:
pass_asan_O0(gcc::context *ctxt)
: gimple_opt_pass(pass_data_asan_O0, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_asan_O0 (); }
unsigned int execute () { return asan_instrument (); }
}; // class pass_asan_O0
} // anon namespace
gimple_opt_pass *
make_pass_asan_O0 (gcc::context *ctxt)
{
return new pass_asan_O0 (ctxt);
}
#include "gt-asan.h"

View File

@ -1506,22 +1506,40 @@ gate_auto_inc_dec (void)
}
struct rtl_opt_pass pass_inc_dec =
namespace {
const pass_data pass_data_inc_dec =
{
{
RTL_PASS,
"auto_inc_dec", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_auto_inc_dec, /* gate */
rest_of_handle_auto_inc_dec, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_AUTO_INC_DEC, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_df_finish, /* todo_flags_finish */
}
RTL_PASS, /* type */
"auto_inc_dec", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_AUTO_INC_DEC, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_df_finish, /* todo_flags_finish */
};
class pass_inc_dec : public rtl_opt_pass
{
public:
pass_inc_dec(gcc::context *ctxt)
: rtl_opt_pass(pass_data_inc_dec, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_auto_inc_dec (); }
unsigned int execute () { return rest_of_handle_auto_inc_dec (); }
}; // class pass_inc_dec
} // anon namespace
rtl_opt_pass *
make_pass_inc_dec (gcc::context *ctxt)
{
return new pass_inc_dec (ctxt);
}

View File

@ -2179,26 +2179,44 @@ rest_of_handle_reorder_blocks (void)
return 0;
}
struct rtl_opt_pass pass_reorder_blocks =
namespace {
const pass_data pass_data_reorder_blocks =
{
{
RTL_PASS,
"bbro", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_handle_reorder_blocks, /* gate */
rest_of_handle_reorder_blocks, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_REORDER_BLOCKS, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_rtl_sharing, /* todo_flags_finish */
}
RTL_PASS, /* type */
"bbro", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_REORDER_BLOCKS, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_rtl_sharing, /* todo_flags_finish */
};
class pass_reorder_blocks : public rtl_opt_pass
{
public:
pass_reorder_blocks(gcc::context *ctxt)
: rtl_opt_pass(pass_data_reorder_blocks, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_handle_reorder_blocks (); }
unsigned int execute () { return rest_of_handle_reorder_blocks (); }
}; // class pass_reorder_blocks
} // anon namespace
rtl_opt_pass *
make_pass_reorder_blocks (gcc::context *ctxt)
{
return new pass_reorder_blocks (ctxt);
}
/* Duplicate the blocks containing computed gotos. This basically unfactors
computed gotos that were factored early on in the compilation process to
speed up edge based data flow. We used to not unfactoring them again,
@ -2327,26 +2345,44 @@ done:
return 0;
}
struct rtl_opt_pass pass_duplicate_computed_gotos =
namespace {
const pass_data pass_data_duplicate_computed_gotos =
{
{
RTL_PASS,
"compgotos", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_duplicate_computed_gotos, /* gate */
duplicate_computed_gotos, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_REORDER_BLOCKS, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_rtl_sharing,/* todo_flags_finish */
}
RTL_PASS, /* type */
"compgotos", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_REORDER_BLOCKS, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_rtl_sharing, /* todo_flags_finish */
};
class pass_duplicate_computed_gotos : public rtl_opt_pass
{
public:
pass_duplicate_computed_gotos(gcc::context *ctxt)
: rtl_opt_pass(pass_data_duplicate_computed_gotos, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_duplicate_computed_gotos (); }
unsigned int execute () { return duplicate_computed_gotos (); }
}; // class pass_duplicate_computed_gotos
} // anon namespace
rtl_opt_pass *
make_pass_duplicate_computed_gotos (gcc::context *ctxt)
{
return new pass_duplicate_computed_gotos (ctxt);
}
static bool
gate_handle_partition_blocks (void)
{
@ -2533,22 +2569,40 @@ partition_hot_cold_basic_blocks (void)
return TODO_verify_flow | TODO_verify_rtl_sharing;
}
struct rtl_opt_pass pass_partition_blocks =
namespace {
const pass_data pass_data_partition_blocks =
{
{
RTL_PASS,
"bbpart", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_handle_partition_blocks, /* gate */
partition_hot_cold_basic_blocks, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_REORDER_BLOCKS, /* tv_id */
PROP_cfglayout, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
RTL_PASS, /* type */
"bbpart", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_REORDER_BLOCKS, /* tv_id */
PROP_cfglayout, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_partition_blocks : public rtl_opt_pass
{
public:
pass_partition_blocks(gcc::context *ctxt)
: rtl_opt_pass(pass_data_partition_blocks, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_handle_partition_blocks (); }
unsigned int execute () { return partition_hot_cold_basic_blocks (); }
}; // class pass_partition_blocks
} // anon namespace
rtl_opt_pass *
make_pass_partition_blocks (gcc::context *ctxt)
{
return new pass_partition_blocks (ctxt);
}

View File

@ -1504,26 +1504,46 @@ rest_of_handle_branch_target_load_optimize1 (void)
return 0;
}
struct rtl_opt_pass pass_branch_target_load_optimize1 =
namespace {
const pass_data pass_data_branch_target_load_optimize1 =
{
{
RTL_PASS,
"btl1", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_handle_branch_target_load_optimize1, /* gate */
rest_of_handle_branch_target_load_optimize1, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_rtl_sharing, /* todo_flags_finish */
}
RTL_PASS, /* type */
"btl1", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_rtl_sharing, /* todo_flags_finish */
};
class pass_branch_target_load_optimize1 : public rtl_opt_pass
{
public:
pass_branch_target_load_optimize1(gcc::context *ctxt)
: rtl_opt_pass(pass_data_branch_target_load_optimize1, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_handle_branch_target_load_optimize1 (); }
unsigned int execute () {
return rest_of_handle_branch_target_load_optimize1 ();
}
}; // class pass_branch_target_load_optimize1
} // anon namespace
rtl_opt_pass *
make_pass_branch_target_load_optimize1 (gcc::context *ctxt)
{
return new pass_branch_target_load_optimize1 (ctxt);
}
static bool
gate_handle_branch_target_load_optimize2 (void)
{
@ -1553,22 +1573,42 @@ rest_of_handle_branch_target_load_optimize2 (void)
return 0;
}
struct rtl_opt_pass pass_branch_target_load_optimize2 =
namespace {
const pass_data pass_data_branch_target_load_optimize2 =
{
{
RTL_PASS,
"btl2", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_handle_branch_target_load_optimize2, /* gate */
rest_of_handle_branch_target_load_optimize2, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
}
RTL_PASS, /* type */
"btl2", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_branch_target_load_optimize2 : public rtl_opt_pass
{
public:
pass_branch_target_load_optimize2(gcc::context *ctxt)
: rtl_opt_pass(pass_data_branch_target_load_optimize2, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_handle_branch_target_load_optimize2 (); }
unsigned int execute () {
return rest_of_handle_branch_target_load_optimize2 ();
}
}; // class pass_branch_target_load_optimize2
} // anon namespace
rtl_opt_pass *
make_pass_branch_target_load_optimize2 (gcc::context *ctxt)
{
return new pass_branch_target_load_optimize2 (ctxt);
}

View File

@ -3040,25 +3040,42 @@ execute_jump (void)
return 0;
}
struct rtl_opt_pass pass_jump =
namespace {
const pass_data pass_data_jump =
{
{
RTL_PASS,
"jump", /* name */
OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
execute_jump, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_JUMP, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_rtl_sharing, /* todo_flags_finish */
}
RTL_PASS, /* type */
"jump", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_JUMP, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_rtl_sharing, /* todo_flags_finish */
};
class pass_jump : public rtl_opt_pass
{
public:
pass_jump(gcc::context *ctxt)
: rtl_opt_pass(pass_data_jump, ctxt)
{}
/* opt_pass methods: */
unsigned int execute () { return execute_jump (); }
}; // class pass_jump
} // anon namespace
rtl_opt_pass *
make_pass_jump (gcc::context *ctxt)
{
return new pass_jump (ctxt);
}
static unsigned int
execute_jump2 (void)
@ -3067,22 +3084,39 @@ execute_jump2 (void)
return 0;
}
struct rtl_opt_pass pass_jump2 =
namespace {
const pass_data pass_data_jump2 =
{
{
RTL_PASS,
"jump2", /* name */
OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
execute_jump2, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_JUMP, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_rtl_sharing, /* todo_flags_finish */
}
RTL_PASS, /* type */
"jump2", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_JUMP, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_rtl_sharing, /* todo_flags_finish */
};
class pass_jump2 : public rtl_opt_pass
{
public:
pass_jump2(gcc::context *ctxt)
: rtl_opt_pass(pass_data_jump2, ctxt)
{}
/* opt_pass methods: */
unsigned int execute () { return execute_jump2 (); }
}; // class pass_jump2
} // anon namespace
rtl_opt_pass *
make_pass_jump2 (gcc::context *ctxt)
{
return new pass_jump2 (ctxt);
}

View File

@ -4906,25 +4906,42 @@ gimple_expand_cfg (void)
return 0;
}
struct rtl_opt_pass pass_expand =
namespace {
const pass_data pass_data_expand =
{
{
RTL_PASS,
"expand", /* name */
OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
gimple_expand_cfg, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_EXPAND, /* tv_id */
PROP_ssa | PROP_gimple_leh | PROP_cfg
RTL_PASS, /* type */
"expand", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_EXPAND, /* tv_id */
( PROP_ssa | PROP_gimple_leh | PROP_cfg
| PROP_gimple_lcx
| PROP_gimple_lvec, /* properties_required */
PROP_rtl, /* properties_provided */
PROP_ssa | PROP_trees, /* properties_destroyed */
TODO_verify_ssa | TODO_verify_flow
| TODO_verify_stmts, /* todo_flags_start */
0 /* todo_flags_finish */
}
| PROP_gimple_lvec ), /* properties_required */
PROP_rtl, /* properties_provided */
( PROP_ssa | PROP_trees ), /* properties_destroyed */
( TODO_verify_ssa | TODO_verify_flow
| TODO_verify_stmts ), /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_expand : public rtl_opt_pass
{
public:
pass_expand(gcc::context *ctxt)
: rtl_opt_pass(pass_data_expand, ctxt)
{}
/* opt_pass methods: */
unsigned int execute () { return gimple_expand_cfg (); }
}; // class pass_expand
} // anon namespace
rtl_opt_pass *
make_pass_expand (gcc::context *ctxt)
{
return new pass_expand (ctxt);
}

View File

@ -459,26 +459,43 @@ rest_of_pass_free_cfg (void)
return 0;
}
struct rtl_opt_pass pass_free_cfg =
namespace {
const pass_data pass_data_free_cfg =
{
{
RTL_PASS,
"*free_cfg", /* name */
OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
rest_of_pass_free_cfg, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
PROP_cfg, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
}
RTL_PASS, /* type */
"*free_cfg", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
PROP_cfg, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_free_cfg : public rtl_opt_pass
{
public:
pass_free_cfg(gcc::context *ctxt)
: rtl_opt_pass(pass_data_free_cfg, ctxt)
{}
/* opt_pass methods: */
unsigned int execute () { return rest_of_pass_free_cfg (); }
}; // class pass_free_cfg
} // anon namespace
rtl_opt_pass *
make_pass_free_cfg (gcc::context *ctxt)
{
return new pass_free_cfg (ctxt);
}
/* Return RTX to emit after when we want to emit code on the entry of function. */
rtx
entry_of_function (void)
@ -3297,45 +3314,79 @@ outof_cfg_layout_mode (void)
return 0;
}
struct rtl_opt_pass pass_into_cfg_layout_mode =
namespace {
const pass_data pass_data_into_cfg_layout_mode =
{
{
RTL_PASS,
"into_cfglayout", /* name */
OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
into_cfg_layout_mode, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_CFG, /* tv_id */
0, /* properties_required */
PROP_cfglayout, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
RTL_PASS, /* type */
"into_cfglayout", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_CFG, /* tv_id */
0, /* properties_required */
PROP_cfglayout, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
struct rtl_opt_pass pass_outof_cfg_layout_mode =
class pass_into_cfg_layout_mode : public rtl_opt_pass
{
{
RTL_PASS,
"outof_cfglayout", /* name */
OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
outof_cfg_layout_mode, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_CFG, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
PROP_cfglayout, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
public:
pass_into_cfg_layout_mode(gcc::context *ctxt)
: rtl_opt_pass(pass_data_into_cfg_layout_mode, ctxt)
{}
/* opt_pass methods: */
unsigned int execute () { return into_cfg_layout_mode (); }
}; // class pass_into_cfg_layout_mode
} // anon namespace
rtl_opt_pass *
make_pass_into_cfg_layout_mode (gcc::context *ctxt)
{
return new pass_into_cfg_layout_mode (ctxt);
}
namespace {
const pass_data pass_data_outof_cfg_layout_mode =
{
RTL_PASS, /* type */
"outof_cfglayout", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_CFG, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
PROP_cfglayout, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_outof_cfg_layout_mode : public rtl_opt_pass
{
public:
pass_outof_cfg_layout_mode(gcc::context *ctxt)
: rtl_opt_pass(pass_data_outof_cfg_layout_mode, ctxt)
{}
/* opt_pass methods: */
unsigned int execute () { return outof_cfg_layout_mode (); }
}; // class pass_outof_cfg_layout_mode
} // anon namespace
rtl_opt_pass *
make_pass_outof_cfg_layout_mode (gcc::context *ctxt)
{
return new pass_outof_cfg_layout_mode (ctxt);
}
/* Link the basic blocks in the correct order, compacting the basic

View File

@ -370,26 +370,43 @@ build_cgraph_edges (void)
return 0;
}
struct gimple_opt_pass pass_build_cgraph_edges =
namespace {
const pass_data pass_data_build_cgraph_edges =
{
{
GIMPLE_PASS,
"*build_cgraph_edges", /* name */
OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
build_cgraph_edges, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"*build_cgraph_edges", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_build_cgraph_edges : public gimple_opt_pass
{
public:
pass_build_cgraph_edges(gcc::context *ctxt)
: gimple_opt_pass(pass_data_build_cgraph_edges, ctxt)
{}
/* opt_pass methods: */
unsigned int execute () { return build_cgraph_edges (); }
}; // class pass_build_cgraph_edges
} // anon namespace
gimple_opt_pass *
make_pass_build_cgraph_edges (gcc::context *ctxt)
{
return new pass_build_cgraph_edges (ctxt);
}
/* Record references to functions and other variables present in the
initial value of DECL, a variable.
When ONLY_VARS is true, we mark needed only variables, not functions. */
@ -478,26 +495,44 @@ cgraph_rebuild_references (void)
record_eh_tables (node, cfun);
}
struct gimple_opt_pass pass_rebuild_cgraph_edges =
namespace {
const pass_data pass_data_rebuild_cgraph_edges =
{
{
GIMPLE_PASS,
"*rebuild_cgraph_edges", /* name */
OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
rebuild_cgraph_edges, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_CGRAPH, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"*rebuild_cgraph_edges", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_CGRAPH, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_rebuild_cgraph_edges : public gimple_opt_pass
{
public:
pass_rebuild_cgraph_edges(gcc::context *ctxt)
: gimple_opt_pass(pass_data_rebuild_cgraph_edges, ctxt)
{}
/* opt_pass methods: */
opt_pass * clone () { return new pass_rebuild_cgraph_edges (ctxt_); }
unsigned int execute () { return rebuild_cgraph_edges (); }
}; // class pass_rebuild_cgraph_edges
} // anon namespace
gimple_opt_pass *
make_pass_rebuild_cgraph_edges (gcc::context *ctxt)
{
return new pass_rebuild_cgraph_edges (ctxt);
}
static unsigned int
remove_cgraph_callee_edges (void)
@ -506,22 +541,42 @@ remove_cgraph_callee_edges (void)
return 0;
}
struct gimple_opt_pass pass_remove_cgraph_callee_edges =
namespace {
const pass_data pass_data_remove_cgraph_callee_edges =
{
{
GIMPLE_PASS,
"*remove_cgraph_callee_edges", /* name */
OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
remove_cgraph_callee_edges, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"*remove_cgraph_callee_edges", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_remove_cgraph_callee_edges : public gimple_opt_pass
{
public:
pass_remove_cgraph_callee_edges(gcc::context *ctxt)
: gimple_opt_pass(pass_data_remove_cgraph_callee_edges, ctxt)
{}
/* opt_pass methods: */
opt_pass * clone () {
return new pass_remove_cgraph_callee_edges (ctxt_);
}
unsigned int execute () { return remove_cgraph_callee_edges (); }
}; // class pass_remove_cgraph_callee_edges
} // anon namespace
gimple_opt_pass *
make_pass_remove_cgraph_callee_edges (gcc::context *ctxt)
{
return new pass_remove_cgraph_callee_edges (ctxt);
}

View File

@ -643,22 +643,40 @@ rest_of_handle_stack_adjustments (void)
return 0;
}
struct rtl_opt_pass pass_stack_adjustments =
namespace {
const pass_data pass_data_stack_adjustments =
{
{
RTL_PASS,
"csa", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_handle_stack_adjustments, /* gate */
rest_of_handle_stack_adjustments, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_COMBINE_STACK_ADJUST, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_df_finish | TODO_verify_rtl_sharing /* todo_flags_finish */
}
RTL_PASS, /* type */
"csa", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_COMBINE_STACK_ADJUST, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_df_finish | TODO_verify_rtl_sharing ), /* todo_flags_finish */
};
class pass_stack_adjustments : public rtl_opt_pass
{
public:
pass_stack_adjustments(gcc::context *ctxt)
: rtl_opt_pass(pass_data_stack_adjustments, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_handle_stack_adjustments (); }
unsigned int execute () { return rest_of_handle_stack_adjustments (); }
}; // class pass_stack_adjustments
} // anon namespace
rtl_opt_pass *
make_pass_stack_adjustments (gcc::context *ctxt)
{
return new pass_stack_adjustments (ctxt);
}

View File

@ -13840,22 +13840,40 @@ rest_of_handle_combine (void)
return 0;
}
struct rtl_opt_pass pass_combine =
namespace {
const pass_data pass_data_combine =
{
{
RTL_PASS,
"combine", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_handle_combine, /* gate */
rest_of_handle_combine, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_COMBINE, /* tv_id */
PROP_cfglayout, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_df_finish | TODO_verify_rtl_sharing /* todo_flags_finish */
}
RTL_PASS, /* type */
"combine", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_COMBINE, /* tv_id */
PROP_cfglayout, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_df_finish | TODO_verify_rtl_sharing ), /* todo_flags_finish */
};
class pass_combine : public rtl_opt_pass
{
public:
pass_combine(gcc::context *ctxt)
: rtl_opt_pass(pass_data_combine, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_handle_combine (); }
unsigned int execute () { return rest_of_handle_combine (); }
}; // class pass_combine
} // anon namespace
rtl_opt_pass *
make_pass_combine (gcc::context *ctxt)
{
return new pass_combine (ctxt);
}

View File

@ -651,24 +651,41 @@ gate_compare_elim_after_reload (void)
return flag_compare_elim_after_reload;
}
struct rtl_opt_pass pass_compare_elim_after_reload =
namespace {
const pass_data pass_data_compare_elim_after_reload =
{
{
RTL_PASS,
"cmpelim", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_compare_elim_after_reload, /* gate */
execute_compare_elim_after_reload, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_df_finish
| TODO_df_verify
| TODO_verify_rtl_sharing /* todo_flags_finish */
}
RTL_PASS, /* type */
"cmpelim", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_df_finish | TODO_df_verify
| TODO_verify_rtl_sharing ), /* todo_flags_finish */
};
class pass_compare_elim_after_reload : public rtl_opt_pass
{
public:
pass_compare_elim_after_reload(gcc::context *ctxt)
: rtl_opt_pass(pass_data_compare_elim_after_reload, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_compare_elim_after_reload (); }
unsigned int execute () { return execute_compare_elim_after_reload (); }
}; // class pass_compare_elim_after_reload
} // anon namespace
rtl_opt_pass *
make_pass_compare_elim_after_reload (gcc::context *ctxt)
{
return new pass_compare_elim_after_reload (ctxt);
}

View File

@ -929,8 +929,8 @@ enum
};
extern int epiphany_normal_fp_rounding;
extern struct rtl_opt_pass pass_mode_switch_use;
extern struct rtl_opt_pass pass_resolve_sw_modes;
extern rtl_opt_pass *make_pass_mode_switch_use (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_resolve_sw_modes (gcc::context *ctxt);
/* This will need to be adjusted when FP_CONTRACT_ON is properly
implemented. */

View File

@ -71,22 +71,39 @@ insert_uses (void)
return 0;
}
struct rtl_opt_pass pass_mode_switch_use =
namespace {
const pass_data pass_data_mode_switch_use =
{
{
RTL_PASS,
"mode_switch_use", /* name */
OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
insert_uses, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
}
RTL_PASS, /* type */
"mode_switch_use", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_mode_switch_use : public rtl_opt_pass
{
public:
pass_mode_switch_use(gcc::context *ctxt)
: rtl_opt_pass(pass_data_mode_switch_use, ctxt)
{}
/* opt_pass methods: */
unsigned int execute () { return insert_uses (); }
}; // class pass_mode_switch_use
} // anon namespace
rtl_opt_pass *
make_pass_mode_switch_use (gcc::context *ctxt)
{
return new pass_mode_switch_use (ctxt);
}

View File

@ -161,23 +161,40 @@ resolve_sw_modes (void)
return 0;
}
struct rtl_opt_pass pass_resolve_sw_modes =
namespace {
const pass_data pass_data_resolve_sw_modes =
{
{
RTL_PASS,
"resolve_sw_modes", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_resolve_sw_modes, /* gate */
resolve_sw_modes, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_MODE_SWITCH, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_df_finish | TODO_verify_rtl_sharing |
0 /* todo_flags_finish */
}
RTL_PASS, /* type */
"resolve_sw_modes", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_MODE_SWITCH, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_df_finish | TODO_verify_rtl_sharing | 0 ), /* todo_flags_finish */
};
class pass_resolve_sw_modes : public rtl_opt_pass
{
public:
pass_resolve_sw_modes(gcc::context *ctxt)
: rtl_opt_pass(pass_data_resolve_sw_modes, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_resolve_sw_modes (); }
unsigned int execute () { return resolve_sw_modes (); }
}; // class pass_resolve_sw_modes
} // anon namespace
rtl_opt_pass *
make_pass_resolve_sw_modes (gcc::context *ctxt)
{
return new pass_resolve_sw_modes (ctxt);
}

View File

@ -2602,27 +2602,44 @@ rest_of_handle_insert_vzeroupper (void)
return 0;
}
struct rtl_opt_pass pass_insert_vzeroupper =
namespace {
const pass_data pass_data_insert_vzeroupper =
{
{
RTL_PASS,
"vzeroupper", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_insert_vzeroupper, /* gate */
rest_of_handle_insert_vzeroupper, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_df_finish | TODO_verify_rtl_sharing |
0, /* todo_flags_finish */
}
RTL_PASS, /* type */
"vzeroupper", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_df_finish | TODO_verify_rtl_sharing | 0 ), /* todo_flags_finish */
};
class pass_insert_vzeroupper : public rtl_opt_pass
{
public:
pass_insert_vzeroupper(gcc::context *ctxt)
: rtl_opt_pass(pass_data_insert_vzeroupper, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_insert_vzeroupper (); }
unsigned int execute () { return rest_of_handle_insert_vzeroupper (); }
}; // class pass_insert_vzeroupper
} // anon namespace
rtl_opt_pass *
make_pass_insert_vzeroupper (gcc::context *ctxt)
{
return new pass_insert_vzeroupper (ctxt);
}
/* Return true if a red-zone is in use. */
static inline bool

View File

@ -16337,26 +16337,43 @@ mips_machine_reorg2 (void)
return 0;
}
struct rtl_opt_pass pass_mips_machine_reorg2 =
namespace {
const pass_data pass_data_mips_machine_reorg2 =
{
{
RTL_PASS,
"mach2", /* name */
OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
mips_machine_reorg2, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_MACH_DEP, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_rtl_sharing, /* todo_flags_finish */
}
RTL_PASS, /* type */
"mach2", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_MACH_DEP, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_rtl_sharing, /* todo_flags_finish */
};
class pass_mips_machine_reorg2 : public rtl_opt_pass
{
public:
pass_mips_machine_reorg2(gcc::context *ctxt)
: rtl_opt_pass(pass_data_mips_machine_reorg2, ctxt)
{}
/* opt_pass methods: */
unsigned int execute () { return mips_machine_reorg2 (); }
}; // class pass_mips_machine_reorg2
} // anon namespace
rtl_opt_pass *
make_pass_mips_machine_reorg2 (gcc::context *ctxt)
{
return new pass_mips_machine_reorg2 (ctxt);
}
struct register_pass_info insert_pass_mips_machine_reorg2 =
{
&pass_mips_machine_reorg2.pass, /* pass */

View File

@ -1000,26 +1000,44 @@ sparc_do_work_around_errata (void)
return 0;
}
struct rtl_opt_pass pass_work_around_errata =
namespace {
const pass_data pass_data_work_around_errata =
{
{
RTL_PASS,
"errata", /* name */
OPTGROUP_NONE, /* optinfo_flags */
sparc_gate_work_around_errata, /* gate */
sparc_do_work_around_errata, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_MACH_DEP, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_rtl_sharing, /* todo_flags_finish */
}
RTL_PASS, /* type */
"errata", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_MACH_DEP, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_rtl_sharing, /* todo_flags_finish */
};
class pass_work_around_errata : public rtl_opt_pass
{
public:
pass_work_around_errata(gcc::context *ctxt)
: rtl_opt_pass(pass_data_work_around_errata, ctxt)
{}
/* opt_pass methods: */
bool gate () { return sparc_gate_work_around_errata (); }
unsigned int execute () { return sparc_do_work_around_errata (); }
}; // class pass_work_around_errata
} // anon namespace
rtl_opt_pass *
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 */

View File

@ -1913,23 +1913,42 @@ execute_rtl_cprop (void)
return 0;
}
struct rtl_opt_pass pass_rtl_cprop =
namespace {
const pass_data pass_data_rtl_cprop =
{
{
RTL_PASS,
"cprop", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_rtl_cprop, /* gate */
execute_rtl_cprop, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_CPROP, /* tv_id */
PROP_cfglayout, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_df_finish | TODO_verify_rtl_sharing |
TODO_verify_flow /* todo_flags_finish */
}
RTL_PASS, /* type */
"cprop", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_CPROP, /* tv_id */
PROP_cfglayout, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_df_finish | TODO_verify_rtl_sharing
| TODO_verify_flow ), /* todo_flags_finish */
};
class pass_rtl_cprop : public rtl_opt_pass
{
public:
pass_rtl_cprop(gcc::context *ctxt)
: rtl_opt_pass(pass_data_rtl_cprop, ctxt)
{}
/* opt_pass methods: */
opt_pass * clone () { return new pass_rtl_cprop (ctxt_); }
bool gate () { return gate_rtl_cprop (); }
unsigned int execute () { return execute_rtl_cprop (); }
}; // class pass_rtl_cprop
} // anon namespace
rtl_opt_pass *
make_pass_rtl_cprop (gcc::context *ctxt)
{
return new pass_rtl_cprop (ctxt);
}

164
gcc/cse.c
View File

@ -7449,27 +7449,45 @@ rest_of_handle_cse (void)
return 0;
}
struct rtl_opt_pass pass_cse =
namespace {
const pass_data pass_data_cse =
{
{
RTL_PASS,
"cse1", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_handle_cse, /* gate */
rest_of_handle_cse, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_CSE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_df_finish | TODO_verify_rtl_sharing |
TODO_verify_flow /* todo_flags_finish */
}
RTL_PASS, /* type */
"cse1", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_CSE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_df_finish | TODO_verify_rtl_sharing
| TODO_verify_flow ), /* todo_flags_finish */
};
class pass_cse : public rtl_opt_pass
{
public:
pass_cse(gcc::context *ctxt)
: rtl_opt_pass(pass_data_cse, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_handle_cse (); }
unsigned int execute () { return rest_of_handle_cse (); }
}; // class pass_cse
} // anon namespace
rtl_opt_pass *
make_pass_cse (gcc::context *ctxt)
{
return new pass_cse (ctxt);
}
static bool
gate_handle_cse2 (void)
@ -7511,27 +7529,45 @@ rest_of_handle_cse2 (void)
}
struct rtl_opt_pass pass_cse2 =
namespace {
const pass_data pass_data_cse2 =
{
{
RTL_PASS,
"cse2", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_handle_cse2, /* gate */
rest_of_handle_cse2, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_CSE2, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_df_finish | TODO_verify_rtl_sharing |
TODO_verify_flow /* todo_flags_finish */
}
RTL_PASS, /* type */
"cse2", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_CSE2, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_df_finish | TODO_verify_rtl_sharing
| TODO_verify_flow ), /* todo_flags_finish */
};
class pass_cse2 : public rtl_opt_pass
{
public:
pass_cse2(gcc::context *ctxt)
: rtl_opt_pass(pass_data_cse2, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_handle_cse2 (); }
unsigned int execute () { return rest_of_handle_cse2 (); }
}; // class pass_cse2
} // anon namespace
rtl_opt_pass *
make_pass_cse2 (gcc::context *ctxt)
{
return new pass_cse2 (ctxt);
}
static bool
gate_handle_cse_after_global_opts (void)
{
@ -7571,23 +7607,43 @@ rest_of_handle_cse_after_global_opts (void)
return 0;
}
struct rtl_opt_pass pass_cse_after_global_opts =
namespace {
const pass_data pass_data_cse_after_global_opts =
{
{
RTL_PASS,
"cse_local", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_handle_cse_after_global_opts, /* gate */
rest_of_handle_cse_after_global_opts, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_CSE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_df_finish | TODO_verify_rtl_sharing |
TODO_verify_flow /* todo_flags_finish */
}
RTL_PASS, /* type */
"cse_local", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_CSE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_df_finish | TODO_verify_rtl_sharing
| TODO_verify_flow ), /* todo_flags_finish */
};
class pass_cse_after_global_opts : public rtl_opt_pass
{
public:
pass_cse_after_global_opts(gcc::context *ctxt)
: rtl_opt_pass(pass_data_cse_after_global_opts, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_handle_cse_after_global_opts (); }
unsigned int execute () {
return rest_of_handle_cse_after_global_opts ();
}
}; // class pass_cse_after_global_opts
} // anon namespace
rtl_opt_pass *
make_pass_cse_after_global_opts (gcc::context *ctxt)
{
return new pass_cse_after_global_opts (ctxt);
}

104
gcc/dce.c
View File

@ -786,26 +786,44 @@ gate_ud_dce (void)
&& dbg_cnt (dce_ud);
}
struct rtl_opt_pass pass_ud_rtl_dce =
namespace {
const pass_data pass_data_ud_rtl_dce =
{
{
RTL_PASS,
"ud_dce", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_ud_dce, /* gate */
rest_of_handle_ud_dce, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_DCE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_df_finish | TODO_verify_rtl_sharing /* todo_flags_finish */
}
RTL_PASS, /* type */
"ud_dce", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_DCE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_df_finish | TODO_verify_rtl_sharing ), /* todo_flags_finish */
};
class pass_ud_rtl_dce : public rtl_opt_pass
{
public:
pass_ud_rtl_dce(gcc::context *ctxt)
: rtl_opt_pass(pass_data_ud_rtl_dce, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_ud_dce (); }
unsigned int execute () { return rest_of_handle_ud_dce (); }
}; // class pass_ud_rtl_dce
} // anon namespace
rtl_opt_pass *
make_pass_ud_rtl_dce (gcc::context *ctxt)
{
return new pass_ud_rtl_dce (ctxt);
}
/* -------------------------------------------------------------------------
Fast DCE functions
@ -1201,22 +1219,40 @@ gate_fast_dce (void)
&& dbg_cnt (dce_fast);
}
struct rtl_opt_pass pass_fast_rtl_dce =
namespace {
const pass_data pass_data_fast_rtl_dce =
{
{
RTL_PASS,
"rtl_dce", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_fast_dce, /* gate */
rest_of_handle_fast_dce, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_DCE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_df_finish | TODO_verify_rtl_sharing /* todo_flags_finish */
}
RTL_PASS, /* type */
"rtl_dce", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_DCE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_df_finish | TODO_verify_rtl_sharing ), /* todo_flags_finish */
};
class pass_fast_rtl_dce : public rtl_opt_pass
{
public:
pass_fast_rtl_dce(gcc::context *ctxt)
: rtl_opt_pass(pass_data_fast_rtl_dce, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_fast_dce (); }
unsigned int execute () { return rest_of_handle_fast_dce (); }
}; // class pass_fast_rtl_dce
} // anon namespace
rtl_opt_pass *
make_pass_fast_rtl_dce (gcc::context *ctxt)
{
return new pass_fast_rtl_dce (ctxt);
}

View File

@ -746,26 +746,44 @@ gate_opt (void)
}
struct rtl_opt_pass pass_df_initialize_opt =
namespace {
const pass_data pass_data_df_initialize_opt =
{
{
RTL_PASS,
"dfinit", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_opt, /* gate */
rest_of_handle_df_initialize, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_DF_SCAN, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
RTL_PASS, /* type */
"dfinit", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_DF_SCAN, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_df_initialize_opt : public rtl_opt_pass
{
public:
pass_df_initialize_opt(gcc::context *ctxt)
: rtl_opt_pass(pass_data_df_initialize_opt, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_opt (); }
unsigned int execute () { return rest_of_handle_df_initialize (); }
}; // class pass_df_initialize_opt
} // anon namespace
rtl_opt_pass *
make_pass_df_initialize_opt (gcc::context *ctxt)
{
return new pass_df_initialize_opt (ctxt);
}
static bool
gate_no_opt (void)
@ -774,26 +792,44 @@ gate_no_opt (void)
}
struct rtl_opt_pass pass_df_initialize_no_opt =
namespace {
const pass_data pass_data_df_initialize_no_opt =
{
{
RTL_PASS,
"no-opt dfinit", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_no_opt, /* gate */
rest_of_handle_df_initialize, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_DF_SCAN, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
RTL_PASS, /* type */
"no-opt dfinit", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_DF_SCAN, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_df_initialize_no_opt : public rtl_opt_pass
{
public:
pass_df_initialize_no_opt(gcc::context *ctxt)
: rtl_opt_pass(pass_data_df_initialize_no_opt, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_no_opt (); }
unsigned int execute () { return rest_of_handle_df_initialize (); }
}; // class pass_df_initialize_no_opt
} // anon namespace
rtl_opt_pass *
make_pass_df_initialize_no_opt (gcc::context *ctxt)
{
return new pass_df_initialize_no_opt (ctxt);
}
/* Free all the dataflow info and the DF structure. This should be
called from the df_finish macro which also NULLs the parm. */
@ -822,26 +858,43 @@ rest_of_handle_df_finish (void)
}
struct rtl_opt_pass pass_df_finish =
namespace {
const pass_data pass_data_df_finish =
{
{
RTL_PASS,
"dfinish", /* name */
OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
rest_of_handle_df_finish, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
RTL_PASS, /* type */
"dfinish", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_df_finish : public rtl_opt_pass
{
public:
pass_df_finish(gcc::context *ctxt)
: rtl_opt_pass(pass_data_df_finish, ctxt)
{}
/* opt_pass methods: */
unsigned int execute () { return rest_of_handle_df_finish (); }
}; // class pass_df_finish
} // anon namespace
rtl_opt_pass *
make_pass_df_finish (gcc::context *ctxt)
{
return new pass_df_finish (ctxt);
}

104
gcc/dse.c
View File

@ -3729,42 +3729,78 @@ gate_dse2 (void)
&& dbg_cnt (dse2);
}
struct rtl_opt_pass pass_rtl_dse1 =
namespace {
const pass_data pass_data_rtl_dse1 =
{
{
RTL_PASS,
"dse1", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_dse1, /* gate */
rest_of_handle_dse, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_DSE1, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_df_finish | TODO_verify_rtl_sharing /* todo_flags_finish */
}
RTL_PASS, /* type */
"dse1", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_DSE1, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_df_finish | TODO_verify_rtl_sharing ), /* todo_flags_finish */
};
struct rtl_opt_pass pass_rtl_dse2 =
class pass_rtl_dse1 : public rtl_opt_pass
{
{
RTL_PASS,
"dse2", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_dse2, /* gate */
rest_of_handle_dse, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_DSE2, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_df_finish | TODO_verify_rtl_sharing /* todo_flags_finish */
}
public:
pass_rtl_dse1(gcc::context *ctxt)
: rtl_opt_pass(pass_data_rtl_dse1, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_dse1 (); }
unsigned int execute () { return rest_of_handle_dse (); }
}; // class pass_rtl_dse1
} // anon namespace
rtl_opt_pass *
make_pass_rtl_dse1 (gcc::context *ctxt)
{
return new pass_rtl_dse1 (ctxt);
}
namespace {
const pass_data pass_data_rtl_dse2 =
{
RTL_PASS, /* type */
"dse2", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_DSE2, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_df_finish | TODO_verify_rtl_sharing ), /* todo_flags_finish */
};
class pass_rtl_dse2 : public rtl_opt_pass
{
public:
pass_rtl_dse2(gcc::context *ctxt)
: rtl_opt_pass(pass_data_rtl_dse2, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_dse2 (); }
unsigned int execute () { return rest_of_handle_dse (); }
}; // class pass_rtl_dse2
} // anon namespace
rtl_opt_pass *
make_pass_rtl_dse2 (gcc::context *ctxt)
{
return new pass_rtl_dse2 (ctxt);
}

View File

@ -3370,24 +3370,42 @@ gate_dwarf2_frame (void)
return dwarf2out_do_frame ();
}
struct rtl_opt_pass pass_dwarf2_frame =
namespace {
const pass_data pass_data_dwarf2_frame =
{
{
RTL_PASS,
"dwarf2", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_dwarf2_frame, /* gate */
execute_dwarf2_frame, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_FINAL, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
RTL_PASS, /* type */
"dwarf2", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_FINAL, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_dwarf2_frame : public rtl_opt_pass
{
public:
pass_dwarf2_frame(gcc::context *ctxt)
: rtl_opt_pass(pass_data_dwarf2_frame, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_dwarf2_frame (); }
unsigned int execute () { return execute_dwarf2_frame (); }
}; // class pass_dwarf2_frame
} // anon namespace
rtl_opt_pass *
make_pass_dwarf2_frame (gcc::context *ctxt)
{
return new pass_dwarf2_frame (ctxt);
}
#include "gt-dwarf2cfi.h"

View File

@ -2001,26 +2001,43 @@ set_nothrow_function_flags (void)
return 0;
}
struct rtl_opt_pass pass_set_nothrow_function_flags =
namespace {
const pass_data pass_data_set_nothrow_function_flags =
{
{
RTL_PASS,
"nothrow", /* name */
OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
set_nothrow_function_flags, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
RTL_PASS, /* type */
"nothrow", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_set_nothrow_function_flags : public rtl_opt_pass
{
public:
pass_set_nothrow_function_flags(gcc::context *ctxt)
: rtl_opt_pass(pass_data_set_nothrow_function_flags, ctxt)
{}
/* opt_pass methods: */
unsigned int execute () { return set_nothrow_function_flags (); }
}; // class pass_set_nothrow_function_flags
} // anon namespace
rtl_opt_pass *
make_pass_set_nothrow_function_flags (gcc::context *ctxt)
{
return new pass_set_nothrow_function_flags (ctxt);
}
/* Various hooks for unwind library. */
@ -2615,25 +2632,43 @@ gate_convert_to_eh_region_ranges (void)
return true;
}
struct rtl_opt_pass pass_convert_to_eh_region_ranges =
namespace {
const pass_data pass_data_convert_to_eh_region_ranges =
{
{
RTL_PASS,
"eh_ranges", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_convert_to_eh_region_ranges, /* gate */
convert_to_eh_region_ranges, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
RTL_PASS, /* type */
"eh_ranges", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_convert_to_eh_region_ranges : public rtl_opt_pass
{
public:
pass_convert_to_eh_region_ranges(gcc::context *ctxt)
: rtl_opt_pass(pass_data_convert_to_eh_region_ranges, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_convert_to_eh_region_ranges (); }
unsigned int execute () { return convert_to_eh_region_ranges (); }
}; // class pass_convert_to_eh_region_ranges
} // anon namespace
rtl_opt_pass *
make_pass_convert_to_eh_region_ranges (gcc::context *ctxt)
{
return new pass_convert_to_eh_region_ranges (ctxt);
}
static void
push_uleb128 (vec<uchar, va_gc> **data_area, unsigned int value)

View File

@ -795,26 +795,43 @@ compute_alignments (void)
return 0;
}
struct rtl_opt_pass pass_compute_alignments =
namespace {
const pass_data pass_data_compute_alignments =
{
{
RTL_PASS,
"alignments", /* name */
OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
compute_alignments, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_rtl_sharing /* todo_flags_finish */
}
RTL_PASS, /* type */
"alignments", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_rtl_sharing, /* todo_flags_finish */
};
class pass_compute_alignments : public rtl_opt_pass
{
public:
pass_compute_alignments(gcc::context *ctxt)
: rtl_opt_pass(pass_data_compute_alignments, ctxt)
{}
/* opt_pass methods: */
unsigned int execute () { return compute_alignments (); }
}; // class pass_compute_alignments
} // anon namespace
rtl_opt_pass *
make_pass_compute_alignments (gcc::context *ctxt)
{
return new pass_compute_alignments (ctxt);
}
/* Make a pass over all insns and compute their actual lengths by shortening
any branches of variable length if possible. */
@ -4409,26 +4426,43 @@ rest_of_handle_final (void)
return 0;
}
struct rtl_opt_pass pass_final =
namespace {
const pass_data pass_data_final =
{
{
RTL_PASS,
"final", /* name */
OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
rest_of_handle_final, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_FINAL, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
RTL_PASS, /* type */
"final", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_FINAL, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_final : public rtl_opt_pass
{
public:
pass_final(gcc::context *ctxt)
: rtl_opt_pass(pass_data_final, ctxt)
{}
/* opt_pass methods: */
unsigned int execute () { return rest_of_handle_final (); }
}; // class pass_final
} // anon namespace
rtl_opt_pass *
make_pass_final (gcc::context *ctxt)
{
return new pass_final (ctxt);
}
static unsigned int
rest_of_handle_shorten_branches (void)
@ -4438,26 +4472,43 @@ rest_of_handle_shorten_branches (void)
return 0;
}
struct rtl_opt_pass pass_shorten_branches =
namespace {
const pass_data pass_data_shorten_branches =
{
{
RTL_PASS,
"shorten", /* name */
OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
rest_of_handle_shorten_branches, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_SHORTEN_BRANCH, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
RTL_PASS, /* type */
"shorten", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_SHORTEN_BRANCH, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_shorten_branches : public rtl_opt_pass
{
public:
pass_shorten_branches(gcc::context *ctxt)
: rtl_opt_pass(pass_data_shorten_branches, ctxt)
{}
/* opt_pass methods: */
unsigned int execute () { return rest_of_handle_shorten_branches (); }
}; // class pass_shorten_branches
} // anon namespace
rtl_opt_pass *
make_pass_shorten_branches (gcc::context *ctxt)
{
return new pass_shorten_branches (ctxt);
}
static unsigned int
rest_of_clean_state (void)
@ -4585,22 +4636,39 @@ rest_of_clean_state (void)
return 0;
}
struct rtl_opt_pass pass_clean_state =
namespace {
const pass_data pass_data_clean_state =
{
{
RTL_PASS,
"*clean_state", /* name */
OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
rest_of_clean_state, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_FINAL, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
PROP_rtl, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
RTL_PASS, /* type */
"*clean_state", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_FINAL, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
PROP_rtl, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_clean_state : public rtl_opt_pass
{
public:
pass_clean_state(gcc::context *ctxt)
: rtl_opt_pass(pass_data_clean_state, ctxt)
{}
/* opt_pass methods: */
unsigned int execute () { return rest_of_clean_state (); }
}; // class pass_clean_state
} // anon namespace
rtl_opt_pass *
make_pass_clean_state (gcc::context *ctxt)
{
return new pass_clean_state (ctxt);
}

View File

@ -1948,26 +1948,43 @@ instantiate_virtual_regs (void)
return 0;
}
struct rtl_opt_pass pass_instantiate_virtual_regs =
namespace {
const pass_data pass_data_instantiate_virtual_regs =
{
{
RTL_PASS,
"vregs", /* name */
OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
instantiate_virtual_regs, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
RTL_PASS, /* type */
"vregs", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_instantiate_virtual_regs : public rtl_opt_pass
{
public:
pass_instantiate_virtual_regs(gcc::context *ctxt)
: rtl_opt_pass(pass_data_instantiate_virtual_regs, ctxt)
{}
/* opt_pass methods: */
unsigned int execute () { return instantiate_virtual_regs (); }
}; // class pass_instantiate_virtual_regs
} // anon namespace
rtl_opt_pass *
make_pass_instantiate_virtual_regs (gcc::context *ctxt)
{
return new pass_instantiate_virtual_regs (ctxt);
}
/* Return 1 if EXP is an aggregate type (or a value with aggregate type).
This means a type for which function calls must pass an address to the
@ -6973,26 +6990,43 @@ types_used_by_var_decl_insert (tree type, tree var_decl)
}
}
struct rtl_opt_pass pass_leaf_regs =
namespace {
const pass_data pass_data_leaf_regs =
{
{
RTL_PASS,
"*leaf_regs", /* name */
OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
rest_of_handle_check_leaf_regs, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
RTL_PASS, /* type */
"*leaf_regs", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_leaf_regs : public rtl_opt_pass
{
public:
pass_leaf_regs(gcc::context *ctxt)
: rtl_opt_pass(pass_data_leaf_regs, ctxt)
{}
/* opt_pass methods: */
unsigned int execute () { return rest_of_handle_check_leaf_regs (); }
}; // class pass_leaf_regs
} // anon namespace
rtl_opt_pass *
make_pass_leaf_regs (gcc::context *ctxt)
{
return new pass_leaf_regs (ctxt);
}
static unsigned int
rest_of_handle_thread_prologue_and_epilogue (void)
{
@ -7012,26 +7046,45 @@ rest_of_handle_thread_prologue_and_epilogue (void)
return 0;
}
struct rtl_opt_pass pass_thread_prologue_and_epilogue =
namespace {
const pass_data pass_data_thread_prologue_and_epilogue =
{
{
RTL_PASS,
"pro_and_epilogue", /* name */
OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
rest_of_handle_thread_prologue_and_epilogue, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_THREAD_PROLOGUE_AND_EPILOGUE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
TODO_verify_flow, /* todo_flags_start */
TODO_df_verify | TODO_df_finish
| TODO_verify_rtl_sharing /* todo_flags_finish */
}
RTL_PASS, /* type */
"pro_and_epilogue", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_THREAD_PROLOGUE_AND_EPILOGUE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
TODO_verify_flow, /* todo_flags_start */
( TODO_df_verify | TODO_df_finish
| TODO_verify_rtl_sharing ), /* todo_flags_finish */
};
class pass_thread_prologue_and_epilogue : public rtl_opt_pass
{
public:
pass_thread_prologue_and_epilogue(gcc::context *ctxt)
: rtl_opt_pass(pass_data_thread_prologue_and_epilogue, ctxt)
{}
/* opt_pass methods: */
unsigned int execute () {
return rest_of_handle_thread_prologue_and_epilogue ();
}
}; // class pass_thread_prologue_and_epilogue
} // anon namespace
rtl_opt_pass *
make_pass_thread_prologue_and_epilogue (gcc::context *ctxt)
{
return new pass_thread_prologue_and_epilogue (ctxt);
}
/* This mini-pass fixes fall-out from SSA in asm statements that have
@ -7213,25 +7266,42 @@ rest_of_match_asm_constraints (void)
return TODO_df_finish;
}
struct rtl_opt_pass pass_match_asm_constraints =
namespace {
const pass_data pass_data_match_asm_constraints =
{
{
RTL_PASS,
"asmcons", /* name */
OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
rest_of_match_asm_constraints, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
RTL_PASS, /* type */
"asmcons", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_match_asm_constraints : public rtl_opt_pass
{
public:
pass_match_asm_constraints(gcc::context *ctxt)
: rtl_opt_pass(pass_data_match_asm_constraints, ctxt)
{}
/* opt_pass methods: */
unsigned int execute () { return rest_of_match_asm_constraints (); }
}; // class pass_match_asm_constraints
} // anon namespace
rtl_opt_pass *
make_pass_match_asm_constraints (gcc::context *ctxt)
{
return new pass_match_asm_constraints (ctxt);
}
#include "gt-function.h"

View File

@ -1485,28 +1485,45 @@ fwprop (void)
return 0;
}
struct rtl_opt_pass pass_rtl_fwprop =
namespace {
const pass_data pass_data_rtl_fwprop =
{
{
RTL_PASS,
"fwprop1", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_fwprop, /* gate */
fwprop, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_FWPROP, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_df_finish
| TODO_verify_flow
| TODO_verify_rtl_sharing /* todo_flags_finish */
}
RTL_PASS, /* type */
"fwprop1", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_FWPROP, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_df_finish | TODO_verify_flow
| TODO_verify_rtl_sharing ), /* todo_flags_finish */
};
class pass_rtl_fwprop : public rtl_opt_pass
{
public:
pass_rtl_fwprop(gcc::context *ctxt)
: rtl_opt_pass(pass_data_rtl_fwprop, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_fwprop (); }
unsigned int execute () { return fwprop (); }
}; // class pass_rtl_fwprop
} // anon namespace
rtl_opt_pass *
make_pass_rtl_fwprop (gcc::context *ctxt)
{
return new pass_rtl_fwprop (ctxt);
}
static unsigned int
fwprop_addr (void)
{
@ -1535,22 +1552,40 @@ fwprop_addr (void)
return 0;
}
struct rtl_opt_pass pass_rtl_fwprop_addr =
namespace {
const pass_data pass_data_rtl_fwprop_addr =
{
{
RTL_PASS,
"fwprop2", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_fwprop, /* gate */
fwprop_addr, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_FWPROP, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_df_finish | TODO_verify_rtl_sharing /* todo_flags_finish */
}
RTL_PASS, /* type */
"fwprop2", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_FWPROP, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_df_finish | TODO_verify_rtl_sharing ), /* todo_flags_finish */
};
class pass_rtl_fwprop_addr : public rtl_opt_pass
{
public:
pass_rtl_fwprop_addr(gcc::context *ctxt)
: rtl_opt_pass(pass_data_rtl_fwprop_addr, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_fwprop (); }
unsigned int execute () { return fwprop_addr (); }
}; // class pass_rtl_fwprop_addr
} // anon namespace
rtl_opt_pass *
make_pass_rtl_fwprop_addr (gcc::context *ctxt)
{
return new pass_rtl_fwprop_addr (ctxt);
}

View File

@ -4148,46 +4148,82 @@ execute_rtl_hoist (void)
return 0;
}
struct rtl_opt_pass pass_rtl_pre =
namespace {
const pass_data pass_data_rtl_pre =
{
{
RTL_PASS,
"rtl pre", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_rtl_pre, /* gate */
execute_rtl_pre, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_PRE, /* tv_id */
PROP_cfglayout, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_df_finish | TODO_verify_rtl_sharing |
TODO_verify_flow /* todo_flags_finish */
}
RTL_PASS, /* type */
"rtl pre", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_PRE, /* tv_id */
PROP_cfglayout, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_df_finish | TODO_verify_rtl_sharing
| TODO_verify_flow ), /* todo_flags_finish */
};
struct rtl_opt_pass pass_rtl_hoist =
class pass_rtl_pre : public rtl_opt_pass
{
{
RTL_PASS,
"hoist", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_rtl_hoist, /* gate */
execute_rtl_hoist, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_HOIST, /* tv_id */
PROP_cfglayout, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_df_finish | TODO_verify_rtl_sharing |
TODO_verify_flow /* todo_flags_finish */
}
public:
pass_rtl_pre(gcc::context *ctxt)
: rtl_opt_pass(pass_data_rtl_pre, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_rtl_pre (); }
unsigned int execute () { return execute_rtl_pre (); }
}; // class pass_rtl_pre
} // anon namespace
rtl_opt_pass *
make_pass_rtl_pre (gcc::context *ctxt)
{
return new pass_rtl_pre (ctxt);
}
namespace {
const pass_data pass_data_rtl_hoist =
{
RTL_PASS, /* type */
"hoist", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_HOIST, /* tv_id */
PROP_cfglayout, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_df_finish | TODO_verify_rtl_sharing
| TODO_verify_flow ), /* todo_flags_finish */
};
class pass_rtl_hoist : public rtl_opt_pass
{
public:
pass_rtl_hoist(gcc::context *ctxt)
: rtl_opt_pass(pass_data_rtl_hoist, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_rtl_hoist (); }
unsigned int execute () { return execute_rtl_hoist (); }
}; // class pass_rtl_hoist
} // anon namespace
rtl_opt_pass *
make_pass_rtl_hoist (gcc::context *ctxt)
{
return new pass_rtl_hoist (ctxt);
}
#include "gt-gcse.h"

View File

@ -177,26 +177,43 @@ lower_function_body (void)
return 0;
}
struct gimple_opt_pass pass_lower_cf =
namespace {
const pass_data pass_data_lower_cf =
{
{
GIMPLE_PASS,
"lower", /* name */
OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
lower_function_body, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
PROP_gimple_any, /* properties_required */
PROP_gimple_lcf, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"lower", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
PROP_gimple_any, /* properties_required */
PROP_gimple_lcf, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_lower_cf : public gimple_opt_pass
{
public:
pass_lower_cf(gcc::context *ctxt)
: gimple_opt_pass(pass_data_lower_cf, ctxt)
{}
/* opt_pass methods: */
unsigned int execute () { return lower_function_body (); }
}; // class pass_lower_cf
} // anon namespace
gimple_opt_pass *
make_pass_lower_cf (gcc::context *ctxt)
{
return new pass_lower_cf (ctxt);
}
/* Verify if the type of the argument matches that of the function

View File

@ -3478,22 +3478,40 @@ gate_strength_reduction (void)
return flag_tree_slsr;
}
struct gimple_opt_pass pass_strength_reduction =
namespace {
const pass_data pass_data_strength_reduction =
{
{
GIMPLE_PASS,
"slsr", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_strength_reduction, /* gate */
execute_strength_reduction, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_GIMPLE_SLSR, /* tv_id */
PROP_cfg | PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_ssa /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"slsr", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_GIMPLE_SLSR, /* tv_id */
( PROP_cfg | PROP_ssa ), /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_ssa, /* todo_flags_finish */
};
class pass_strength_reduction : public gimple_opt_pass
{
public:
pass_strength_reduction(gcc::context *ctxt)
: gimple_opt_pass(pass_data_strength_reduction, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_strength_reduction (); }
unsigned int execute () { return execute_strength_reduction (); }
}; // class pass_strength_reduction
} // anon namespace
gimple_opt_pass *
make_pass_strength_reduction (gcc::context *ctxt)
{
return new pass_strength_reduction (ctxt);
}

View File

@ -4480,27 +4480,44 @@ rest_of_handle_if_conversion (void)
return 0;
}
struct rtl_opt_pass pass_rtl_ifcvt =
namespace {
const pass_data pass_data_rtl_ifcvt =
{
{
RTL_PASS,
"ce1", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_handle_if_conversion, /* gate */
rest_of_handle_if_conversion, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_IFCVT, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_df_finish | TODO_verify_rtl_sharing |
0 /* todo_flags_finish */
}
RTL_PASS, /* type */
"ce1", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_IFCVT, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_df_finish | TODO_verify_rtl_sharing | 0 ), /* todo_flags_finish */
};
class pass_rtl_ifcvt : public rtl_opt_pass
{
public:
pass_rtl_ifcvt(gcc::context *ctxt)
: rtl_opt_pass(pass_data_rtl_ifcvt, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_handle_if_conversion (); }
unsigned int execute () { return rest_of_handle_if_conversion (); }
}; // class pass_rtl_ifcvt
} // anon namespace
rtl_opt_pass *
make_pass_rtl_ifcvt (gcc::context *ctxt)
{
return new pass_rtl_ifcvt (ctxt);
}
static bool
gate_handle_if_after_combine (void)
{
@ -4518,26 +4535,44 @@ rest_of_handle_if_after_combine (void)
return 0;
}
struct rtl_opt_pass pass_if_after_combine =
namespace {
const pass_data pass_data_if_after_combine =
{
{
RTL_PASS,
"ce2", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_handle_if_after_combine, /* gate */
rest_of_handle_if_after_combine, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_IFCVT, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_df_finish | TODO_verify_rtl_sharing /* todo_flags_finish */
}
RTL_PASS, /* type */
"ce2", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_IFCVT, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_df_finish | TODO_verify_rtl_sharing ), /* todo_flags_finish */
};
class pass_if_after_combine : public rtl_opt_pass
{
public:
pass_if_after_combine(gcc::context *ctxt)
: rtl_opt_pass(pass_data_if_after_combine, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_handle_if_after_combine (); }
unsigned int execute () { return rest_of_handle_if_after_combine (); }
}; // class pass_if_after_combine
} // anon namespace
rtl_opt_pass *
make_pass_if_after_combine (gcc::context *ctxt)
{
return new pass_if_after_combine (ctxt);
}
static bool
gate_handle_if_after_reload (void)
@ -4554,22 +4589,40 @@ rest_of_handle_if_after_reload (void)
}
struct rtl_opt_pass pass_if_after_reload =
namespace {
const pass_data pass_data_if_after_reload =
{
{
RTL_PASS,
"ce3", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_handle_if_after_reload, /* gate */
rest_of_handle_if_after_reload, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_IFCVT2, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_df_finish | TODO_verify_rtl_sharing /* todo_flags_finish */
}
RTL_PASS, /* type */
"ce3", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_IFCVT2, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_df_finish | TODO_verify_rtl_sharing ), /* todo_flags_finish */
};
class pass_if_after_reload : public rtl_opt_pass
{
public:
pass_if_after_reload(gcc::context *ctxt)
: rtl_opt_pass(pass_data_if_after_reload, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_handle_if_after_reload (); }
unsigned int execute () { return rest_of_handle_if_after_reload (); }
}; // class pass_if_after_reload
} // anon namespace
rtl_opt_pass *
make_pass_if_after_reload (gcc::context *ctxt)
{
return new pass_if_after_reload (ctxt);
}

View File

@ -138,22 +138,40 @@ rest_of_handle_initialize_regs (void)
return 0;
}
struct rtl_opt_pass pass_initialize_regs =
namespace {
const pass_data pass_data_initialize_regs =
{
{
RTL_PASS,
"init-regs", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_initialize_regs, /* gate */
rest_of_handle_initialize_regs, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_df_finish /* todo_flags_finish */
}
RTL_PASS, /* type */
"init-regs", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_df_finish, /* todo_flags_finish */
};
class pass_initialize_regs : public rtl_opt_pass
{
public:
pass_initialize_regs(gcc::context *ctxt)
: rtl_opt_pass(pass_data_initialize_regs, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_initialize_regs (); }
unsigned int execute () { return rest_of_handle_initialize_regs (); }
}; // class pass_initialize_regs
} // anon namespace
rtl_opt_pass *
make_pass_initialize_regs (gcc::context *ctxt)
{
return new pass_initialize_regs (ctxt);
}

View File

@ -3652,32 +3652,51 @@ cgraph_gate_cp (void)
return flag_ipa_cp && optimize;
}
struct ipa_opt_pass_d pass_ipa_cp =
namespace {
const pass_data pass_data_ipa_cp =
{
{
IPA_PASS,
"cp", /* name */
OPTGROUP_NONE, /* optinfo_flags */
cgraph_gate_cp, /* gate */
ipcp_driver, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_IPA_CONSTANT_PROP, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_dump_symtab |
TODO_remove_functions /* todo_flags_finish */
},
ipcp_generate_summary, /* generate_summary */
ipcp_write_summary, /* write_summary */
ipcp_read_summary, /* read_summary */
ipa_prop_write_all_agg_replacement, /* write_optimization_summary */
ipa_prop_read_all_agg_replacement, /* read_optimization_summary */
NULL, /* stmt_fixup */
0, /* TODOs */
ipcp_transform_function, /* function_transform */
NULL, /* variable_transform */
IPA_PASS, /* type */
"cp", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_IPA_CONSTANT_PROP, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_dump_symtab | TODO_remove_functions ), /* todo_flags_finish */
};
class pass_ipa_cp : public ipa_opt_pass_d
{
public:
pass_ipa_cp(gcc::context *ctxt)
: ipa_opt_pass_d(pass_data_ipa_cp, ctxt,
ipcp_generate_summary, /* generate_summary */
ipcp_write_summary, /* write_summary */
ipcp_read_summary, /* read_summary */
ipa_prop_write_all_agg_replacement, /*
write_optimization_summary */
ipa_prop_read_all_agg_replacement, /*
read_optimization_summary */
NULL, /* stmt_fixup */
0, /* function_transform_todo_flags_start */
ipcp_transform_function, /* function_transform */
NULL) /* variable_transform */
{}
/* opt_pass methods: */
bool gate () { return cgraph_gate_cp (); }
unsigned int execute () { return ipcp_driver (); }
}; // class pass_ipa_cp
} // anon namespace
ipa_opt_pass_d *
make_pass_ipa_cp (gcc::context *ctxt)
{
return new pass_ipa_cp (ctxt);
}

View File

@ -2715,26 +2715,46 @@ compute_inline_parameters_for_current (void)
return 0;
}
struct gimple_opt_pass pass_inline_parameters =
namespace {
const pass_data pass_data_inline_parameters =
{
{
GIMPLE_PASS,
"inline_param", /* name */
OPTGROUP_INLINE, /* optinfo_flags */
NULL, /* gate */
compute_inline_parameters_for_current, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_INLINE_PARAMETERS, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"inline_param", /* name */
OPTGROUP_INLINE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_INLINE_PARAMETERS, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_inline_parameters : public gimple_opt_pass
{
public:
pass_inline_parameters(gcc::context *ctxt)
: gimple_opt_pass(pass_data_inline_parameters, ctxt)
{}
/* opt_pass methods: */
opt_pass * clone () { return new pass_inline_parameters (ctxt_); }
unsigned int execute () {
return compute_inline_parameters_for_current ();
}
}; // class pass_inline_parameters
} // anon namespace
gimple_opt_pass *
make_pass_inline_parameters (gcc::context *ctxt)
{
return new pass_inline_parameters (ctxt);
}
/* Estimate benefit devirtualizing indirect edge IE, provided KNOWN_VALS and
KNOWN_BINFOS. */

View File

@ -2086,26 +2086,43 @@ early_inliner (void)
return todo;
}
struct gimple_opt_pass pass_early_inline =
namespace {
const pass_data pass_data_early_inline =
{
{
GIMPLE_PASS,
"einline", /* name */
OPTGROUP_INLINE, /* optinfo_flags */
NULL, /* gate */
early_inliner, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_EARLY_INLINING, /* tv_id */
PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"einline", /* name */
OPTGROUP_INLINE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_EARLY_INLINING, /* tv_id */
PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_early_inline : public gimple_opt_pass
{
public:
pass_early_inline(gcc::context *ctxt)
: gimple_opt_pass(pass_data_early_inline, ctxt)
{}
/* opt_pass methods: */
unsigned int execute () { return early_inliner (); }
}; // class pass_early_inline
} // anon namespace
gimple_opt_pass *
make_pass_early_inline (gcc::context *ctxt)
{
return new pass_early_inline (ctxt);
}
/* When to run IPA inlining. Inlining of always-inline functions
happens during early inlining.
@ -2119,32 +2136,49 @@ gate_ipa_inline (void)
return optimize || flag_lto || flag_wpa;
}
struct ipa_opt_pass_d pass_ipa_inline =
namespace {
const pass_data pass_data_ipa_inline =
{
{
IPA_PASS,
"inline", /* name */
OPTGROUP_INLINE, /* optinfo_flags */
gate_ipa_inline, /* gate */
ipa_inline, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_IPA_INLINING, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
TODO_remove_functions, /* todo_flags_finish */
TODO_dump_symtab
| TODO_remove_functions /* todo_flags_finish */
},
inline_generate_summary, /* generate_summary */
inline_write_summary, /* write_summary */
inline_read_summary, /* read_summary */
NULL, /* write_optimization_summary */
NULL, /* read_optimization_summary */
NULL, /* stmt_fixup */
0, /* TODOs */
inline_transform, /* function_transform */
NULL, /* variable_transform */
IPA_PASS, /* type */
"inline", /* name */
OPTGROUP_INLINE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_IPA_INLINING, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
TODO_remove_functions, /* todo_flags_start */
( TODO_dump_symtab | TODO_remove_functions ), /* todo_flags_finish */
};
class pass_ipa_inline : public ipa_opt_pass_d
{
public:
pass_ipa_inline(gcc::context *ctxt)
: ipa_opt_pass_d(pass_data_ipa_inline, ctxt,
inline_generate_summary, /* generate_summary */
inline_write_summary, /* write_summary */
inline_read_summary, /* read_summary */
NULL, /* write_optimization_summary */
NULL, /* read_optimization_summary */
NULL, /* stmt_fixup */
0, /* function_transform_todo_flags_start */
inline_transform, /* function_transform */
NULL) /* variable_transform */
{}
/* opt_pass methods: */
bool gate () { return gate_ipa_inline (); }
unsigned int execute () { return ipa_inline (); }
}; // class pass_ipa_inline
} // anon namespace
ipa_opt_pass_d *
make_pass_ipa_inline (gcc::context *ctxt)
{
return new pass_ipa_inline (ctxt);
}

View File

@ -1498,35 +1498,53 @@ gate_pure_const (void)
&& !seen_error ());
}
struct ipa_opt_pass_d pass_ipa_pure_const =
namespace {
const pass_data pass_data_ipa_pure_const =
{
{
IPA_PASS,
"pure-const", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_pure_const, /* gate */
propagate, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_IPA_PURE_CONST, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
},
pure_const_generate_summary, /* generate_summary */
pure_const_write_summary, /* write_summary */
pure_const_read_summary, /* read_summary */
NULL, /* write_optimization_summary */
NULL, /* read_optimization_summary */
NULL, /* stmt_fixup */
0, /* TODOs */
NULL, /* function_transform */
NULL /* variable_transform */
IPA_PASS, /* type */
"pure-const", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_IPA_PURE_CONST, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_ipa_pure_const : public ipa_opt_pass_d
{
public:
pass_ipa_pure_const(gcc::context *ctxt)
: ipa_opt_pass_d(pass_data_ipa_pure_const, ctxt,
pure_const_generate_summary, /* generate_summary */
pure_const_write_summary, /* write_summary */
pure_const_read_summary, /* read_summary */
NULL, /* write_optimization_summary */
NULL, /* read_optimization_summary */
NULL, /* stmt_fixup */
0, /* function_transform_todo_flags_start */
NULL, /* function_transform */
NULL) /* variable_transform */
{}
/* opt_pass methods: */
bool gate () { return gate_pure_const (); }
unsigned int execute () { return propagate (); }
}; // class pass_ipa_pure_const
} // anon namespace
ipa_opt_pass_d *
make_pass_ipa_pure_const (gcc::context *ctxt)
{
return new pass_ipa_pure_const (ctxt);
}
/* Return true if function should be skipped for local pure const analysis. */
static bool
@ -1664,22 +1682,41 @@ local_pure_const (void)
return 0;
}
struct gimple_opt_pass pass_local_pure_const =
namespace {
const pass_data pass_data_local_pure_const =
{
{
GIMPLE_PASS,
"local-pure-const", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_pure_const, /* gate */
local_pure_const, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_IPA_PURE_CONST, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"local-pure-const", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_IPA_PURE_CONST, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_local_pure_const : public gimple_opt_pass
{
public:
pass_local_pure_const(gcc::context *ctxt)
: gimple_opt_pass(pass_data_local_pure_const, ctxt)
{}
/* opt_pass methods: */
opt_pass * clone () { return new pass_local_pure_const (ctxt_); }
bool gate () { return gate_pure_const (); }
unsigned int execute () { return local_pure_const (); }
}; // class pass_local_pure_const
} // anon namespace
gimple_opt_pass *
make_pass_local_pure_const (gcc::context *ctxt)
{
return new pass_local_pure_const (ctxt);
}

View File

@ -1155,31 +1155,51 @@ gate_reference (void)
&& !seen_error ());
}
struct ipa_opt_pass_d pass_ipa_reference =
namespace {
const pass_data pass_data_ipa_reference =
{
{
IPA_PASS,
"static-var", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_reference, /* gate */
propagate, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_IPA_REFERENCE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
},
NULL, /* generate_summary */
NULL, /* write_summary */
NULL, /* read_summary */
ipa_reference_write_optimization_summary,/* write_optimization_summary */
ipa_reference_read_optimization_summary,/* read_optimization_summary */
NULL, /* stmt_fixup */
0, /* TODOs */
NULL, /* function_transform */
NULL /* variable_transform */
IPA_PASS, /* type */
"static-var", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_IPA_REFERENCE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_ipa_reference : public ipa_opt_pass_d
{
public:
pass_ipa_reference(gcc::context *ctxt)
: ipa_opt_pass_d(pass_data_ipa_reference, ctxt,
NULL, /* generate_summary */
NULL, /* write_summary */
NULL, /* read_summary */
ipa_reference_write_optimization_summary, /*
write_optimization_summary */
ipa_reference_read_optimization_summary, /*
read_optimization_summary */
NULL, /* stmt_fixup */
0, /* function_transform_todo_flags_start */
NULL, /* function_transform */
NULL) /* variable_transform */
{}
/* opt_pass methods: */
bool gate () { return gate_reference (); }
unsigned int execute () { return propagate (); }
}; // class pass_ipa_reference
} // anon namespace
ipa_opt_pass_d *
make_pass_ipa_reference (gcc::context *ctxt)
{
return new pass_ipa_reference (ctxt);
}

View File

@ -1624,26 +1624,44 @@ gate_split_functions (void)
&& !profile_arc_flag && !flag_branch_probabilities);
}
struct gimple_opt_pass pass_split_functions =
namespace {
const pass_data pass_data_split_functions =
{
{
GIMPLE_PASS,
"fnsplit", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_split_functions, /* gate */
execute_split_functions, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_IPA_FNSPLIT, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_all /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"fnsplit", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_IPA_FNSPLIT, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_all, /* todo_flags_finish */
};
class pass_split_functions : public gimple_opt_pass
{
public:
pass_split_functions(gcc::context *ctxt)
: gimple_opt_pass(pass_data_split_functions, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_split_functions (); }
unsigned int execute () { return execute_split_functions (); }
}; // class pass_split_functions
} // anon namespace
gimple_opt_pass *
make_pass_split_functions (gcc::context *ctxt)
{
return new pass_split_functions (ctxt);
}
/* Gate feedback driven function splitting pass.
We don't need to split when profiling at all, we are producing
lousy code anyway. */
@ -1666,22 +1684,40 @@ execute_feedback_split_functions (void)
return retval;
}
struct gimple_opt_pass pass_feedback_split_functions =
namespace {
const pass_data pass_data_feedback_split_functions =
{
{
GIMPLE_PASS,
"feedback_fnsplit", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_feedback_split_functions, /* gate */
execute_feedback_split_functions, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_IPA_FNSPLIT, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_all /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"feedback_fnsplit", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_IPA_FNSPLIT, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_all, /* todo_flags_finish */
};
class pass_feedback_split_functions : public gimple_opt_pass
{
public:
pass_feedback_split_functions(gcc::context *ctxt)
: gimple_opt_pass(pass_data_feedback_split_functions, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_feedback_split_functions (); }
unsigned int execute () { return execute_feedback_split_functions (); }
}; // class pass_feedback_split_functions
} // anon namespace
gimple_opt_pass *
make_pass_feedback_split_functions (gcc::context *ctxt)
{
return new pass_feedback_split_functions (ctxt);
}

318
gcc/ipa.c
View File

@ -1012,26 +1012,45 @@ local_function_and_variable_visibility (void)
return function_and_variable_visibility (flag_whole_program && !flag_lto);
}
struct simple_ipa_opt_pass pass_ipa_function_and_variable_visibility =
namespace {
const pass_data pass_data_ipa_function_and_variable_visibility =
{
{
SIMPLE_IPA_PASS,
"visibility", /* name */
OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
local_function_and_variable_visibility,/* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_CGRAPHOPT, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_remove_functions | TODO_dump_symtab /* todo_flags_finish */
}
SIMPLE_IPA_PASS, /* type */
"visibility", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_CGRAPHOPT, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_remove_functions | TODO_dump_symtab ), /* todo_flags_finish */
};
class pass_ipa_function_and_variable_visibility : public simple_ipa_opt_pass
{
public:
pass_ipa_function_and_variable_visibility(gcc::context *ctxt)
: simple_ipa_opt_pass(pass_data_ipa_function_and_variable_visibility, ctxt)
{}
/* opt_pass methods: */
unsigned int execute () {
return local_function_and_variable_visibility ();
}
}; // class pass_ipa_function_and_variable_visibility
} // anon namespace
simple_ipa_opt_pass *
make_pass_ipa_function_and_variable_visibility (gcc::context *ctxt)
{
return new pass_ipa_function_and_variable_visibility (ctxt);
}
/* Free inline summary. */
static unsigned
@ -1041,26 +1060,43 @@ free_inline_summary (void)
return 0;
}
struct simple_ipa_opt_pass pass_ipa_free_inline_summary =
namespace {
const pass_data pass_data_ipa_free_inline_summary =
{
{
SIMPLE_IPA_PASS,
"*free_inline_summary", /* name */
OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
free_inline_summary, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_IPA_FREE_INLINE_SUMMARY, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
SIMPLE_IPA_PASS, /* type */
"*free_inline_summary", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_IPA_FREE_INLINE_SUMMARY, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_ipa_free_inline_summary : public simple_ipa_opt_pass
{
public:
pass_ipa_free_inline_summary(gcc::context *ctxt)
: simple_ipa_opt_pass(pass_data_ipa_free_inline_summary, ctxt)
{}
/* opt_pass methods: */
unsigned int execute () { return free_inline_summary (); }
}; // class pass_ipa_free_inline_summary
} // anon namespace
simple_ipa_opt_pass *
make_pass_ipa_free_inline_summary (gcc::context *ctxt)
{
return new pass_ipa_free_inline_summary (ctxt);
}
/* Do not re-run on ltrans stage. */
static bool
@ -1080,35 +1116,57 @@ whole_program_function_and_variable_visibility (void)
return 0;
}
struct ipa_opt_pass_d pass_ipa_whole_program_visibility =
namespace {
const pass_data pass_data_ipa_whole_program_visibility =
{
{
IPA_PASS,
"whole-program", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_whole_program_function_and_variable_visibility,/* gate */
whole_program_function_and_variable_visibility,/* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_CGRAPHOPT, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_remove_functions | TODO_dump_symtab /* todo_flags_finish */
},
NULL, /* generate_summary */
NULL, /* write_summary */
NULL, /* read_summary */
NULL, /* write_optimization_summary */
NULL, /* read_optimization_summary */
NULL, /* stmt_fixup */
0, /* TODOs */
NULL, /* function_transform */
NULL, /* variable_transform */
IPA_PASS, /* type */
"whole-program", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_CGRAPHOPT, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_remove_functions | TODO_dump_symtab ), /* todo_flags_finish */
};
class pass_ipa_whole_program_visibility : public ipa_opt_pass_d
{
public:
pass_ipa_whole_program_visibility(gcc::context *ctxt)
: ipa_opt_pass_d(pass_data_ipa_whole_program_visibility, ctxt,
NULL, /* generate_summary */
NULL, /* write_summary */
NULL, /* read_summary */
NULL, /* write_optimization_summary */
NULL, /* read_optimization_summary */
NULL, /* stmt_fixup */
0, /* function_transform_todo_flags_start */
NULL, /* function_transform */
NULL) /* variable_transform */
{}
/* opt_pass methods: */
bool gate () {
return gate_whole_program_function_and_variable_visibility ();
}
unsigned int execute () {
return whole_program_function_and_variable_visibility ();
}
}; // class pass_ipa_whole_program_visibility
} // anon namespace
ipa_opt_pass_d *
make_pass_ipa_whole_program_visibility (gcc::context *ctxt)
{
return new pass_ipa_whole_program_visibility (ctxt);
}
/* Entry in the histogram. */
struct histogram_entry
@ -1427,35 +1485,53 @@ gate_ipa_profile (void)
return flag_ipa_profile;
}
struct ipa_opt_pass_d pass_ipa_profile =
namespace {
const pass_data pass_data_ipa_profile =
{
{
IPA_PASS,
"profile_estimate", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_ipa_profile, /* gate */
ipa_profile, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_IPA_PROFILE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
},
ipa_profile_generate_summary, /* generate_summary */
ipa_profile_write_summary, /* write_summary */
ipa_profile_read_summary, /* read_summary */
NULL, /* write_optimization_summary */
NULL, /* read_optimization_summary */
NULL, /* stmt_fixup */
0, /* TODOs */
NULL, /* function_transform */
NULL /* variable_transform */
IPA_PASS, /* type */
"profile_estimate", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_IPA_PROFILE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_ipa_profile : public ipa_opt_pass_d
{
public:
pass_ipa_profile(gcc::context *ctxt)
: ipa_opt_pass_d(pass_data_ipa_profile, ctxt,
ipa_profile_generate_summary, /* generate_summary */
ipa_profile_write_summary, /* write_summary */
ipa_profile_read_summary, /* read_summary */
NULL, /* write_optimization_summary */
NULL, /* read_optimization_summary */
NULL, /* stmt_fixup */
0, /* function_transform_todo_flags_start */
NULL, /* function_transform */
NULL) /* variable_transform */
{}
/* opt_pass methods: */
bool gate () { return gate_ipa_profile (); }
unsigned int execute () { return ipa_profile (); }
}; // class pass_ipa_profile
} // anon namespace
ipa_opt_pass_d *
make_pass_ipa_profile (gcc::context *ctxt)
{
return new pass_ipa_profile (ctxt);
}
/* Generate and emit a static constructor or destructor. WHICH must
be one of 'I' (for a constructor) or 'D' (for a destructor). BODY
is a STATEMENT_LIST containing GENERIC statements. PRIORITY is the
@ -1738,31 +1814,49 @@ gate_ipa_cdtor_merge (void)
return !targetm.have_ctors_dtors || (optimize && in_lto_p);
}
struct ipa_opt_pass_d pass_ipa_cdtor_merge =
namespace {
const pass_data pass_data_ipa_cdtor_merge =
{
{
IPA_PASS,
"cdtor", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_ipa_cdtor_merge, /* gate */
ipa_cdtor_merge, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_CGRAPHOPT, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
},
NULL, /* generate_summary */
NULL, /* write_summary */
NULL, /* read_summary */
NULL, /* write_optimization_summary */
NULL, /* read_optimization_summary */
NULL, /* stmt_fixup */
0, /* TODOs */
NULL, /* function_transform */
NULL /* variable_transform */
IPA_PASS, /* type */
"cdtor", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_CGRAPHOPT, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_ipa_cdtor_merge : public ipa_opt_pass_d
{
public:
pass_ipa_cdtor_merge(gcc::context *ctxt)
: ipa_opt_pass_d(pass_data_ipa_cdtor_merge, ctxt,
NULL, /* generate_summary */
NULL, /* write_summary */
NULL, /* read_summary */
NULL, /* write_optimization_summary */
NULL, /* read_optimization_summary */
NULL, /* stmt_fixup */
0, /* function_transform_todo_flags_start */
NULL, /* function_transform */
NULL) /* variable_transform */
{}
/* opt_pass methods: */
bool gate () { return gate_ipa_cdtor_merge (); }
unsigned int execute () { return ipa_cdtor_merge (); }
}; // class pass_ipa_cdtor_merge
} // anon namespace
ipa_opt_pass_d *
make_pass_ipa_cdtor_merge (gcc::context *ctxt)
{
return new pass_ipa_cdtor_merge (ctxt);
}

102
gcc/ira.c
View File

@ -4775,26 +4775,43 @@ rest_of_handle_ira (void)
return 0;
}
struct rtl_opt_pass pass_ira =
namespace {
const pass_data pass_data_ira =
{
{
RTL_PASS,
"ira", /* name */
OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
rest_of_handle_ira, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_IRA, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_do_not_ggc_collect /* todo_flags_finish */
}
RTL_PASS, /* type */
"ira", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_IRA, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_do_not_ggc_collect, /* todo_flags_finish */
};
class pass_ira : public rtl_opt_pass
{
public:
pass_ira(gcc::context *ctxt)
: rtl_opt_pass(pass_data_ira, ctxt)
{}
/* opt_pass methods: */
unsigned int execute () { return rest_of_handle_ira (); }
}; // class pass_ira
} // anon namespace
rtl_opt_pass *
make_pass_ira (gcc::context *ctxt)
{
return new pass_ira (ctxt);
}
static unsigned int
rest_of_handle_reload (void)
{
@ -4802,22 +4819,39 @@ rest_of_handle_reload (void)
return 0;
}
struct rtl_opt_pass pass_reload =
namespace {
const pass_data pass_data_reload =
{
{
RTL_PASS,
"reload", /* name */
OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
rest_of_handle_reload, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_RELOAD, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
RTL_PASS, /* type */
"reload", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_RELOAD, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_reload : public rtl_opt_pass
{
public:
pass_reload(gcc::context *ctxt)
: rtl_opt_pass(pass_data_reload, ctxt)
{}
/* opt_pass methods: */
unsigned int execute () { return rest_of_handle_reload (); }
}; // class pass_reload
} // anon namespace
rtl_opt_pass *
make_pass_reload (gcc::context *ctxt)
{
return new pass_reload (ctxt);
}

View File

@ -139,26 +139,43 @@ cleanup_barriers (void)
return 0;
}
struct rtl_opt_pass pass_cleanup_barriers =
namespace {
const pass_data pass_data_cleanup_barriers =
{
{
RTL_PASS,
"barriers", /* name */
OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
cleanup_barriers, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
RTL_PASS, /* type */
"barriers", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_cleanup_barriers : public rtl_opt_pass
{
public:
pass_cleanup_barriers(gcc::context *ctxt)
: rtl_opt_pass(pass_data_cleanup_barriers, ctxt)
{}
/* opt_pass methods: */
unsigned int execute () { return cleanup_barriers (); }
}; // class pass_cleanup_barriers
} // anon namespace
rtl_opt_pass *
make_pass_cleanup_barriers (gcc::context *ctxt)
{
return new pass_cleanup_barriers (ctxt);
}
/* Initialize LABEL_NUSES and JUMP_LABEL fields, add REG_LABEL_TARGET
for remaining targets for JUMP_P. Delete any REG_LABEL_OPERAND

View File

@ -316,26 +316,43 @@ gate_handle_loop2 (void)
}
}
struct rtl_opt_pass pass_loop2 =
namespace {
const pass_data pass_data_loop2 =
{
{
RTL_PASS,
"loop2", /* name */
OPTGROUP_LOOP, /* optinfo_flags */
gate_handle_loop2, /* gate */
NULL, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_LOOP, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
RTL_PASS, /* type */
"loop2", /* name */
OPTGROUP_LOOP, /* optinfo_flags */
true, /* has_gate */
false, /* has_execute */
TV_LOOP, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_loop2 : public rtl_opt_pass
{
public:
pass_loop2(gcc::context *ctxt)
: rtl_opt_pass(pass_data_loop2, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_handle_loop2 (); }
}; // class pass_loop2
} // anon namespace
rtl_opt_pass *
make_pass_loop2 (gcc::context *ctxt)
{
return new pass_loop2 (ctxt);
}
/* Initialization of the RTL loop passes. */
static unsigned int
@ -353,26 +370,43 @@ rtl_loop_init (void)
return 0;
}
struct rtl_opt_pass pass_rtl_loop_init =
namespace {
const pass_data pass_data_rtl_loop_init =
{
{
RTL_PASS,
"loop2_init", /* name */
OPTGROUP_LOOP, /* optinfo_flags */
NULL, /* gate */
rtl_loop_init, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_LOOP, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_rtl_sharing /* todo_flags_finish */
}
RTL_PASS, /* type */
"loop2_init", /* name */
OPTGROUP_LOOP, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_LOOP, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_rtl_sharing, /* todo_flags_finish */
};
class pass_rtl_loop_init : public rtl_opt_pass
{
public:
pass_rtl_loop_init(gcc::context *ctxt)
: rtl_opt_pass(pass_data_rtl_loop_init, ctxt)
{}
/* opt_pass methods: */
unsigned int execute () { return rtl_loop_init (); }
}; // class pass_rtl_loop_init
} // anon namespace
rtl_opt_pass *
make_pass_rtl_loop_init (gcc::context *ctxt)
{
return new pass_rtl_loop_init (ctxt);
}
/* Finalization of the RTL loop passes. */
@ -394,27 +428,43 @@ rtl_loop_done (void)
return 0;
}
struct rtl_opt_pass pass_rtl_loop_done =
namespace {
const pass_data pass_data_rtl_loop_done =
{
{
RTL_PASS,
"loop2_done", /* name */
OPTGROUP_LOOP, /* optinfo_flags */
NULL, /* gate */
rtl_loop_done, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_LOOP, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
PROP_loops, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_flow
| TODO_verify_rtl_sharing /* todo_flags_finish */
}
RTL_PASS, /* type */
"loop2_done", /* name */
OPTGROUP_LOOP, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_LOOP, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
PROP_loops, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_verify_flow | TODO_verify_rtl_sharing ), /* todo_flags_finish */
};
class pass_rtl_loop_done : public rtl_opt_pass
{
public:
pass_rtl_loop_done(gcc::context *ctxt)
: rtl_opt_pass(pass_data_rtl_loop_done, ctxt)
{}
/* opt_pass methods: */
unsigned int execute () { return rtl_loop_done (); }
}; // class pass_rtl_loop_done
} // anon namespace
rtl_opt_pass *
make_pass_rtl_loop_done (gcc::context *ctxt)
{
return new pass_rtl_loop_done (ctxt);
}
/* Loop invariant code motion. */
static bool
@ -431,27 +481,45 @@ rtl_move_loop_invariants (void)
return 0;
}
struct rtl_opt_pass pass_rtl_move_loop_invariants =
namespace {
const pass_data pass_data_rtl_move_loop_invariants =
{
{
RTL_PASS,
"loop2_invariant", /* name */
OPTGROUP_LOOP, /* optinfo_flags */
gate_rtl_move_loop_invariants, /* gate */
rtl_move_loop_invariants, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_LOOP_MOVE_INVARIANTS, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_df_verify |
TODO_df_finish | TODO_verify_rtl_sharing /* todo_flags_finish */
}
RTL_PASS, /* type */
"loop2_invariant", /* name */
OPTGROUP_LOOP, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_LOOP_MOVE_INVARIANTS, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_df_verify | TODO_df_finish
| TODO_verify_rtl_sharing ), /* todo_flags_finish */
};
class pass_rtl_move_loop_invariants : public rtl_opt_pass
{
public:
pass_rtl_move_loop_invariants(gcc::context *ctxt)
: rtl_opt_pass(pass_data_rtl_move_loop_invariants, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_rtl_move_loop_invariants (); }
unsigned int execute () { return rtl_move_loop_invariants (); }
}; // class pass_rtl_move_loop_invariants
} // anon namespace
rtl_opt_pass *
make_pass_rtl_move_loop_invariants (gcc::context *ctxt)
{
return new pass_rtl_move_loop_invariants (ctxt);
}
/* Loop unswitching for RTL. */
static bool
@ -468,26 +536,44 @@ rtl_unswitch (void)
return 0;
}
struct rtl_opt_pass pass_rtl_unswitch =
namespace {
const pass_data pass_data_rtl_unswitch =
{
{
RTL_PASS,
"loop2_unswitch", /* name */
OPTGROUP_LOOP, /* optinfo_flags */
gate_rtl_unswitch, /* gate */
rtl_unswitch, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_LOOP_UNSWITCH, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_rtl_sharing, /* todo_flags_finish */
}
RTL_PASS, /* type */
"loop2_unswitch", /* name */
OPTGROUP_LOOP, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_LOOP_UNSWITCH, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_rtl_sharing, /* todo_flags_finish */
};
class pass_rtl_unswitch : public rtl_opt_pass
{
public:
pass_rtl_unswitch(gcc::context *ctxt)
: rtl_opt_pass(pass_data_rtl_unswitch, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_rtl_unswitch (); }
unsigned int execute () { return rtl_unswitch (); }
}; // class pass_rtl_unswitch
} // anon namespace
rtl_opt_pass *
make_pass_rtl_unswitch (gcc::context *ctxt)
{
return new pass_rtl_unswitch (ctxt);
}
/* Loop unswitching for RTL. */
static bool
@ -517,26 +603,44 @@ rtl_unroll_and_peel_loops (void)
return 0;
}
struct rtl_opt_pass pass_rtl_unroll_and_peel_loops =
namespace {
const pass_data pass_data_rtl_unroll_and_peel_loops =
{
{
RTL_PASS,
"loop2_unroll", /* name */
OPTGROUP_LOOP, /* optinfo_flags */
gate_rtl_unroll_and_peel_loops, /* gate */
rtl_unroll_and_peel_loops, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_LOOP_UNROLL, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_rtl_sharing, /* todo_flags_finish */
}
RTL_PASS, /* type */
"loop2_unroll", /* name */
OPTGROUP_LOOP, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_LOOP_UNROLL, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_rtl_sharing, /* todo_flags_finish */
};
class pass_rtl_unroll_and_peel_loops : public rtl_opt_pass
{
public:
pass_rtl_unroll_and_peel_loops(gcc::context *ctxt)
: rtl_opt_pass(pass_data_rtl_unroll_and_peel_loops, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_rtl_unroll_and_peel_loops (); }
unsigned int execute () { return rtl_unroll_and_peel_loops (); }
}; // class pass_rtl_unroll_and_peel_loops
} // anon namespace
rtl_opt_pass *
make_pass_rtl_unroll_and_peel_loops (gcc::context *ctxt)
{
return new pass_rtl_unroll_and_peel_loops (ctxt);
}
/* The doloop optimization. */
static bool
@ -559,22 +663,40 @@ rtl_doloop (void)
return 0;
}
struct rtl_opt_pass pass_rtl_doloop =
namespace {
const pass_data pass_data_rtl_doloop =
{
{
RTL_PASS,
"loop2_doloop", /* name */
OPTGROUP_LOOP, /* optinfo_flags */
gate_rtl_doloop, /* gate */
rtl_doloop, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_LOOP_DOLOOP, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_rtl_sharing /* todo_flags_finish */
}
RTL_PASS, /* type */
"loop2_doloop", /* name */
OPTGROUP_LOOP, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_LOOP_DOLOOP, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_rtl_sharing, /* todo_flags_finish */
};
class pass_rtl_doloop : public rtl_opt_pass
{
public:
pass_rtl_doloop(gcc::context *ctxt)
: rtl_opt_pass(pass_data_rtl_doloop, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_rtl_doloop (); }
unsigned int execute () { return rtl_doloop (); }
}; // class pass_rtl_doloop
} // anon namespace
rtl_opt_pass *
make_pass_rtl_doloop (gcc::context *ctxt)
{
return new pass_rtl_doloop (ctxt);
}

View File

@ -1689,43 +1689,79 @@ rest_of_handle_lower_subreg2 (void)
return 0;
}
struct rtl_opt_pass pass_lower_subreg =
namespace {
const pass_data pass_data_lower_subreg =
{
{
RTL_PASS,
"subreg1", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_handle_lower_subreg, /* gate */
rest_of_handle_lower_subreg, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_LOWER_SUBREG, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_flow /* todo_flags_finish */
}
RTL_PASS, /* type */
"subreg1", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_LOWER_SUBREG, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_flow, /* todo_flags_finish */
};
struct rtl_opt_pass pass_lower_subreg2 =
class pass_lower_subreg : public rtl_opt_pass
{
{
RTL_PASS,
"subreg2", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_handle_lower_subreg, /* gate */
rest_of_handle_lower_subreg2, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_LOWER_SUBREG, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_df_finish | TODO_verify_rtl_sharing |
TODO_verify_flow /* todo_flags_finish */
}
public:
pass_lower_subreg(gcc::context *ctxt)
: rtl_opt_pass(pass_data_lower_subreg, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_handle_lower_subreg (); }
unsigned int execute () { return rest_of_handle_lower_subreg (); }
}; // class pass_lower_subreg
} // anon namespace
rtl_opt_pass *
make_pass_lower_subreg (gcc::context *ctxt)
{
return new pass_lower_subreg (ctxt);
}
namespace {
const pass_data pass_data_lower_subreg2 =
{
RTL_PASS, /* type */
"subreg2", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_LOWER_SUBREG, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_df_finish | TODO_verify_rtl_sharing
| TODO_verify_flow ), /* todo_flags_finish */
};
class pass_lower_subreg2 : public rtl_opt_pass
{
public:
pass_lower_subreg2(gcc::context *ctxt)
: rtl_opt_pass(pass_data_lower_subreg2, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_handle_lower_subreg (); }
unsigned int execute () { return rest_of_handle_lower_subreg2 (); }
}; // class pass_lower_subreg2
} // anon namespace
rtl_opt_pass *
make_pass_lower_subreg2 (gcc::context *ctxt)
{
return new pass_lower_subreg2 (ctxt);
}

View File

@ -1988,35 +1988,52 @@ lto_output (void)
#endif
}
struct ipa_opt_pass_d pass_ipa_lto_gimple_out =
namespace {
const pass_data pass_data_ipa_lto_gimple_out =
{
{
IPA_PASS,
"lto_gimple_out", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_lto_out, /* gate */
NULL, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_IPA_LTO_GIMPLE_OUT, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
},
NULL, /* generate_summary */
lto_output, /* write_summary */
NULL, /* read_summary */
lto_output, /* write_optimization_summary */
NULL, /* read_optimization_summary */
NULL, /* stmt_fixup */
0, /* TODOs */
NULL, /* function_transform */
NULL /* variable_transform */
IPA_PASS, /* type */
"lto_gimple_out", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
false, /* has_execute */
TV_IPA_LTO_GIMPLE_OUT, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_ipa_lto_gimple_out : public ipa_opt_pass_d
{
public:
pass_ipa_lto_gimple_out(gcc::context *ctxt)
: ipa_opt_pass_d(pass_data_ipa_lto_gimple_out, ctxt,
NULL, /* generate_summary */
lto_output, /* write_summary */
NULL, /* read_summary */
lto_output, /* write_optimization_summary */
NULL, /* read_optimization_summary */
NULL, /* stmt_fixup */
0, /* function_transform_todo_flags_start */
NULL, /* function_transform */
NULL) /* variable_transform */
{}
/* opt_pass methods: */
bool gate () { return gate_lto_out (); }
}; // class pass_ipa_lto_gimple_out
} // anon namespace
ipa_opt_pass_d *
make_pass_ipa_lto_gimple_out (gcc::context *ctxt)
{
return new pass_ipa_lto_gimple_out (ctxt);
}
/* Write each node in encoded by ENCODER to OB, as well as those reachable
from it and required for correct representation of its semantics.
@ -2443,31 +2460,48 @@ produce_asm_for_decls (void)
}
struct ipa_opt_pass_d pass_ipa_lto_finish_out =
namespace {
const pass_data pass_data_ipa_lto_finish_out =
{
{
IPA_PASS,
"lto_decls_out", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_lto_out, /* gate */
NULL, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_IPA_LTO_DECL_OUT, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
},
NULL, /* generate_summary */
produce_asm_for_decls, /* write_summary */
NULL, /* read_summary */
produce_asm_for_decls, /* write_optimization_summary */
NULL, /* read_optimization_summary */
NULL, /* stmt_fixup */
0, /* TODOs */
NULL, /* function_transform */
NULL /* variable_transform */
IPA_PASS, /* type */
"lto_decls_out", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
false, /* has_execute */
TV_IPA_LTO_DECL_OUT, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_ipa_lto_finish_out : public ipa_opt_pass_d
{
public:
pass_ipa_lto_finish_out(gcc::context *ctxt)
: ipa_opt_pass_d(pass_data_ipa_lto_finish_out, ctxt,
NULL, /* generate_summary */
produce_asm_for_decls, /* write_summary */
NULL, /* read_summary */
produce_asm_for_decls, /* write_optimization_summary */
NULL, /* read_optimization_summary */
NULL, /* stmt_fixup */
0, /* function_transform_todo_flags_start */
NULL, /* function_transform */
NULL) /* variable_transform */
{}
/* opt_pass methods: */
bool gate () { return gate_lto_out (); }
}; // class pass_ipa_lto_finish_out
} // anon namespace
ipa_opt_pass_d *
make_pass_ipa_lto_finish_out (gcc::context *ctxt)
{
return new pass_ipa_lto_finish_out (ctxt);
}

View File

@ -784,23 +784,40 @@ rest_of_handle_mode_switching (void)
}
struct rtl_opt_pass pass_mode_switching =
namespace {
const pass_data pass_data_mode_switching =
{
{
RTL_PASS,
"mode_sw", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_mode_switching, /* gate */
rest_of_handle_mode_switching, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_MODE_SWITCH, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_df_finish | TODO_verify_rtl_sharing |
0 /* todo_flags_finish */
}
RTL_PASS, /* type */
"mode_sw", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_MODE_SWITCH, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_df_finish | TODO_verify_rtl_sharing | 0 ), /* todo_flags_finish */
};
class pass_mode_switching : public rtl_opt_pass
{
public:
pass_mode_switching(gcc::context *ctxt)
: rtl_opt_pass(pass_data_mode_switching, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_mode_switching (); }
unsigned int execute () { return rest_of_handle_mode_switching (); }
}; // class pass_mode_switching
} // anon namespace
rtl_opt_pass *
make_pass_mode_switching (gcc::context *ctxt)
{
return new pass_mode_switching (ctxt);
}

View File

@ -3351,24 +3351,41 @@ rest_of_handle_sms (void)
return 0;
}
struct rtl_opt_pass pass_sms =
namespace {
const pass_data pass_data_sms =
{
{
RTL_PASS,
"sms", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_handle_sms, /* gate */
rest_of_handle_sms, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_SMS, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_df_finish
| TODO_verify_flow
| TODO_verify_rtl_sharing /* todo_flags_finish */
}
RTL_PASS, /* type */
"sms", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_SMS, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_df_finish | TODO_verify_flow
| TODO_verify_rtl_sharing ), /* todo_flags_finish */
};
class pass_sms : public rtl_opt_pass
{
public:
pass_sms(gcc::context *ctxt)
: rtl_opt_pass(pass_data_sms, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_handle_sms (); }
unsigned int execute () { return rest_of_handle_sms (); }
}; // class pass_sms
} // anon namespace
rtl_opt_pass *
make_pass_sms (gcc::context *ctxt)
{
return new pass_sms (ctxt);
}

View File

@ -6018,25 +6018,43 @@ gate_expand_omp (void)
return (flag_openmp != 0 && !seen_error ());
}
struct gimple_opt_pass pass_expand_omp =
namespace {
const pass_data pass_data_expand_omp =
{
{
GIMPLE_PASS,
"ompexp", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_expand_omp, /* gate */
execute_expand_omp, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
PROP_gimple_any, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"ompexp", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
PROP_gimple_any, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_expand_omp : public gimple_opt_pass
{
public:
pass_expand_omp(gcc::context *ctxt)
: gimple_opt_pass(pass_data_expand_omp, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_expand_omp (); }
unsigned int execute () { return execute_expand_omp (); }
}; // class pass_expand_omp
} // anon namespace
gimple_opt_pass *
make_pass_expand_omp (gcc::context *ctxt)
{
return new pass_expand_omp (ctxt);
}
/* Routines to lower OpenMP directives into OMP-GIMPLE. */
@ -7193,25 +7211,42 @@ execute_lower_omp (void)
return 0;
}
struct gimple_opt_pass pass_lower_omp =
namespace {
const pass_data pass_data_lower_omp =
{
{
GIMPLE_PASS,
"omplower", /* name */
OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
execute_lower_omp, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
PROP_gimple_any, /* properties_required */
PROP_gimple_lomp, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"omplower", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
PROP_gimple_any, /* properties_required */
PROP_gimple_lomp, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_lower_omp : public gimple_opt_pass
{
public:
pass_lower_omp(gcc::context *ctxt)
: gimple_opt_pass(pass_data_lower_omp, ctxt)
{}
/* opt_pass methods: */
unsigned int execute () { return execute_lower_omp (); }
}; // class pass_lower_omp
} // anon namespace
gimple_opt_pass *
make_pass_lower_omp (gcc::context *ctxt)
{
return new pass_lower_omp (ctxt);
}
/* The following is a utility to diagnose OpenMP structured block violations.
It is not part of the "omplower" pass, as that's invoked too late. It
@ -7457,24 +7492,44 @@ gate_diagnose_omp_blocks (void)
return flag_openmp != 0;
}
struct gimple_opt_pass pass_diagnose_omp_blocks =
namespace {
const pass_data pass_data_diagnose_omp_blocks =
{
{
GIMPLE_PASS,
"*diagnose_omp_blocks", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_diagnose_omp_blocks, /* gate */
diagnose_omp_structured_block_errors, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
PROP_gimple_any, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"*diagnose_omp_blocks", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
PROP_gimple_any, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_diagnose_omp_blocks : public gimple_opt_pass
{
public:
pass_diagnose_omp_blocks(gcc::context *ctxt)
: gimple_opt_pass(pass_data_diagnose_omp_blocks, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_diagnose_omp_blocks (); }
unsigned int execute () {
return diagnose_omp_structured_block_errors ();
}
}; // class pass_diagnose_omp_blocks
} // anon namespace
gimple_opt_pass *
make_pass_diagnose_omp_blocks (gcc::context *ctxt)
{
return new pass_diagnose_omp_blocks (ctxt);
}
#include "gt-omp-low.h"

View File

@ -330,26 +330,44 @@ gate_all_early_local_passes (void)
return (!seen_error () && !in_lto_p);
}
struct simple_ipa_opt_pass pass_early_local_passes =
namespace {
const pass_data pass_data_early_local_passes =
{
{
SIMPLE_IPA_PASS,
"early_local_cleanups", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_all_early_local_passes, /* gate */
execute_all_early_local_passes, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_EARLY_LOCAL, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_remove_functions /* todo_flags_finish */
}
SIMPLE_IPA_PASS, /* type */
"early_local_cleanups", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_EARLY_LOCAL, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_remove_functions, /* todo_flags_finish */
};
class pass_early_local_passes : public simple_ipa_opt_pass
{
public:
pass_early_local_passes(gcc::context *ctxt)
: simple_ipa_opt_pass(pass_data_early_local_passes, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_all_early_local_passes (); }
unsigned int execute () { return execute_all_early_local_passes (); }
}; // class pass_early_local_passes
} // anon namespace
simple_ipa_opt_pass *
make_pass_early_local_passes (gcc::context *ctxt)
{
return new pass_early_local_passes (ctxt);
}
/* Gate: execute, or not, all of the non-trivial optimizations. */
static bool
@ -360,26 +378,43 @@ gate_all_early_optimizations (void)
&& !seen_error ());
}
static struct gimple_opt_pass pass_all_early_optimizations =
namespace {
const pass_data pass_data_all_early_optimizations =
{
{
GIMPLE_PASS,
"early_optimizations", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_all_early_optimizations, /* gate */
NULL, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"early_optimizations", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
false, /* has_execute */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_all_early_optimizations : public gimple_opt_pass
{
public:
pass_all_early_optimizations(gcc::context *ctxt)
: gimple_opt_pass(pass_data_all_early_optimizations, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_all_early_optimizations (); }
}; // class pass_all_early_optimizations
} // anon namespace
static gimple_opt_pass *
make_pass_all_early_optimizations (gcc::context *ctxt)
{
return new pass_all_early_optimizations (ctxt);
}
/* Gate: execute, or not, all of the non-trivial optimizations. */
static bool
@ -388,26 +423,43 @@ gate_all_optimizations (void)
return optimize >= 1 && !optimize_debug;
}
static struct gimple_opt_pass pass_all_optimizations =
namespace {
const pass_data pass_data_all_optimizations =
{
{
GIMPLE_PASS,
"*all_optimizations", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_all_optimizations, /* gate */
NULL, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_OPTIMIZE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"*all_optimizations", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
false, /* has_execute */
TV_OPTIMIZE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_all_optimizations : public gimple_opt_pass
{
public:
pass_all_optimizations(gcc::context *ctxt)
: gimple_opt_pass(pass_data_all_optimizations, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_all_optimizations (); }
}; // class pass_all_optimizations
} // anon namespace
static gimple_opt_pass *
make_pass_all_optimizations (gcc::context *ctxt)
{
return new pass_all_optimizations (ctxt);
}
/* Gate: execute, or not, all of the non-trivial optimizations. */
static bool
@ -416,26 +468,43 @@ gate_all_optimizations_g (void)
return optimize >= 1 && optimize_debug;
}
static struct gimple_opt_pass pass_all_optimizations_g =
namespace {
const pass_data pass_data_all_optimizations_g =
{
{
GIMPLE_PASS,
"*all_optimizations_g", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_all_optimizations_g, /* gate */
NULL, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_OPTIMIZE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"*all_optimizations_g", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
false, /* has_execute */
TV_OPTIMIZE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_all_optimizations_g : public gimple_opt_pass
{
public:
pass_all_optimizations_g(gcc::context *ctxt)
: gimple_opt_pass(pass_data_all_optimizations_g, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_all_optimizations_g (); }
}; // class pass_all_optimizations_g
} // anon namespace
static gimple_opt_pass *
make_pass_all_optimizations_g (gcc::context *ctxt)
{
return new pass_all_optimizations_g (ctxt);
}
static bool
gate_rest_of_compilation (void)
{
@ -444,52 +513,86 @@ gate_rest_of_compilation (void)
return !(rtl_dump_and_exit || flag_syntax_only || seen_error ());
}
static struct rtl_opt_pass pass_rest_of_compilation =
namespace {
const pass_data pass_data_rest_of_compilation =
{
{
RTL_PASS,
"*rest_of_compilation", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_rest_of_compilation, /* gate */
NULL, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_REST_OF_COMPILATION, /* tv_id */
PROP_rtl, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
RTL_PASS, /* type */
"*rest_of_compilation", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
false, /* has_execute */
TV_REST_OF_COMPILATION, /* tv_id */
PROP_rtl, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_rest_of_compilation : public rtl_opt_pass
{
public:
pass_rest_of_compilation(gcc::context *ctxt)
: rtl_opt_pass(pass_data_rest_of_compilation, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_rest_of_compilation (); }
}; // class pass_rest_of_compilation
} // anon namespace
static rtl_opt_pass *
make_pass_rest_of_compilation (gcc::context *ctxt)
{
return new pass_rest_of_compilation (ctxt);
}
static bool
gate_postreload (void)
{
return reload_completed;
}
static struct rtl_opt_pass pass_postreload =
namespace {
const pass_data pass_data_postreload =
{
{
RTL_PASS,
"*all-postreload", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_postreload, /* gate */
NULL, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_POSTRELOAD, /* tv_id */
PROP_rtl, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_rtl_sharing /* todo_flags_finish */
}
RTL_PASS, /* type */
"*all-postreload", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
false, /* has_execute */
TV_POSTRELOAD, /* tv_id */
PROP_rtl, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_rtl_sharing, /* todo_flags_finish */
};
class pass_postreload : public rtl_opt_pass
{
public:
pass_postreload(gcc::context *ctxt)
: rtl_opt_pass(pass_data_postreload, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_postreload (); }
}; // class pass_postreload
} // anon namespace
static rtl_opt_pass *
make_pass_postreload (gcc::context *ctxt)
{
return new pass_postreload (ctxt);
}
/* Set the static pass number of pass PASS to ID and record that

View File

@ -1324,23 +1324,40 @@ rest_of_handle_gcse2 (void)
return 0;
}
struct rtl_opt_pass pass_gcse2 =
namespace {
const pass_data pass_data_gcse2 =
{
{
RTL_PASS,
"gcse2", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_handle_gcse2, /* gate */
rest_of_handle_gcse2, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_GCSE_AFTER_RELOAD, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_rtl_sharing
| TODO_verify_flow /* todo_flags_finish */
}
RTL_PASS, /* type */
"gcse2", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_GCSE_AFTER_RELOAD, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_verify_rtl_sharing | TODO_verify_flow ), /* todo_flags_finish */
};
class pass_gcse2 : public rtl_opt_pass
{
public:
pass_gcse2(gcc::context *ctxt)
: rtl_opt_pass(pass_data_gcse2, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_handle_gcse2 (); }
unsigned int execute () { return rest_of_handle_gcse2 (); }
}; // class pass_gcse2
} // anon namespace
rtl_opt_pass *
make_pass_gcse2 (gcc::context *ctxt)
{
return new pass_gcse2 (ctxt);
}

View File

@ -2339,23 +2339,40 @@ rest_of_handle_postreload (void)
return 0;
}
struct rtl_opt_pass pass_postreload_cse =
namespace {
const pass_data pass_data_postreload_cse =
{
{
RTL_PASS,
"postreload", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_handle_postreload, /* gate */
rest_of_handle_postreload, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_RELOAD_CSE_REGS, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_df_finish | TODO_verify_rtl_sharing |
0 /* todo_flags_finish */
}
RTL_PASS, /* type */
"postreload", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_RELOAD_CSE_REGS, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_df_finish | TODO_verify_rtl_sharing | 0 ), /* todo_flags_finish */
};
class pass_postreload_cse : public rtl_opt_pass
{
public:
pass_postreload_cse(gcc::context *ctxt)
: rtl_opt_pass(pass_data_postreload_cse, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_handle_postreload (); }
unsigned int execute () { return rest_of_handle_postreload (); }
}; // class pass_postreload_cse
} // anon namespace
rtl_opt_pass *
make_pass_postreload_cse (gcc::context *ctxt)
{
return new pass_postreload_cse (ctxt);
}

View File

@ -2900,46 +2900,82 @@ predictor_name (enum br_predictor predictor)
return predictor_info[predictor].name;
}
struct gimple_opt_pass pass_profile =
namespace {
const pass_data pass_data_profile =
{
{
GIMPLE_PASS,
"profile_estimate", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_estimate_probability, /* gate */
tree_estimate_probability_driver, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_BRANCH_PROB, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_ssa /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"profile_estimate", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_BRANCH_PROB, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_ssa, /* todo_flags_finish */
};
struct gimple_opt_pass pass_strip_predict_hints =
class pass_profile : public gimple_opt_pass
{
{
GIMPLE_PASS,
"*strip_predict_hints", /* name */
OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
strip_predict_hints, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_BRANCH_PROB, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_ssa /* todo_flags_finish */
}
public:
pass_profile(gcc::context *ctxt)
: gimple_opt_pass(pass_data_profile, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_estimate_probability (); }
unsigned int execute () { return tree_estimate_probability_driver (); }
}; // class pass_profile
} // anon namespace
gimple_opt_pass *
make_pass_profile (gcc::context *ctxt)
{
return new pass_profile (ctxt);
}
namespace {
const pass_data pass_data_strip_predict_hints =
{
GIMPLE_PASS, /* type */
"*strip_predict_hints", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_BRANCH_PROB, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_ssa, /* todo_flags_finish */
};
class pass_strip_predict_hints : public gimple_opt_pass
{
public:
pass_strip_predict_hints(gcc::context *ctxt)
: gimple_opt_pass(pass_data_strip_predict_hints, ctxt)
{}
/* opt_pass methods: */
opt_pass * clone () { return new pass_strip_predict_hints (ctxt_); }
unsigned int execute () { return strip_predict_hints (); }
}; // class pass_strip_predict_hints
} // anon namespace
gimple_opt_pass *
make_pass_strip_predict_hints (gcc::context *ctxt)
{
return new pass_strip_predict_hints (ctxt);
}
/* Rebuild function frequencies. Passes are in general expected to
maintain profile by hand, however in some cases this is not possible:
for example when inlining several functions with loops freuqencies might run

View File

@ -3778,27 +3778,44 @@ rest_of_handle_peephole2 (void)
return 0;
}
struct rtl_opt_pass pass_peephole2 =
namespace {
const pass_data pass_data_peephole2 =
{
{
RTL_PASS,
"peephole2", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_handle_peephole2, /* gate */
rest_of_handle_peephole2, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_PEEPHOLE2, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_df_finish | TODO_verify_rtl_sharing |
0 /* todo_flags_finish */
}
RTL_PASS, /* type */
"peephole2", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_PEEPHOLE2, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_df_finish | TODO_verify_rtl_sharing | 0 ), /* todo_flags_finish */
};
class pass_peephole2 : public rtl_opt_pass
{
public:
pass_peephole2(gcc::context *ctxt)
: rtl_opt_pass(pass_data_peephole2, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_handle_peephole2 (); }
unsigned int execute () { return rest_of_handle_peephole2 (); }
}; // class pass_peephole2
} // anon namespace
rtl_opt_pass *
make_pass_peephole2 (gcc::context *ctxt)
{
return new pass_peephole2 (ctxt);
}
static unsigned int
rest_of_handle_split_all_insns (void)
{
@ -3806,26 +3823,43 @@ rest_of_handle_split_all_insns (void)
return 0;
}
struct rtl_opt_pass pass_split_all_insns =
namespace {
const pass_data pass_data_split_all_insns =
{
{
RTL_PASS,
"split1", /* name */
OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
rest_of_handle_split_all_insns, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
RTL_PASS, /* type */
"split1", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_split_all_insns : public rtl_opt_pass
{
public:
pass_split_all_insns(gcc::context *ctxt)
: rtl_opt_pass(pass_data_split_all_insns, ctxt)
{}
/* opt_pass methods: */
unsigned int execute () { return rest_of_handle_split_all_insns (); }
}; // class pass_split_all_insns
} // anon namespace
rtl_opt_pass *
make_pass_split_all_insns (gcc::context *ctxt)
{
return new pass_split_all_insns (ctxt);
}
static unsigned int
rest_of_handle_split_after_reload (void)
{
@ -3837,26 +3871,43 @@ rest_of_handle_split_after_reload (void)
return 0;
}
struct rtl_opt_pass pass_split_after_reload =
namespace {
const pass_data pass_data_split_after_reload =
{
{
RTL_PASS,
"split2", /* name */
OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
rest_of_handle_split_after_reload, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
RTL_PASS, /* type */
"split2", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_split_after_reload : public rtl_opt_pass
{
public:
pass_split_after_reload(gcc::context *ctxt)
: rtl_opt_pass(pass_data_split_after_reload, ctxt)
{}
/* opt_pass methods: */
unsigned int execute () { return rest_of_handle_split_after_reload (); }
}; // class pass_split_after_reload
} // anon namespace
rtl_opt_pass *
make_pass_split_after_reload (gcc::context *ctxt)
{
return new pass_split_after_reload (ctxt);
}
static bool
gate_handle_split_before_regstack (void)
{
@ -3882,26 +3933,46 @@ rest_of_handle_split_before_regstack (void)
return 0;
}
struct rtl_opt_pass pass_split_before_regstack =
namespace {
const pass_data pass_data_split_before_regstack =
{
{
RTL_PASS,
"split3", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_handle_split_before_regstack, /* gate */
rest_of_handle_split_before_regstack, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
RTL_PASS, /* type */
"split3", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_split_before_regstack : public rtl_opt_pass
{
public:
pass_split_before_regstack(gcc::context *ctxt)
: rtl_opt_pass(pass_data_split_before_regstack, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_handle_split_before_regstack (); }
unsigned int execute () {
return rest_of_handle_split_before_regstack ();
}
}; // class pass_split_before_regstack
} // anon namespace
rtl_opt_pass *
make_pass_split_before_regstack (gcc::context *ctxt)
{
return new pass_split_before_regstack (ctxt);
}
static bool
gate_handle_split_before_sched2 (void)
{
@ -3921,26 +3992,44 @@ rest_of_handle_split_before_sched2 (void)
return 0;
}
struct rtl_opt_pass pass_split_before_sched2 =
namespace {
const pass_data pass_data_split_before_sched2 =
{
{
RTL_PASS,
"split4", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_handle_split_before_sched2, /* gate */
rest_of_handle_split_before_sched2, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_flow /* todo_flags_finish */
}
RTL_PASS, /* type */
"split4", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_flow, /* todo_flags_finish */
};
class pass_split_before_sched2 : public rtl_opt_pass
{
public:
pass_split_before_sched2(gcc::context *ctxt)
: rtl_opt_pass(pass_data_split_before_sched2, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_handle_split_before_sched2 (); }
unsigned int execute () { return rest_of_handle_split_before_sched2 (); }
}; // class pass_split_before_sched2
} // anon namespace
rtl_opt_pass *
make_pass_split_before_sched2 (gcc::context *ctxt)
{
return new pass_split_before_sched2 (ctxt);
}
/* The placement of the splitting that we do for shorten_branches
depends on whether regstack is used by the target or not. */
static bool
@ -3953,22 +4042,40 @@ gate_do_final_split (void)
#endif
}
struct rtl_opt_pass pass_split_for_shorten_branches =
namespace {
const pass_data pass_data_split_for_shorten_branches =
{
{
RTL_PASS,
"split5", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_do_final_split, /* gate */
split_all_insns_noflow, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_rtl_sharing /* todo_flags_finish */
}
RTL_PASS, /* type */
"split5", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_rtl_sharing, /* todo_flags_finish */
};
class pass_split_for_shorten_branches : public rtl_opt_pass
{
public:
pass_split_for_shorten_branches(gcc::context *ctxt)
: rtl_opt_pass(pass_data_split_for_shorten_branches, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_do_final_split (); }
unsigned int execute () { return split_all_insns_noflow (); }
}; // class pass_split_for_shorten_branches
} // anon namespace
rtl_opt_pass *
make_pass_split_for_shorten_branches (gcc::context *ctxt)
{
return new pass_split_for_shorten_branches (ctxt);
}

View File

@ -940,23 +940,40 @@ gate_handle_ree (void)
return (optimize > 0 && flag_ree);
}
struct rtl_opt_pass pass_ree =
namespace {
const pass_data pass_data_ree =
{
{
RTL_PASS,
"ree", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_handle_ree, /* gate */
rest_of_handle_ree, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_REE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_df_finish
| TODO_verify_rtl_sharing, /* todo_flags_finish */
}
RTL_PASS, /* type */
"ree", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_REE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_df_finish | TODO_verify_rtl_sharing ), /* todo_flags_finish */
};
class pass_ree : public rtl_opt_pass
{
public:
pass_ree(gcc::context *ctxt)
: rtl_opt_pass(pass_data_ree, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_handle_ree (); }
unsigned int execute () { return rest_of_handle_ree (); }
}; // class pass_ree
} // anon namespace
rtl_opt_pass *
make_pass_ree (gcc::context *ctxt)
{
return new pass_ree (ctxt);
}

View File

@ -3292,26 +3292,43 @@ gate_handle_stack_regs (void)
#endif
}
struct rtl_opt_pass pass_stack_regs =
namespace {
const pass_data pass_data_stack_regs =
{
{
RTL_PASS,
"*stack_regs", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_handle_stack_regs, /* gate */
NULL, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_REG_STACK, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
RTL_PASS, /* type */
"*stack_regs", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
false, /* has_execute */
TV_REG_STACK, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_stack_regs : public rtl_opt_pass
{
public:
pass_stack_regs(gcc::context *ctxt)
: rtl_opt_pass(pass_data_stack_regs, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_handle_stack_regs (); }
}; // class pass_stack_regs
} // anon namespace
rtl_opt_pass *
make_pass_stack_regs (gcc::context *ctxt)
{
return new pass_stack_regs (ctxt);
}
/* Convert register usage from flat register file usage to a stack
register file. */
static unsigned int
@ -3324,22 +3341,39 @@ rest_of_handle_stack_regs (void)
return 0;
}
struct rtl_opt_pass pass_stack_regs_run =
namespace {
const pass_data pass_data_stack_regs_run =
{
{
RTL_PASS,
"stack", /* name */
OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
rest_of_handle_stack_regs, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_REG_STACK, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_df_finish | TODO_verify_rtl_sharing /* todo_flags_finish */
}
RTL_PASS, /* type */
"stack", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_REG_STACK, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_df_finish | TODO_verify_rtl_sharing ), /* todo_flags_finish */
};
class pass_stack_regs_run : public rtl_opt_pass
{
public:
pass_stack_regs_run(gcc::context *ctxt)
: rtl_opt_pass(pass_data_stack_regs_run, ctxt)
{}
/* opt_pass methods: */
unsigned int execute () { return rest_of_handle_stack_regs (); }
}; // class pass_stack_regs_run
} // anon namespace
rtl_opt_pass *
make_pass_stack_regs_run (gcc::context *ctxt)
{
return new pass_stack_regs_run (ctxt);
}

View File

@ -1236,23 +1236,40 @@ gate_handle_cprop (void)
}
struct rtl_opt_pass pass_cprop_hardreg =
namespace {
const pass_data pass_data_cprop_hardreg =
{
{
RTL_PASS,
"cprop_hardreg", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_handle_cprop, /* gate */
copyprop_hardreg_forward, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_CPROP_REGISTERS, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_df_finish
| TODO_verify_rtl_sharing /* todo_flags_finish */
}
RTL_PASS, /* type */
"cprop_hardreg", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_CPROP_REGISTERS, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_df_finish | TODO_verify_rtl_sharing ), /* todo_flags_finish */
};
class pass_cprop_hardreg : public rtl_opt_pass
{
public:
pass_cprop_hardreg(gcc::context *ctxt)
: rtl_opt_pass(pass_data_cprop_hardreg, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_handle_cprop (); }
unsigned int execute () { return copyprop_hardreg_forward (); }
}; // class pass_cprop_hardreg
} // anon namespace
rtl_opt_pass *
make_pass_cprop_hardreg (gcc::context *ctxt)
{
return new pass_cprop_hardreg (ctxt);
}

View File

@ -965,26 +965,43 @@ reginfo_init (void)
return 1;
}
struct rtl_opt_pass pass_reginfo_init =
namespace {
const pass_data pass_data_reginfo_init =
{
{
RTL_PASS,
"reginfo", /* name */
OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
reginfo_init, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
RTL_PASS, /* type */
"reginfo", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_reginfo_init : public rtl_opt_pass
{
public:
pass_reginfo_init(gcc::context *ctxt)
: rtl_opt_pass(pass_data_reginfo_init, ctxt)
{}
/* opt_pass methods: */
unsigned int execute () { return reginfo_init (); }
}; // class pass_reginfo_init
} // anon namespace
rtl_opt_pass *
make_pass_reginfo_init (gcc::context *ctxt)
{
return new pass_reginfo_init (ctxt);
}
/* Set up preferred, alternate, and allocno classes for REGNO as

View File

@ -1361,22 +1361,40 @@ gate_handle_regmove (void)
}
struct rtl_opt_pass pass_regmove =
namespace {
const pass_data pass_data_regmove =
{
{
RTL_PASS,
"regmove", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_handle_regmove, /* gate */
regmove_optimize, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_REGMOVE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_df_finish | TODO_verify_rtl_sharing /* todo_flags_finish */
}
RTL_PASS, /* type */
"regmove", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_REGMOVE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_df_finish | TODO_verify_rtl_sharing ), /* todo_flags_finish */
};
class pass_regmove : public rtl_opt_pass
{
public:
pass_regmove(gcc::context *ctxt)
: rtl_opt_pass(pass_data_regmove, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_handle_regmove (); }
unsigned int execute () { return regmove_optimize (); }
}; // class pass_regmove
} // anon namespace
rtl_opt_pass *
make_pass_regmove (gcc::context *ctxt)
{
return new pass_regmove (ctxt);
}

View File

@ -1842,23 +1842,40 @@ gate_handle_regrename (void)
return (optimize > 0 && (flag_rename_registers));
}
struct rtl_opt_pass pass_regrename =
namespace {
const pass_data pass_data_regrename =
{
{
RTL_PASS,
"rnreg", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_handle_regrename, /* gate */
regrename_optimize, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_RENAME_REGISTERS, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_df_finish | TODO_verify_rtl_sharing |
0 /* todo_flags_finish */
}
RTL_PASS, /* type */
"rnreg", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_RENAME_REGISTERS, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_df_finish | TODO_verify_rtl_sharing | 0 ), /* todo_flags_finish */
};
class pass_regrename : public rtl_opt_pass
{
public:
pass_regrename(gcc::context *ctxt)
: rtl_opt_pass(pass_data_regrename, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_handle_regrename (); }
unsigned int execute () { return regrename_optimize (); }
}; // class pass_regrename
} // anon namespace
rtl_opt_pass *
make_pass_regrename (gcc::context *ctxt)
{
return new pass_regrename (ctxt);
}

View File

@ -3852,26 +3852,44 @@ rest_of_handle_delay_slots (void)
return 0;
}
struct rtl_opt_pass pass_delay_slots =
namespace {
const pass_data pass_data_delay_slots =
{
{
RTL_PASS,
"dbr", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_handle_delay_slots, /* gate */
rest_of_handle_delay_slots, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_DBR_SCHED, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
RTL_PASS, /* type */
"dbr", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_DBR_SCHED, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_delay_slots : public rtl_opt_pass
{
public:
pass_delay_slots(gcc::context *ctxt)
: rtl_opt_pass(pass_data_delay_slots, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_handle_delay_slots (); }
unsigned int execute () { return rest_of_handle_delay_slots (); }
}; // class pass_delay_slots
} // anon namespace
rtl_opt_pass *
make_pass_delay_slots (gcc::context *ctxt)
{
return new pass_delay_slots (ctxt);
}
/* Machine dependent reorg pass. */
static bool
gate_handle_machine_reorg (void)
@ -3887,22 +3905,40 @@ rest_of_handle_machine_reorg (void)
return 0;
}
struct rtl_opt_pass pass_machine_reorg =
namespace {
const pass_data pass_data_machine_reorg =
{
{
RTL_PASS,
"mach", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_handle_machine_reorg, /* gate */
rest_of_handle_machine_reorg, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_MACH_DEP, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
RTL_PASS, /* type */
"mach", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_MACH_DEP, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_machine_reorg : public rtl_opt_pass
{
public:
pass_machine_reorg(gcc::context *ctxt)
: rtl_opt_pass(pass_data_machine_reorg, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_handle_machine_reorg (); }
unsigned int execute () { return rest_of_handle_machine_reorg (); }
}; // class pass_machine_reorg
} // anon namespace
rtl_opt_pass *
make_pass_machine_reorg (gcc::context *ctxt)
{
return new pass_machine_reorg (ctxt);
}

View File

@ -3617,44 +3617,80 @@ rest_of_handle_sched2 (void)
return 0;
}
struct rtl_opt_pass pass_sched =
namespace {
const pass_data pass_data_sched =
{
{
RTL_PASS,
"sched1", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_handle_sched, /* gate */
rest_of_handle_sched, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_SCHED, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_df_finish | TODO_verify_rtl_sharing |
TODO_verify_flow /* todo_flags_finish */
}
RTL_PASS, /* type */
"sched1", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_SCHED, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_df_finish | TODO_verify_rtl_sharing
| TODO_verify_flow ), /* todo_flags_finish */
};
struct rtl_opt_pass pass_sched2 =
class pass_sched : public rtl_opt_pass
{
{
RTL_PASS,
"sched2", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_handle_sched2, /* gate */
rest_of_handle_sched2, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_SCHED2, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_df_finish | TODO_verify_rtl_sharing |
TODO_verify_flow /* todo_flags_finish */
}
public:
pass_sched(gcc::context *ctxt)
: rtl_opt_pass(pass_data_sched, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_handle_sched (); }
unsigned int execute () { return rest_of_handle_sched (); }
}; // class pass_sched
} // anon namespace
rtl_opt_pass *
make_pass_sched (gcc::context *ctxt)
{
return new pass_sched (ctxt);
}
namespace {
const pass_data pass_data_sched2 =
{
RTL_PASS, /* type */
"sched2", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_SCHED2, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_df_finish | TODO_verify_rtl_sharing
| TODO_verify_flow ), /* todo_flags_finish */
};
class pass_sched2 : public rtl_opt_pass
{
public:
pass_sched2(gcc::context *ctxt)
: rtl_opt_pass(pass_data_sched2, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_handle_sched2 (); }
unsigned int execute () { return rest_of_handle_sched2 (); }
}; // class pass_sched2
} // anon namespace
rtl_opt_pass *
make_pass_sched2 (gcc::context *ctxt)
{
return new pass_sched2 (ctxt);
}

View File

@ -90,22 +90,39 @@ rest_of_handle_stack_ptr_mod (void)
return 0;
}
struct rtl_opt_pass pass_stack_ptr_mod =
namespace {
const pass_data pass_data_stack_ptr_mod =
{
{
RTL_PASS,
"*stack_ptr_mod", /* name */
OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
rest_of_handle_stack_ptr_mod, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
RTL_PASS, /* type */
"*stack_ptr_mod", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_stack_ptr_mod : public rtl_opt_pass
{
public:
pass_stack_ptr_mod(gcc::context *ctxt)
: rtl_opt_pass(pass_data_stack_ptr_mod, ctxt)
{}
/* opt_pass methods: */
unsigned int execute () { return rest_of_handle_stack_ptr_mod (); }
}; // class pass_stack_ptr_mod
} // anon namespace
rtl_opt_pass *
make_pass_stack_ptr_mod (gcc::context *ctxt)
{
return new pass_stack_ptr_mod (ctxt);
}

View File

@ -1235,23 +1235,41 @@ execute_rtl_store_motion (void)
return 0;
}
struct rtl_opt_pass pass_rtl_store_motion =
namespace {
const pass_data pass_data_rtl_store_motion =
{
{
RTL_PASS,
"store_motion", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_rtl_store_motion, /* gate */
execute_rtl_store_motion, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_LSM, /* tv_id */
PROP_cfglayout, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_df_finish | TODO_verify_rtl_sharing |
TODO_verify_flow /* todo_flags_finish */
}
RTL_PASS, /* type */
"store_motion", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_LSM, /* tv_id */
PROP_cfglayout, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_df_finish | TODO_verify_rtl_sharing
| TODO_verify_flow ), /* todo_flags_finish */
};
class pass_rtl_store_motion : public rtl_opt_pass
{
public:
pass_rtl_store_motion(gcc::context *ctxt)
: rtl_opt_pass(pass_data_rtl_store_motion, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_rtl_store_motion (); }
unsigned int execute () { return execute_rtl_store_motion (); }
}; // class pass_rtl_store_motion
} // anon namespace
rtl_opt_pass *
make_pass_rtl_store_motion (gcc::context *ctxt)
{
return new pass_rtl_store_motion (ctxt);
}

View File

@ -1,3 +1,26 @@
2013-08-05 David Malcolm <dmalcolm@redhat.com>
Patch autogenerated by refactor_passes.py from
https://github.com/davidmalcolm/gcc-refactoring-scripts
revision 03fe39476a4c4ea450b49e087cfa817b5f92021e
* gcc.dg/plugin/one_time_plugin.c (one_pass): Convert from a global
struct to a subclass of gimple_opt_pass along with...
(pass_data_one_pass): ...new pass_data instance and...
(make_one_pass): ...new function.
* gcc.dg/plugin/selfassign.c (pass_warn_self_assign): Convert from a
global struct to a subclass of gimple_opt_pass along with...
(pass_data_warn_self_assign): ...new pass_data instance and...
(make_pass_warn_self_assign): ...new function.
* g++.dg/plugin/dumb_plugin.c (pass_dumb_plugin_example): Convert from
a global struct to a subclass of gimple_opt_pass along with...
(pass_data_dumb_plugin_example): ...new pass_data instance and...
(make_pass_dumb_plugin_example): ...new function.
* g++.dg/plugin/selfassign.c (pass_warn_self_assign): Convert from a
global struct to a subclass of gimple_opt_pass along with...
(pass_data_warn_self_assign): ...new pass_data instance and...
(make_pass_warn_self_assign): ...new function.
2013-08-05 David Malcolm <dmalcolm@redhat.com>
* g++.dg/plugin/dumb_plugin.c (plugin_init): Rework how the pass

View File

@ -58,26 +58,44 @@ gate_dumb_plugin_example (void)
return true;
}
static struct gimple_opt_pass pass_dumb_plugin_example =
namespace {
const pass_data pass_data_dumb_plugin_example =
{
{
GIMPLE_PASS,
"dumb_plugin_example", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_dumb_plugin_example, /* gate */
execute_dumb_plugin_example, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"dumb_plugin_example", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_dumb_plugin_example : public gimple_opt_pass
{
public:
pass_dumb_plugin_example(gcc::context *ctxt)
: gimple_opt_pass(pass_data_dumb_plugin_example, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_dumb_plugin_example (); }
unsigned int execute () { return execute_dumb_plugin_example (); }
}; // class pass_dumb_plugin_example
} // anon namespace
static gimple_opt_pass *
make_pass_dumb_plugin_example (gcc::context *ctxt)
{
return new pass_dumb_plugin_example (ctxt);
}
/* Initialization function that GCC calls. This plugin takes an argument
that specifies the name of the reference pass and an instance number,
both of which determine where the plugin pass should be inserted. */

View File

@ -264,26 +264,44 @@ gate_warn_self_assign (void)
return true;
}
static struct gimple_opt_pass pass_warn_self_assign =
namespace {
const pass_data pass_data_warn_self_assign =
{
{
GIMPLE_PASS,
"warn_self_assign", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_warn_self_assign, /* gate */
execute_warn_self_assign, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"warn_self_assign", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_warn_self_assign : public gimple_opt_pass
{
public:
pass_warn_self_assign(gcc::context *ctxt)
: gimple_opt_pass(pass_data_warn_self_assign, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_warn_self_assign (); }
unsigned int execute () { return execute_warn_self_assign (); }
}; // class pass_warn_self_assign
} // anon namespace
static gimple_opt_pass *
make_pass_warn_self_assign (gcc::context *ctxt)
{
return new pass_warn_self_assign (ctxt);
}
/* The initialization routine exposed to and called by GCC. The spec of this
function is defined in gcc/gcc-plugin.h.

View File

@ -28,26 +28,44 @@ static unsigned int one_pass_exec (void)
return 0;
}
struct gimple_opt_pass one_pass =
namespace {
const pass_data pass_data_one_pass =
{
{
GIMPLE_PASS,
"cfg", /* name */
OPTGROUP_NONE, /* optinfo_flags */
one_pass_gate, /* gate */
one_pass_exec, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
PROP_gimple_any, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"cfg", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
PROP_gimple_any, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class one_pass : public gimple_opt_pass
{
public:
one_pass(gcc::context *ctxt)
: gimple_opt_pass(pass_data_one_pass, ctxt)
{}
/* opt_pass methods: */
bool gate () { return one_pass_gate (); }
unsigned int execute () { return one_pass_exec (); }
}; // class one_pass
} // anon namespace
gimple_opt_pass *
make_one_pass (gcc::context *ctxt)
{
return new one_pass (ctxt);
}
int plugin_init (struct plugin_name_args *plugin_info,
struct plugin_gcc_version *version)

View File

@ -264,26 +264,44 @@ gate_warn_self_assign (void)
return true;
}
static struct gimple_opt_pass pass_warn_self_assign =
namespace {
const pass_data pass_data_warn_self_assign =
{
{
GIMPLE_PASS,
"warn_self_assign", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_warn_self_assign, /* gate */
execute_warn_self_assign, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"warn_self_assign", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_warn_self_assign : public gimple_opt_pass
{
public:
pass_warn_self_assign(gcc::context *ctxt)
: gimple_opt_pass(pass_data_warn_self_assign, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_warn_self_assign (); }
unsigned int execute () { return execute_warn_self_assign (); }
}; // class pass_warn_self_assign
} // anon namespace
static gimple_opt_pass *
make_pass_warn_self_assign (gcc::context *ctxt)
{
return new pass_warn_self_assign (ctxt);
}
/* The initialization routine exposed to and called by GCC. The spec of this
function is defined in gcc/gcc-plugin.h.

View File

@ -397,23 +397,40 @@ gate_tracer (void)
return (optimize > 0 && flag_tracer && flag_reorder_blocks);
}
struct gimple_opt_pass pass_tracer =
namespace {
const pass_data pass_data_tracer =
{
{
GIMPLE_PASS,
"tracer", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_tracer, /* gate */
tracer, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_TRACER, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_update_ssa
| TODO_verify_ssa /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"tracer", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_TRACER, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_update_ssa | TODO_verify_ssa ), /* todo_flags_finish */
};
class pass_tracer : public gimple_opt_pass
{
public:
pass_tracer(gcc::context *ctxt)
: gimple_opt_pass(pass_data_tracer, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_tracer (); }
unsigned int execute () { return tracer (); }
}; // class pass_tracer
} // anon namespace
gimple_opt_pass *
make_pass_tracer (gcc::context *ctxt)
{
return new pass_tracer (ctxt);
}

View File

@ -801,25 +801,43 @@ diagnose_tm_blocks (void)
return 0;
}
struct gimple_opt_pass pass_diagnose_tm_blocks =
namespace {
const pass_data pass_data_diagnose_tm_blocks =
{
{
GIMPLE_PASS,
"*diagnose_tm_blocks", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_tm, /* gate */
diagnose_tm_blocks, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_TRANS_MEM, /* tv_id */
PROP_gimple_any, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"*diagnose_tm_blocks", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_TRANS_MEM, /* tv_id */
PROP_gimple_any, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_diagnose_tm_blocks : public gimple_opt_pass
{
public:
pass_diagnose_tm_blocks(gcc::context *ctxt)
: gimple_opt_pass(pass_data_diagnose_tm_blocks, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_tm (); }
unsigned int execute () { return diagnose_tm_blocks (); }
}; // class pass_diagnose_tm_blocks
} // anon namespace
gimple_opt_pass *
make_pass_diagnose_tm_blocks (gcc::context *ctxt)
{
return new pass_diagnose_tm_blocks (ctxt);
}
/* Instead of instrumenting thread private memory, we save the
addresses in a log which we later use to save/restore the addresses
@ -1706,25 +1724,43 @@ execute_lower_tm (void)
return 0;
}
struct gimple_opt_pass pass_lower_tm =
namespace {
const pass_data pass_data_lower_tm =
{
{
GIMPLE_PASS,
"tmlower", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_tm, /* gate */
execute_lower_tm, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_TRANS_MEM, /* tv_id */
PROP_gimple_lcf, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"tmlower", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_TRANS_MEM, /* tv_id */
PROP_gimple_lcf, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_lower_tm : public gimple_opt_pass
{
public:
pass_lower_tm(gcc::context *ctxt)
: gimple_opt_pass(pass_data_lower_tm, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_tm (); }
unsigned int execute () { return execute_lower_tm (); }
}; // class pass_lower_tm
} // anon namespace
gimple_opt_pass *
make_pass_lower_tm (gcc::context *ctxt)
{
return new pass_lower_tm (ctxt);
}
/* Collect region information for each transaction. */
@ -1968,25 +2004,42 @@ gate_tm_init (void)
return true;
}
struct gimple_opt_pass pass_tm_init =
namespace {
const pass_data pass_data_tm_init =
{
{
GIMPLE_PASS,
"*tminit", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_tm_init, /* gate */
NULL, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_TRANS_MEM, /* tv_id */
PROP_ssa | PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"*tminit", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
false, /* has_execute */
TV_TRANS_MEM, /* tv_id */
( PROP_ssa | PROP_cfg ), /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_tm_init : public gimple_opt_pass
{
public:
pass_tm_init(gcc::context *ctxt)
: gimple_opt_pass(pass_data_tm_init, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_tm_init (); }
}; // class pass_tm_init
} // anon namespace
gimple_opt_pass *
make_pass_tm_init (gcc::context *ctxt)
{
return new pass_tm_init (ctxt);
}
/* Add FLAGS to the GIMPLE_TRANSACTION subcode for the transaction region
represented by STATE. */
@ -2927,26 +2980,42 @@ execute_tm_mark (void)
return 0;
}
struct gimple_opt_pass pass_tm_mark =
namespace {
const pass_data pass_data_tm_mark =
{
{
GIMPLE_PASS,
"tmmark", /* name */
OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
execute_tm_mark, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_TRANS_MEM, /* tv_id */
PROP_ssa | PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_update_ssa
| TODO_verify_ssa, /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"tmmark", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_TRANS_MEM, /* tv_id */
( PROP_ssa | PROP_cfg ), /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_update_ssa | TODO_verify_ssa ), /* todo_flags_finish */
};
class pass_tm_mark : public gimple_opt_pass
{
public:
pass_tm_mark(gcc::context *ctxt)
: gimple_opt_pass(pass_data_tm_mark, ctxt)
{}
/* opt_pass methods: */
unsigned int execute () { return execute_tm_mark (); }
}; // class pass_tm_mark
} // anon namespace
gimple_opt_pass *
make_pass_tm_mark (gcc::context *ctxt)
{
return new pass_tm_mark (ctxt);
}
/* Create an abnormal edge from STMT at iter, splitting the block
@ -3094,26 +3163,42 @@ execute_tm_edges (void)
return 0;
}
struct gimple_opt_pass pass_tm_edges =
namespace {
const pass_data pass_data_tm_edges =
{
{
GIMPLE_PASS,
"tmedge", /* name */
OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
execute_tm_edges, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_TRANS_MEM, /* tv_id */
PROP_ssa | PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_update_ssa
| TODO_verify_ssa, /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"tmedge", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_TRANS_MEM, /* tv_id */
( PROP_ssa | PROP_cfg ), /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_update_ssa | TODO_verify_ssa ), /* todo_flags_finish */
};
class pass_tm_edges : public gimple_opt_pass
{
public:
pass_tm_edges(gcc::context *ctxt)
: gimple_opt_pass(pass_data_tm_edges, ctxt)
{}
/* opt_pass methods: */
unsigned int execute () { return execute_tm_edges (); }
}; // class pass_tm_edges
} // anon namespace
gimple_opt_pass *
make_pass_tm_edges (gcc::context *ctxt)
{
return new pass_tm_edges (ctxt);
}
/* Helper function for expand_regions. Expand REGION and recurse to
the inner region. Call CALLBACK on each region. CALLBACK returns
@ -3818,26 +3903,44 @@ gate_tm_memopt (void)
return flag_tm && optimize > 0;
}
struct gimple_opt_pass pass_tm_memopt =
namespace {
const pass_data pass_data_tm_memopt =
{
{
GIMPLE_PASS,
"tmmemopt", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_tm_memopt, /* gate */
execute_tm_memopt, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_TRANS_MEM, /* tv_id */
PROP_ssa | PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"tmmemopt", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_TRANS_MEM, /* tv_id */
( PROP_ssa | PROP_cfg ), /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_tm_memopt : public gimple_opt_pass
{
public:
pass_tm_memopt(gcc::context *ctxt)
: gimple_opt_pass(pass_data_tm_memopt, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_tm_memopt (); }
unsigned int execute () { return execute_tm_memopt (); }
}; // class pass_tm_memopt
} // anon namespace
gimple_opt_pass *
make_pass_tm_memopt (gcc::context *ctxt)
{
return new pass_tm_memopt (ctxt);
}
/* Interprocedual analysis for the creation of transactional clones.
The aim of this pass is to find which functions are referenced in
@ -5435,24 +5538,42 @@ ipa_tm_execute (void)
return 0;
}
struct simple_ipa_opt_pass pass_ipa_tm =
namespace {
const pass_data pass_data_ipa_tm =
{
{
SIMPLE_IPA_PASS,
"tmipa", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_tm, /* gate */
ipa_tm_execute, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_TRANS_MEM, /* tv_id */
PROP_ssa | PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
},
SIMPLE_IPA_PASS, /* type */
"tmipa", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_TRANS_MEM, /* tv_id */
( PROP_ssa | PROP_cfg ), /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_ipa_tm : public simple_ipa_opt_pass
{
public:
pass_ipa_tm(gcc::context *ctxt)
: simple_ipa_opt_pass(pass_data_ipa_tm, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_tm (); }
unsigned int execute () { return ipa_tm_execute (); }
}; // class pass_ipa_tm
} // anon namespace
simple_ipa_opt_pass *
make_pass_ipa_tm (gcc::context *ctxt)
{
return new pass_ipa_tm (ctxt);
}
#include "gt-trans-mem.h"

View File

@ -913,22 +913,40 @@ gate_call_cdce (void)
return flag_tree_builtin_call_dce != 0 && optimize_function_for_speed_p (cfun);
}
struct gimple_opt_pass pass_call_cdce =
namespace {
const pass_data pass_data_call_cdce =
{
{
GIMPLE_PASS,
"cdce", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_call_cdce, /* gate */
tree_call_cdce, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_TREE_CALL_CDCE, /* tv_id */
PROP_cfg | PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_ssa /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"cdce", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_TREE_CALL_CDCE, /* tv_id */
( PROP_cfg | PROP_ssa ), /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_ssa, /* todo_flags_finish */
};
class pass_call_cdce : public gimple_opt_pass
{
public:
pass_call_cdce(gcc::context *ctxt)
: gimple_opt_pass(pass_data_call_cdce, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_call_cdce (); }
unsigned int execute () { return tree_call_cdce (); }
}; // class pass_call_cdce
} // anon namespace
gimple_opt_pass *
make_pass_call_cdce (gcc::context *ctxt)
{
return new pass_call_cdce (ctxt);
}

View File

@ -253,26 +253,43 @@ execute_build_cfg (void)
return 0;
}
struct gimple_opt_pass pass_build_cfg =
namespace {
const pass_data pass_data_build_cfg =
{
{
GIMPLE_PASS,
"cfg", /* name */
OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
execute_build_cfg, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_TREE_CFG, /* tv_id */
PROP_gimple_leh, /* properties_required */
PROP_cfg | PROP_loops, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_stmts /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"cfg", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_TREE_CFG, /* tv_id */
PROP_gimple_leh, /* properties_required */
( PROP_cfg | PROP_loops ), /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_stmts, /* todo_flags_finish */
};
class pass_build_cfg : public gimple_opt_pass
{
public:
pass_build_cfg(gcc::context *ctxt)
: gimple_opt_pass(pass_data_build_cfg, ctxt)
{}
/* opt_pass methods: */
unsigned int execute () { return execute_build_cfg (); }
}; // class pass_build_cfg
} // anon namespace
gimple_opt_pass *
make_pass_build_cfg (gcc::context *ctxt)
{
return new pass_build_cfg (ctxt);
}
/* Return true if T is a computed goto. */
@ -7890,26 +7907,43 @@ split_critical_edges (void)
return 0;
}
struct gimple_opt_pass pass_split_crit_edges =
namespace {
const pass_data pass_data_split_crit_edges =
{
{
GIMPLE_PASS,
"crited", /* name */
OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
split_critical_edges, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_TREE_SPLIT_EDGES, /* tv_id */
PROP_cfg, /* properties required */
PROP_no_crit_edges, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_flow /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"crited", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_TREE_SPLIT_EDGES, /* tv_id */
PROP_cfg, /* properties_required */
PROP_no_crit_edges, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_flow, /* todo_flags_finish */
};
class pass_split_crit_edges : public gimple_opt_pass
{
public:
pass_split_crit_edges(gcc::context *ctxt)
: gimple_opt_pass(pass_data_split_crit_edges, ctxt)
{}
/* opt_pass methods: */
unsigned int execute () { return split_critical_edges (); }
}; // class pass_split_crit_edges
} // anon namespace
gimple_opt_pass *
make_pass_split_crit_edges (gcc::context *ctxt)
{
return new pass_split_crit_edges (ctxt);
}
/* Build a ternary operation and gimplify it. Emit code before GSI.
Return the gimple_val holding the result. */
@ -8044,26 +8078,43 @@ extract_true_false_edges_from_block (basic_block b,
}
}
struct gimple_opt_pass pass_warn_function_return =
namespace {
const pass_data pass_data_warn_function_return =
{
{
GIMPLE_PASS,
"*warn_function_return", /* name */
OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
execute_warn_function_return, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"*warn_function_return", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_warn_function_return : public gimple_opt_pass
{
public:
pass_warn_function_return(gcc::context *ctxt)
: gimple_opt_pass(pass_data_warn_function_return, ctxt)
{}
/* opt_pass methods: */
unsigned int execute () { return execute_warn_function_return (); }
}; // class pass_warn_function_return
} // anon namespace
gimple_opt_pass *
make_pass_warn_function_return (gcc::context *ctxt)
{
return new pass_warn_function_return (ctxt);
}
/* Emit noreturn warnings. */
static unsigned int
@ -8081,26 +8132,44 @@ gate_warn_function_noreturn (void)
return warn_suggest_attribute_noreturn;
}
struct gimple_opt_pass pass_warn_function_noreturn =
namespace {
const pass_data pass_data_warn_function_noreturn =
{
{
GIMPLE_PASS,
"*warn_function_noreturn", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_warn_function_noreturn, /* gate */
execute_warn_function_noreturn, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"*warn_function_noreturn", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_warn_function_noreturn : public gimple_opt_pass
{
public:
pass_warn_function_noreturn(gcc::context *ctxt)
: gimple_opt_pass(pass_data_warn_function_noreturn, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_warn_function_noreturn (); }
unsigned int execute () { return execute_warn_function_noreturn (); }
}; // class pass_warn_function_noreturn
} // anon namespace
gimple_opt_pass *
make_pass_warn_function_noreturn (gcc::context *ctxt)
{
return new pass_warn_function_noreturn (ctxt);
}
/* Walk a gimplified function and warn for functions whose return value is
ignored and attribute((warn_unused_result)) is set. This is done before
@ -8180,26 +8249,44 @@ gate_warn_unused_result (void)
return flag_warn_unused_result;
}
struct gimple_opt_pass pass_warn_unused_result =
namespace {
const pass_data pass_data_warn_unused_result =
{
{
GIMPLE_PASS,
"*warn_unused_result", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_warn_unused_result, /* gate */
run_warn_unused_result, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
PROP_gimple_any, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"*warn_unused_result", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
PROP_gimple_any, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_warn_unused_result : public gimple_opt_pass
{
public:
pass_warn_unused_result(gcc::context *ctxt)
: gimple_opt_pass(pass_data_warn_unused_result, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_warn_unused_result (); }
unsigned int execute () { return run_warn_unused_result (); }
}; // class pass_warn_unused_result
} // anon namespace
gimple_opt_pass *
make_pass_warn_unused_result (gcc::context *ctxt)
{
return new pass_warn_unused_result (ctxt);
}
/* Garbage collection support for edge_def. */

View File

@ -989,22 +989,41 @@ gate_merge_phi (void)
return 1;
}
struct gimple_opt_pass pass_merge_phi =
namespace {
const pass_data pass_data_merge_phi =
{
{
GIMPLE_PASS,
"mergephi", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_merge_phi, /* gate */
merge_phi_nodes, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_TREE_MERGE_PHI, /* tv_id */
PROP_cfg | PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_ssa /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"mergephi", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_TREE_MERGE_PHI, /* tv_id */
( PROP_cfg | PROP_ssa ), /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_ssa, /* todo_flags_finish */
};
class pass_merge_phi : public gimple_opt_pass
{
public:
pass_merge_phi(gcc::context *ctxt)
: gimple_opt_pass(pass_data_merge_phi, ctxt)
{}
/* opt_pass methods: */
opt_pass * clone () { return new pass_merge_phi (ctxt_); }
bool gate () { return gate_merge_phi (); }
unsigned int execute () { return merge_phi_nodes (); }
}; // class pass_merge_phi
} // anon namespace
gimple_opt_pass *
make_pass_merge_phi (gcc::context *ctxt)
{
return new pass_merge_phi (ctxt);
}

View File

@ -1637,27 +1637,44 @@ tree_lower_complex (void)
return 0;
}
struct gimple_opt_pass pass_lower_complex =
namespace {
const pass_data pass_data_lower_complex =
{
{
GIMPLE_PASS,
"cplxlower", /* name */
OPTGROUP_NONE, /* optinfo_flags */
0, /* gate */
tree_lower_complex, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
PROP_ssa, /* properties_required */
PROP_gimple_lcx, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_update_ssa
| TODO_verify_stmts /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"cplxlower", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
PROP_ssa, /* properties_required */
PROP_gimple_lcx, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_update_ssa | TODO_verify_stmts ), /* todo_flags_finish */
};
class pass_lower_complex : public gimple_opt_pass
{
public:
pass_lower_complex(gcc::context *ctxt)
: gimple_opt_pass(pass_data_lower_complex, ctxt)
{}
/* opt_pass methods: */
opt_pass * clone () { return new pass_lower_complex (ctxt_); }
unsigned int execute () { return tree_lower_complex (); }
}; // class pass_lower_complex
} // anon namespace
gimple_opt_pass *
make_pass_lower_complex (gcc::context *ctxt)
{
return new pass_lower_complex (ctxt);
}
static bool
gate_no_optimization (void)
@ -1667,23 +1684,40 @@ gate_no_optimization (void)
return !(cfun->curr_properties & PROP_gimple_lcx);
}
struct gimple_opt_pass pass_lower_complex_O0 =
namespace {
const pass_data pass_data_lower_complex_O0 =
{
{
GIMPLE_PASS,
"cplxlower0", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_no_optimization, /* gate */
tree_lower_complex, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
PROP_cfg, /* properties_required */
PROP_gimple_lcx, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_update_ssa
| TODO_verify_stmts /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"cplxlower0", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
PROP_cfg, /* properties_required */
PROP_gimple_lcx, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_update_ssa | TODO_verify_stmts ), /* todo_flags_finish */
};
class pass_lower_complex_O0 : public gimple_opt_pass
{
public:
pass_lower_complex_O0(gcc::context *ctxt)
: gimple_opt_pass(pass_data_lower_complex_O0, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_no_optimization (); }
unsigned int execute () { return tree_lower_complex (); }
}; // class pass_lower_complex_O0
} // anon namespace
gimple_opt_pass *
make_pass_lower_complex_O0 (gcc::context *ctxt)
{
return new pass_lower_complex_O0 (ctxt);
}

View File

@ -2157,25 +2157,42 @@ lower_eh_constructs (void)
return 0;
}
struct gimple_opt_pass pass_lower_eh =
namespace {
const pass_data pass_data_lower_eh =
{
{
GIMPLE_PASS,
"eh", /* name */
OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
lower_eh_constructs, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_TREE_EH, /* tv_id */
PROP_gimple_lcf, /* properties_required */
PROP_gimple_leh, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"eh", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_TREE_EH, /* tv_id */
PROP_gimple_lcf, /* properties_required */
PROP_gimple_leh, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_lower_eh : public gimple_opt_pass
{
public:
pass_lower_eh(gcc::context *ctxt)
: gimple_opt_pass(pass_data_lower_eh, ctxt)
{}
/* opt_pass methods: */
unsigned int execute () { return lower_eh_constructs (); }
}; // class pass_lower_eh
} // anon namespace
gimple_opt_pass *
make_pass_lower_eh (gcc::context *ctxt)
{
return new pass_lower_eh (ctxt);
}
/* Create the multiple edges from an EH_DISPATCH statement to all of
the possible handlers for its EH region. Return true if there's
@ -3017,25 +3034,43 @@ gate_refactor_eh (void)
return flag_exceptions != 0;
}
struct gimple_opt_pass pass_refactor_eh =
namespace {
const pass_data pass_data_refactor_eh =
{
{
GIMPLE_PASS,
"ehopt", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_refactor_eh, /* gate */
refactor_eh, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_TREE_EH, /* tv_id */
PROP_gimple_lcf, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"ehopt", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_TREE_EH, /* tv_id */
PROP_gimple_lcf, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_refactor_eh : public gimple_opt_pass
{
public:
pass_refactor_eh(gcc::context *ctxt)
: gimple_opt_pass(pass_data_refactor_eh, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_refactor_eh (); }
unsigned int execute () { return refactor_eh (); }
}; // class pass_refactor_eh
} // anon namespace
gimple_opt_pass *
make_pass_refactor_eh (gcc::context *ctxt)
{
return new pass_refactor_eh (ctxt);
}
/* At the end of gimple optimization, we can lower RESX. */
@ -3226,26 +3261,44 @@ gate_lower_resx (void)
return flag_exceptions != 0;
}
struct gimple_opt_pass pass_lower_resx =
namespace {
const pass_data pass_data_lower_resx =
{
{
GIMPLE_PASS,
"resx", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_lower_resx, /* gate */
execute_lower_resx, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_TREE_EH, /* tv_id */
PROP_gimple_lcf, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_flow /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"resx", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_TREE_EH, /* tv_id */
PROP_gimple_lcf, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_flow, /* todo_flags_finish */
};
class pass_lower_resx : public gimple_opt_pass
{
public:
pass_lower_resx(gcc::context *ctxt)
: gimple_opt_pass(pass_data_lower_resx, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_lower_resx (); }
unsigned int execute () { return execute_lower_resx (); }
}; // class pass_lower_resx
} // anon namespace
gimple_opt_pass *
make_pass_lower_resx (gcc::context *ctxt)
{
return new pass_lower_resx (ctxt);
}
/* Try to optimize var = {v} {CLOBBER} stmts followed just by
external throw. */
@ -3619,25 +3672,43 @@ gate_lower_eh_dispatch (void)
return cfun->eh->region_tree != NULL;
}
struct gimple_opt_pass pass_lower_eh_dispatch =
namespace {
const pass_data pass_data_lower_eh_dispatch =
{
{
GIMPLE_PASS,
"ehdisp", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_lower_eh_dispatch, /* gate */
execute_lower_eh_dispatch, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_TREE_EH, /* tv_id */
PROP_gimple_lcf, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_flow /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"ehdisp", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_TREE_EH, /* tv_id */
PROP_gimple_lcf, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_flow, /* todo_flags_finish */
};
class pass_lower_eh_dispatch : public gimple_opt_pass
{
public:
pass_lower_eh_dispatch(gcc::context *ctxt)
: gimple_opt_pass(pass_data_lower_eh_dispatch, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_lower_eh_dispatch (); }
unsigned int execute () { return execute_lower_eh_dispatch (); }
}; // class pass_lower_eh_dispatch
} // anon namespace
gimple_opt_pass *
make_pass_lower_eh_dispatch (gcc::context *ctxt)
{
return new pass_lower_eh_dispatch (ctxt);
}
/* Walk statements, see what regions and, optionally, landing pads
are really referenced.
@ -4445,24 +4516,44 @@ gate_cleanup_eh (void)
return cfun->eh != NULL && cfun->eh->region_tree != NULL;
}
struct gimple_opt_pass pass_cleanup_eh = {
{
GIMPLE_PASS,
"ehcleanup", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_cleanup_eh, /* gate */
execute_cleanup_eh, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_TREE_EH, /* tv_id */
PROP_gimple_lcf, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_ssa /* todo_flags_finish */
}
namespace {
const pass_data pass_data_cleanup_eh =
{
GIMPLE_PASS, /* type */
"ehcleanup", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_TREE_EH, /* tv_id */
PROP_gimple_lcf, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_ssa, /* todo_flags_finish */
};
class pass_cleanup_eh : public gimple_opt_pass
{
public:
pass_cleanup_eh(gcc::context *ctxt)
: gimple_opt_pass(pass_data_cleanup_eh, ctxt)
{}
/* opt_pass methods: */
opt_pass * clone () { return new pass_cleanup_eh (ctxt_); }
bool gate () { return gate_cleanup_eh (); }
unsigned int execute () { return execute_cleanup_eh (); }
}; // class pass_cleanup_eh
} // anon namespace
gimple_opt_pass *
make_pass_cleanup_eh (gcc::context *ctxt)
{
return new pass_cleanup_eh (ctxt);
}
/* Verify that BB containing STMT as the last statement, has precisely the
edge that make_eh_edges would create. */

View File

@ -811,22 +811,40 @@ gate_emutls (void)
return !targetm.have_tls;
}
struct simple_ipa_opt_pass pass_ipa_lower_emutls =
namespace {
const pass_data pass_data_ipa_lower_emutls =
{
{
SIMPLE_IPA_PASS,
"emutls", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_emutls, /* gate */
ipa_lower_emutls, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_IPA_OPT, /* tv_id */
PROP_cfg | PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
}
SIMPLE_IPA_PASS, /* type */
"emutls", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_IPA_OPT, /* tv_id */
( PROP_cfg | PROP_ssa ), /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_ipa_lower_emutls : public simple_ipa_opt_pass
{
public:
pass_ipa_lower_emutls(gcc::context *ctxt)
: simple_ipa_opt_pass(pass_data_ipa_lower_emutls, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_emutls (); }
unsigned int execute () { return ipa_lower_emutls (); }
}; // class pass_ipa_lower_emutls
} // anon namespace
simple_ipa_opt_pass *
make_pass_ipa_lower_emutls (gcc::context *ctxt)
{
return new pass_ipa_lower_emutls (ctxt);
}

View File

@ -1853,23 +1853,40 @@ gate_tree_if_conversion (void)
|| flag_tree_loop_if_convert_stores == 1);
}
struct gimple_opt_pass pass_if_conversion =
namespace {
const pass_data pass_data_if_conversion =
{
{
GIMPLE_PASS,
"ifcvt", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_tree_if_conversion, /* gate */
main_tree_if_conversion, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
PROP_cfg | PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_stmts | TODO_verify_flow
/* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"ifcvt", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
( PROP_cfg | PROP_ssa ), /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_verify_stmts | TODO_verify_flow ), /* todo_flags_finish */
};
class pass_if_conversion : public gimple_opt_pass
{
public:
pass_if_conversion(gcc::context *ctxt)
: gimple_opt_pass(pass_data_if_conversion, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_tree_if_conversion (); }
unsigned int execute () { return main_tree_if_conversion (); }
}; // class pass_if_conversion
} // anon namespace
gimple_opt_pass *
make_pass_if_conversion (gcc::context *ctxt)
{
return new pass_if_conversion (ctxt);
}

View File

@ -2410,27 +2410,43 @@ rewrite_into_ssa (void)
}
struct gimple_opt_pass pass_build_ssa =
namespace {
const pass_data pass_data_build_ssa =
{
{
GIMPLE_PASS,
"ssa", /* name */
OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
rewrite_into_ssa, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_TREE_SSA_OTHER, /* tv_id */
PROP_cfg, /* properties_required */
PROP_ssa, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_ssa
| TODO_remove_unused_locals /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"ssa", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_TREE_SSA_OTHER, /* tv_id */
PROP_cfg, /* properties_required */
PROP_ssa, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_verify_ssa | TODO_remove_unused_locals ), /* todo_flags_finish */
};
class pass_build_ssa : public gimple_opt_pass
{
public:
pass_build_ssa(gcc::context *ctxt)
: gimple_opt_pass(pass_data_build_ssa, ctxt)
{}
/* opt_pass methods: */
unsigned int execute () { return rewrite_into_ssa (); }
}; // class pass_build_ssa
} // anon namespace
gimple_opt_pass *
make_pass_build_ssa (gcc::context *ctxt)
{
return new pass_build_ssa (ctxt);
}
/* Mark the definition of VAR at STMT and BB as interesting for the
renamer. BLOCKS is the set of blocks that need updating. */

View File

@ -1589,22 +1589,40 @@ gate_tree_loop_distribution (void)
|| flag_tree_loop_distribute_patterns;
}
struct gimple_opt_pass pass_loop_distribution =
namespace {
const pass_data pass_data_loop_distribution =
{
{
GIMPLE_PASS,
"ldist", /* name */
OPTGROUP_LOOP, /* optinfo_flags */
gate_tree_loop_distribution, /* gate */
tree_loop_distribution, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_TREE_LOOP_DISTRIBUTION, /* tv_id */
PROP_cfg | PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_ssa /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"ldist", /* name */
OPTGROUP_LOOP, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_TREE_LOOP_DISTRIBUTION, /* tv_id */
( PROP_cfg | PROP_ssa ), /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_ssa, /* todo_flags_finish */
};
class pass_loop_distribution : public gimple_opt_pass
{
public:
pass_loop_distribution(gcc::context *ctxt)
: gimple_opt_pass(pass_data_loop_distribution, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_tree_loop_distribution (); }
unsigned int execute () { return tree_loop_distribution (); }
}; // class pass_loop_distribution
} // anon namespace
gimple_opt_pass *
make_pass_loop_distribution (gcc::context *ctxt)
{
return new pass_loop_distribution (ctxt);
}

View File

@ -1378,45 +1378,81 @@ gate_mudflap (void)
return flag_mudflap != 0;
}
struct gimple_opt_pass pass_mudflap_1 =
namespace {
const pass_data pass_data_mudflap_1 =
{
{
GIMPLE_PASS,
"mudflap1", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_mudflap, /* gate */
execute_mudflap_function_decls, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
PROP_gimple_any, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"mudflap1", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
PROP_gimple_any, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
struct gimple_opt_pass pass_mudflap_2 =
class pass_mudflap_1 : public gimple_opt_pass
{
{
GIMPLE_PASS,
"mudflap2", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_mudflap, /* gate */
execute_mudflap_function_ops, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
PROP_ssa | PROP_cfg | PROP_gimple_leh,/* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_flow | TODO_verify_stmts
| TODO_update_ssa /* todo_flags_finish */
}
public:
pass_mudflap_1(gcc::context *ctxt)
: gimple_opt_pass(pass_data_mudflap_1, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_mudflap (); }
unsigned int execute () { return execute_mudflap_function_decls (); }
}; // class pass_mudflap_1
} // anon namespace
gimple_opt_pass *
make_pass_mudflap_1 (gcc::context *ctxt)
{
return new pass_mudflap_1 (ctxt);
}
namespace {
const pass_data pass_data_mudflap_2 =
{
GIMPLE_PASS, /* type */
"mudflap2", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
( PROP_ssa | PROP_cfg | PROP_gimple_leh ), /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_verify_flow | TODO_verify_stmts
| TODO_update_ssa ), /* todo_flags_finish */
};
class pass_mudflap_2 : public gimple_opt_pass
{
public:
pass_mudflap_2(gcc::context *ctxt)
: gimple_opt_pass(pass_data_mudflap_2, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_mudflap (); }
unsigned int execute () { return execute_mudflap_function_ops (); }
}; // class pass_mudflap_2
} // anon namespace
gimple_opt_pass *
make_pass_mudflap_2 (gcc::context *ctxt)
{
return new pass_mudflap_2 (ctxt);
}
#include "gt-tree-mudflap.h"

View File

@ -85,46 +85,80 @@ gate_mudflap (void)
return flag_mudflap != 0;
}
struct gimple_opt_pass pass_mudflap_1 =
namespace {
const pass_data pass_data_mudflap_1 =
{
{
GIMPLE_PASS,
"mudflap1", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_mudflap, /* gate */
NULL, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"mudflap1", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
false, /* has_execute */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
struct gimple_opt_pass pass_mudflap_2 =
class pass_mudflap_1 : public gimple_opt_pass
{
{
GIMPLE_PASS,
"mudflap2", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_mudflap, /* gate */
NULL, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
public:
pass_mudflap_1(gcc::context *ctxt)
: gimple_opt_pass(pass_data_mudflap_1, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_mudflap (); }
}; // class pass_mudflap_1
} // anon namespace
gimple_opt_pass *
make_pass_mudflap_1 (gcc::context *ctxt)
{
return new pass_mudflap_1 (ctxt);
}
namespace {
const pass_data pass_data_mudflap_2 =
{
GIMPLE_PASS, /* type */
"mudflap2", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
false, /* has_execute */
TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_mudflap_2 : public gimple_opt_pass
{
public:
pass_mudflap_2(gcc::context *ctxt)
: gimple_opt_pass(pass_data_mudflap_2, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_mudflap (); }
}; // class pass_mudflap_2
} // anon namespace
gimple_opt_pass *
make_pass_mudflap_2 (gcc::context *ctxt)
{
return new pass_mudflap_2 (ctxt);
}
/* Instead of:
#include "gt-tree-mudflap.h"
We prepare a little dummy struct here.

View File

@ -269,26 +269,44 @@ gate_pass_return_slot (void)
return optimize > 0;
}
struct gimple_opt_pass pass_nrv =
namespace {
const pass_data pass_data_nrv =
{
{
GIMPLE_PASS,
"nrv", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_pass_return_slot, /* gate */
tree_nrv, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_TREE_NRV, /* tv_id */
PROP_ssa | PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"nrv", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_TREE_NRV, /* tv_id */
( PROP_ssa | PROP_cfg ), /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_nrv : public gimple_opt_pass
{
public:
pass_nrv(gcc::context *ctxt)
: gimple_opt_pass(pass_data_nrv, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_pass_return_slot (); }
unsigned int execute () { return tree_nrv (); }
}; // class pass_nrv
} // anon namespace
gimple_opt_pass *
make_pass_nrv (gcc::context *ctxt)
{
return new pass_nrv (ctxt);
}
/* Determine (pessimistically) whether DEST is available for NRV
optimization, where DEST is expected to be the LHS of a modify
expression where the RHS is a function returning an aggregate.
@ -355,22 +373,39 @@ execute_return_slot_opt (void)
return 0;
}
struct gimple_opt_pass pass_return_slot =
namespace {
const pass_data pass_data_return_slot =
{
{
GIMPLE_PASS,
"retslot", /* name */
OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
execute_return_slot_opt, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"retslot", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_return_slot : public gimple_opt_pass
{
public:
pass_return_slot(gcc::context *ctxt)
: gimple_opt_pass(pass_data_return_slot, ctxt)
{}
/* opt_pass methods: */
unsigned int execute () { return execute_return_slot_opt (); }
}; // class pass_return_slot
} // anon namespace
gimple_opt_pass *
make_pass_return_slot (gcc::context *ctxt)
{
return new pass_return_slot (ctxt);
}

View File

@ -1262,22 +1262,40 @@ compute_object_sizes (void)
return 0;
}
struct gimple_opt_pass pass_object_sizes =
namespace {
const pass_data pass_data_object_sizes =
{
{
GIMPLE_PASS,
"objsz", /* name */
OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
compute_object_sizes, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
PROP_cfg | PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_ssa /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"objsz", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
( PROP_cfg | PROP_ssa ), /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_ssa, /* todo_flags_finish */
};
class pass_object_sizes : public gimple_opt_pass
{
public:
pass_object_sizes(gcc::context *ctxt)
: gimple_opt_pass(pass_data_object_sizes, ctxt)
{}
/* opt_pass methods: */
opt_pass * clone () { return new pass_object_sizes (ctxt_); }
unsigned int execute () { return compute_object_sizes (); }
}; // class pass_object_sizes
} // anon namespace
gimple_opt_pass *
make_pass_object_sizes (gcc::context *ctxt)
{
return new pass_object_sizes (ctxt);
}

View File

@ -88,26 +88,45 @@ execute_cleanup_cfg_post_optimizing (void)
return todo;
}
struct gimple_opt_pass pass_cleanup_cfg_post_optimizing =
namespace {
const pass_data pass_data_cleanup_cfg_post_optimizing =
{
{
GIMPLE_PASS,
"optimized", /* name */
OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
execute_cleanup_cfg_post_optimizing, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_TREE_CLEANUP_CFG, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_remove_unused_locals /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"optimized", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_TREE_CLEANUP_CFG, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_remove_unused_locals, /* todo_flags_finish */
};
class pass_cleanup_cfg_post_optimizing : public gimple_opt_pass
{
public:
pass_cleanup_cfg_post_optimizing(gcc::context *ctxt)
: gimple_opt_pass(pass_data_cleanup_cfg_post_optimizing, ctxt)
{}
/* opt_pass methods: */
unsigned int execute () {
return execute_cleanup_cfg_post_optimizing ();
}
}; // class pass_cleanup_cfg_post_optimizing
} // anon namespace
gimple_opt_pass *
make_pass_cleanup_cfg_post_optimizing (gcc::context *ctxt)
{
return new pass_cleanup_cfg_post_optimizing (ctxt);
}
/* IPA passes, compilation of earlier functions or inlining
might have changed some properties, such as marked functions nothrow,
pure, const or noreturn.
@ -211,22 +230,40 @@ execute_fixup_cfg (void)
return todo;
}
struct gimple_opt_pass pass_fixup_cfg =
namespace {
const pass_data pass_data_fixup_cfg =
{
{
GIMPLE_PASS,
"*free_cfg_annotations", /* name */
OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
execute_fixup_cfg, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"*free_cfg_annotations", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_fixup_cfg : public gimple_opt_pass
{
public:
pass_fixup_cfg(gcc::context *ctxt)
: gimple_opt_pass(pass_data_fixup_cfg, ctxt)
{}
/* opt_pass methods: */
opt_pass * clone () { return new pass_fixup_cfg (ctxt_); }
unsigned int execute () { return execute_fixup_cfg (); }
}; // class pass_fixup_cfg
} // anon namespace
gimple_opt_pass *
make_pass_fixup_cfg (gcc::context *ctxt)
{
return new pass_fixup_cfg (ctxt);
}

View File

@ -330,237 +330,247 @@ struct register_pass_info
enum pass_positioning_ops pos_op; /* how to insert the new pass. */
};
extern struct gimple_opt_pass pass_mudflap_1;
extern struct gimple_opt_pass pass_mudflap_2;
extern struct gimple_opt_pass pass_asan;
extern struct gimple_opt_pass pass_asan_O0;
extern struct gimple_opt_pass pass_tsan;
extern struct gimple_opt_pass pass_tsan_O0;
extern struct gimple_opt_pass pass_lower_cf;
extern struct gimple_opt_pass pass_refactor_eh;
extern struct gimple_opt_pass pass_lower_eh;
extern struct gimple_opt_pass pass_lower_eh_dispatch;
extern struct gimple_opt_pass pass_lower_resx;
extern struct gimple_opt_pass pass_build_cfg;
extern struct gimple_opt_pass pass_early_tree_profile;
extern struct gimple_opt_pass pass_cleanup_eh;
extern struct gimple_opt_pass pass_sra;
extern struct gimple_opt_pass pass_sra_early;
extern struct gimple_opt_pass pass_early_ipa_sra;
extern struct gimple_opt_pass pass_tail_recursion;
extern struct gimple_opt_pass pass_tail_calls;
extern struct gimple_opt_pass pass_tree_loop;
extern struct gimple_opt_pass pass_tree_loop_init;
extern struct gimple_opt_pass pass_lim;
extern struct gimple_opt_pass pass_tree_unswitch;
extern struct gimple_opt_pass pass_predcom;
extern struct gimple_opt_pass pass_iv_canon;
extern struct gimple_opt_pass pass_scev_cprop;
extern struct gimple_opt_pass pass_empty_loop;
extern struct gimple_opt_pass pass_record_bounds;
extern struct gimple_opt_pass pass_graphite;
extern struct gimple_opt_pass pass_graphite_transforms;
extern struct gimple_opt_pass pass_if_conversion;
extern struct gimple_opt_pass pass_loop_distribution;
extern struct gimple_opt_pass pass_vectorize;
extern struct gimple_opt_pass pass_slp_vectorize;
extern struct gimple_opt_pass pass_complete_unroll;
extern struct gimple_opt_pass pass_complete_unrolli;
extern struct gimple_opt_pass pass_parallelize_loops;
extern struct gimple_opt_pass pass_loop_prefetch;
extern struct gimple_opt_pass pass_iv_optimize;
extern struct gimple_opt_pass pass_tree_loop_done;
extern struct gimple_opt_pass pass_ch;
extern struct gimple_opt_pass pass_ccp;
extern struct gimple_opt_pass pass_phi_only_cprop;
extern struct gimple_opt_pass pass_build_ssa;
extern struct gimple_opt_pass pass_build_alias;
extern struct gimple_opt_pass pass_build_ealias;
extern struct gimple_opt_pass pass_dominator;
extern struct gimple_opt_pass pass_dce;
extern struct gimple_opt_pass pass_dce_loop;
extern struct gimple_opt_pass pass_cd_dce;
extern struct gimple_opt_pass pass_call_cdce;
extern struct gimple_opt_pass pass_merge_phi;
extern struct gimple_opt_pass pass_split_crit_edges;
extern struct gimple_opt_pass pass_pre;
extern gimple_opt_pass *make_pass_mudflap_1 (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_mudflap_2 (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_asan (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_asan_O0 (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_tsan (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_tsan_O0 (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_lower_cf (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_refactor_eh (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_lower_eh (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_lower_eh_dispatch (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_lower_resx (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_build_cfg (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_early_tree_profile (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_cleanup_eh (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_sra (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_sra_early (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_early_ipa_sra (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_tail_recursion (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_tail_calls (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_tree_loop (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_tree_loop_init (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_lim (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_tree_unswitch (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_predcom (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_iv_canon (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_scev_cprop (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_empty_loop (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_record_bounds (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_graphite (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_graphite_transforms (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_if_conversion (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_loop_distribution (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_vectorize (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_slp_vectorize (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_complete_unroll (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_complete_unrolli (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_parallelize_loops (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_loop_prefetch (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_iv_optimize (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_tree_loop_done (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_ch (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_ccp (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_phi_only_cprop (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_build_ssa (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_build_alias (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_build_ealias (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_dominator (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_dce (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_dce_loop (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_cd_dce (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_call_cdce (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_merge_phi (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_split_crit_edges (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_pre (gcc::context *ctxt);
extern unsigned int tail_merge_optimize (unsigned int);
extern struct gimple_opt_pass pass_profile;
extern struct gimple_opt_pass pass_strip_predict_hints;
extern struct gimple_opt_pass pass_lower_complex_O0;
extern struct gimple_opt_pass pass_lower_complex;
extern struct gimple_opt_pass pass_lower_vector;
extern struct gimple_opt_pass pass_lower_vector_ssa;
extern struct gimple_opt_pass pass_lower_omp;
extern struct gimple_opt_pass pass_diagnose_omp_blocks;
extern struct gimple_opt_pass pass_expand_omp;
extern struct gimple_opt_pass pass_expand_omp_ssa;
extern struct gimple_opt_pass pass_object_sizes;
extern struct gimple_opt_pass pass_strlen;
extern struct gimple_opt_pass pass_fold_builtins;
extern struct gimple_opt_pass pass_stdarg;
extern struct gimple_opt_pass pass_early_warn_uninitialized;
extern struct gimple_opt_pass pass_late_warn_uninitialized;
extern struct gimple_opt_pass pass_cse_reciprocals;
extern struct gimple_opt_pass pass_cse_sincos;
extern struct gimple_opt_pass pass_optimize_bswap;
extern struct gimple_opt_pass pass_optimize_widening_mul;
extern struct gimple_opt_pass pass_warn_function_return;
extern struct gimple_opt_pass pass_warn_function_noreturn;
extern struct gimple_opt_pass pass_cselim;
extern struct gimple_opt_pass pass_phiopt;
extern struct gimple_opt_pass pass_forwprop;
extern struct gimple_opt_pass pass_phiprop;
extern struct gimple_opt_pass pass_tree_ifcombine;
extern struct gimple_opt_pass pass_dse;
extern struct gimple_opt_pass pass_nrv;
extern struct gimple_opt_pass pass_rename_ssa_copies;
extern struct gimple_opt_pass pass_sink_code;
extern struct gimple_opt_pass pass_fre;
extern struct gimple_opt_pass pass_check_data_deps;
extern struct gimple_opt_pass pass_copy_prop;
extern struct gimple_opt_pass pass_vrp;
extern struct gimple_opt_pass pass_uncprop;
extern struct gimple_opt_pass pass_return_slot;
extern struct gimple_opt_pass pass_reassoc;
extern struct gimple_opt_pass pass_rebuild_cgraph_edges;
extern struct gimple_opt_pass pass_remove_cgraph_callee_edges;
extern struct gimple_opt_pass pass_build_cgraph_edges;
extern struct gimple_opt_pass pass_local_pure_const;
extern struct gimple_opt_pass pass_tracer;
extern struct gimple_opt_pass pass_warn_unused_result;
extern struct gimple_opt_pass pass_diagnose_tm_blocks;
extern struct gimple_opt_pass pass_lower_tm;
extern struct gimple_opt_pass pass_tm_init;
extern struct gimple_opt_pass pass_tm_mark;
extern struct gimple_opt_pass pass_tm_memopt;
extern struct gimple_opt_pass pass_tm_edges;
extern struct gimple_opt_pass pass_split_functions;
extern struct gimple_opt_pass pass_feedback_split_functions;
extern struct gimple_opt_pass pass_strength_reduction;
extern gimple_opt_pass *make_pass_profile (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_strip_predict_hints (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_lower_complex_O0 (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_lower_complex (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_lower_vector (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_lower_vector_ssa (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_lower_omp (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_diagnose_omp_blocks (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_expand_omp (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_expand_omp_ssa (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_object_sizes (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_strlen (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_fold_builtins (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_stdarg (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_early_warn_uninitialized (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_late_warn_uninitialized (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_cse_reciprocals (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_cse_sincos (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_optimize_bswap (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_optimize_widening_mul (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_warn_function_return (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_warn_function_noreturn (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_cselim (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_phiopt (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_forwprop (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_phiprop (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_tree_ifcombine (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_dse (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_nrv (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_rename_ssa_copies (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_sink_code (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_fre (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_check_data_deps (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_copy_prop (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_vrp (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_uncprop (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_return_slot (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_reassoc (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_rebuild_cgraph_edges (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_remove_cgraph_callee_edges (gcc::context
*ctxt);
extern gimple_opt_pass *make_pass_build_cgraph_edges (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_local_pure_const (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_tracer (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_warn_unused_result (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_diagnose_tm_blocks (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_lower_tm (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_tm_init (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_tm_mark (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_tm_memopt (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_tm_edges (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_split_functions (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_feedback_split_functions (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_strength_reduction (gcc::context *ctxt);
/* IPA Passes */
extern struct simple_ipa_opt_pass pass_ipa_lower_emutls;
extern struct simple_ipa_opt_pass pass_ipa_function_and_variable_visibility;
extern struct simple_ipa_opt_pass pass_ipa_tree_profile;
extern simple_ipa_opt_pass *make_pass_ipa_lower_emutls (gcc::context *ctxt);
extern simple_ipa_opt_pass
*make_pass_ipa_function_and_variable_visibility (gcc::context *ctxt);
extern simple_ipa_opt_pass *make_pass_ipa_tree_profile (gcc::context *ctxt);
extern struct simple_ipa_opt_pass pass_early_local_passes;
extern simple_ipa_opt_pass *make_pass_early_local_passes (gcc::context *ctxt);
extern struct ipa_opt_pass_d pass_ipa_whole_program_visibility;
extern struct ipa_opt_pass_d pass_ipa_lto_gimple_out;
extern struct simple_ipa_opt_pass pass_ipa_increase_alignment;
extern struct ipa_opt_pass_d pass_ipa_inline;
extern struct simple_ipa_opt_pass pass_ipa_free_lang_data;
extern struct simple_ipa_opt_pass pass_ipa_free_inline_summary;
extern struct ipa_opt_pass_d pass_ipa_cp;
extern struct ipa_opt_pass_d pass_ipa_reference;
extern struct ipa_opt_pass_d pass_ipa_pure_const;
extern struct simple_ipa_opt_pass pass_ipa_pta;
extern struct ipa_opt_pass_d pass_ipa_lto_finish_out;
extern struct simple_ipa_opt_pass pass_ipa_tm;
extern struct ipa_opt_pass_d pass_ipa_profile;
extern struct ipa_opt_pass_d pass_ipa_cdtor_merge;
extern ipa_opt_pass_d *make_pass_ipa_whole_program_visibility (gcc::context
*ctxt);
extern ipa_opt_pass_d *make_pass_ipa_lto_gimple_out (gcc::context *ctxt);
extern simple_ipa_opt_pass *make_pass_ipa_increase_alignment (gcc::context
*ctxt);
extern ipa_opt_pass_d *make_pass_ipa_inline (gcc::context *ctxt);
extern simple_ipa_opt_pass *make_pass_ipa_free_lang_data (gcc::context *ctxt);
extern simple_ipa_opt_pass *make_pass_ipa_free_inline_summary (gcc::context
*ctxt);
extern ipa_opt_pass_d *make_pass_ipa_cp (gcc::context *ctxt);
extern ipa_opt_pass_d *make_pass_ipa_reference (gcc::context *ctxt);
extern ipa_opt_pass_d *make_pass_ipa_pure_const (gcc::context *ctxt);
extern simple_ipa_opt_pass *make_pass_ipa_pta (gcc::context *ctxt);
extern ipa_opt_pass_d *make_pass_ipa_lto_finish_out (gcc::context *ctxt);
extern simple_ipa_opt_pass *make_pass_ipa_tm (gcc::context *ctxt);
extern ipa_opt_pass_d *make_pass_ipa_profile (gcc::context *ctxt);
extern ipa_opt_pass_d *make_pass_ipa_cdtor_merge (gcc::context *ctxt);
extern struct gimple_opt_pass pass_cleanup_cfg_post_optimizing;
extern struct gimple_opt_pass pass_init_datastructures;
extern struct gimple_opt_pass pass_fixup_cfg;
extern gimple_opt_pass *make_pass_cleanup_cfg_post_optimizing (gcc::context
*ctxt);
extern gimple_opt_pass *make_pass_init_datastructures (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_fixup_cfg (gcc::context *ctxt);
extern struct rtl_opt_pass pass_expand;
extern struct rtl_opt_pass pass_instantiate_virtual_regs;
extern struct rtl_opt_pass pass_rtl_fwprop;
extern struct rtl_opt_pass pass_rtl_fwprop_addr;
extern struct rtl_opt_pass pass_jump;
extern struct rtl_opt_pass pass_jump2;
extern struct rtl_opt_pass pass_lower_subreg;
extern struct rtl_opt_pass pass_cse;
extern struct rtl_opt_pass pass_fast_rtl_dce;
extern struct rtl_opt_pass pass_ud_rtl_dce;
extern struct rtl_opt_pass pass_rtl_dce;
extern struct rtl_opt_pass pass_rtl_dse1;
extern struct rtl_opt_pass pass_rtl_dse2;
extern struct rtl_opt_pass pass_rtl_dse3;
extern struct rtl_opt_pass pass_rtl_cprop;
extern struct rtl_opt_pass pass_rtl_pre;
extern struct rtl_opt_pass pass_rtl_hoist;
extern struct rtl_opt_pass pass_rtl_store_motion;
extern struct rtl_opt_pass pass_cse_after_global_opts;
extern struct rtl_opt_pass pass_rtl_ifcvt;
extern rtl_opt_pass *make_pass_expand (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_instantiate_virtual_regs (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_rtl_fwprop (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_rtl_fwprop_addr (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_jump (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_jump2 (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_lower_subreg (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_cse (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_fast_rtl_dce (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_ud_rtl_dce (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_rtl_dce (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_rtl_dse1 (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_rtl_dse2 (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_rtl_dse3 (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_rtl_cprop (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_rtl_pre (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_rtl_hoist (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_rtl_store_motion (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_cse_after_global_opts (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_rtl_ifcvt (gcc::context *ctxt);
extern struct rtl_opt_pass pass_into_cfg_layout_mode;
extern struct rtl_opt_pass pass_outof_cfg_layout_mode;
extern rtl_opt_pass *make_pass_into_cfg_layout_mode (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_outof_cfg_layout_mode (gcc::context *ctxt);
extern struct rtl_opt_pass pass_loop2;
extern struct rtl_opt_pass pass_rtl_loop_init;
extern struct rtl_opt_pass pass_rtl_move_loop_invariants;
extern struct rtl_opt_pass pass_rtl_unswitch;
extern struct rtl_opt_pass pass_rtl_unroll_and_peel_loops;
extern struct rtl_opt_pass pass_rtl_doloop;
extern struct rtl_opt_pass pass_rtl_loop_done;
extern rtl_opt_pass *make_pass_loop2 (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_rtl_loop_init (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_rtl_move_loop_invariants (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_rtl_unswitch (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_rtl_unroll_and_peel_loops (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_rtl_doloop (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_rtl_loop_done (gcc::context *ctxt);
extern struct rtl_opt_pass pass_web;
extern struct rtl_opt_pass pass_cse2;
extern struct rtl_opt_pass pass_df_initialize_opt;
extern struct rtl_opt_pass pass_df_initialize_no_opt;
extern struct rtl_opt_pass pass_reginfo_init;
extern struct rtl_opt_pass pass_inc_dec;
extern struct rtl_opt_pass pass_stack_ptr_mod;
extern struct rtl_opt_pass pass_initialize_regs;
extern struct rtl_opt_pass pass_combine;
extern struct rtl_opt_pass pass_if_after_combine;
extern struct rtl_opt_pass pass_ree;
extern struct rtl_opt_pass pass_partition_blocks;
extern struct rtl_opt_pass pass_match_asm_constraints;
extern struct rtl_opt_pass pass_regmove;
extern struct rtl_opt_pass pass_split_all_insns;
extern struct rtl_opt_pass pass_fast_rtl_byte_dce;
extern struct rtl_opt_pass pass_lower_subreg2;
extern struct rtl_opt_pass pass_mode_switching;
extern struct rtl_opt_pass pass_sms;
extern struct rtl_opt_pass pass_sched;
extern struct rtl_opt_pass pass_ira;
extern struct rtl_opt_pass pass_reload;
extern struct rtl_opt_pass pass_clean_state;
extern struct rtl_opt_pass pass_branch_prob;
extern struct rtl_opt_pass pass_value_profile_transformations;
extern struct rtl_opt_pass pass_postreload_cse;
extern struct rtl_opt_pass pass_gcse2;
extern struct rtl_opt_pass pass_split_after_reload;
extern struct rtl_opt_pass pass_branch_target_load_optimize1;
extern struct rtl_opt_pass pass_thread_prologue_and_epilogue;
extern struct rtl_opt_pass pass_stack_adjustments;
extern struct rtl_opt_pass pass_peephole2;
extern struct rtl_opt_pass pass_if_after_reload;
extern struct rtl_opt_pass pass_regrename;
extern struct rtl_opt_pass pass_cprop_hardreg;
extern struct rtl_opt_pass pass_reorder_blocks;
extern struct rtl_opt_pass pass_branch_target_load_optimize2;
extern struct rtl_opt_pass pass_leaf_regs;
extern struct rtl_opt_pass pass_split_before_sched2;
extern struct rtl_opt_pass pass_compare_elim_after_reload;
extern struct rtl_opt_pass pass_sched2;
extern struct rtl_opt_pass pass_stack_regs;
extern struct rtl_opt_pass pass_stack_regs_run;
extern struct rtl_opt_pass pass_df_finish;
extern struct rtl_opt_pass pass_compute_alignments;
extern struct rtl_opt_pass pass_duplicate_computed_gotos;
extern struct rtl_opt_pass pass_variable_tracking;
extern struct rtl_opt_pass pass_free_cfg;
extern struct rtl_opt_pass pass_machine_reorg;
extern struct rtl_opt_pass pass_cleanup_barriers;
extern struct rtl_opt_pass pass_delay_slots;
extern struct rtl_opt_pass pass_split_for_shorten_branches;
extern struct rtl_opt_pass pass_split_before_regstack;
extern struct rtl_opt_pass pass_convert_to_eh_region_ranges;
extern struct rtl_opt_pass pass_shorten_branches;
extern struct rtl_opt_pass pass_set_nothrow_function_flags;
extern struct rtl_opt_pass pass_dwarf2_frame;
extern struct rtl_opt_pass pass_final;
extern struct rtl_opt_pass pass_rtl_seqabstr;
extern struct gimple_opt_pass pass_release_ssa_names;
extern struct gimple_opt_pass pass_early_inline;
extern struct gimple_opt_pass pass_inline_parameters;
extern struct gimple_opt_pass pass_update_address_taken;
extern struct gimple_opt_pass pass_convert_switch;
extern rtl_opt_pass *make_pass_web (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_cse2 (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_df_initialize_opt (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_df_initialize_no_opt (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_reginfo_init (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_inc_dec (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_stack_ptr_mod (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_initialize_regs (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_combine (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_if_after_combine (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_ree (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_partition_blocks (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_match_asm_constraints (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_regmove (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_split_all_insns (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_fast_rtl_byte_dce (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_lower_subreg2 (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_mode_switching (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_sms (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_sched (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_ira (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_reload (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_clean_state (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_branch_prob (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_value_profile_transformations (gcc::context
*ctxt);
extern rtl_opt_pass *make_pass_postreload_cse (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_gcse2 (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_split_after_reload (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_branch_target_load_optimize1 (gcc::context
*ctxt);
extern rtl_opt_pass *make_pass_thread_prologue_and_epilogue (gcc::context
*ctxt);
extern rtl_opt_pass *make_pass_stack_adjustments (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_peephole2 (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_if_after_reload (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_regrename (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_cprop_hardreg (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_reorder_blocks (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_branch_target_load_optimize2 (gcc::context
*ctxt);
extern rtl_opt_pass *make_pass_leaf_regs (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_split_before_sched2 (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_compare_elim_after_reload (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_sched2 (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_stack_regs (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_stack_regs_run (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_df_finish (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_compute_alignments (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_duplicate_computed_gotos (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_variable_tracking (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_free_cfg (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_machine_reorg (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_cleanup_barriers (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_delay_slots (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_split_for_shorten_branches (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_split_before_regstack (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_convert_to_eh_region_ranges (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_shorten_branches (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_set_nothrow_function_flags (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_dwarf2_frame (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_final (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_rtl_seqabstr (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_release_ssa_names (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_early_inline (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_inline_parameters (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_update_address_taken (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_convert_switch (gcc::context *ctxt);
/* Current optimization pass. */
extern struct opt_pass *current_pass;

View File

@ -561,24 +561,42 @@ gate_tree_profile_ipa (void)
|| profile_arc_flag));
}
struct simple_ipa_opt_pass pass_ipa_tree_profile =
namespace {
const pass_data pass_data_ipa_tree_profile =
{
{
SIMPLE_IPA_PASS,
"profile", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_tree_profile_ipa, /* gate */
tree_profiling, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_IPA_PROFILE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
SIMPLE_IPA_PASS, /* type */
"profile", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_IPA_PROFILE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_ipa_tree_profile : public simple_ipa_opt_pass
{
public:
pass_ipa_tree_profile(gcc::context *ctxt)
: simple_ipa_opt_pass(pass_data_ipa_tree_profile, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_tree_profile_ipa (); }
unsigned int execute () { return tree_profiling (); }
}; // class pass_ipa_tree_profile
} // anon namespace
simple_ipa_opt_pass *
make_pass_ipa_tree_profile (gcc::context *ctxt)
{
return new pass_ipa_tree_profile (ctxt);
}
#include "gt-tree-profile.h"

View File

@ -3442,48 +3442,82 @@ gate_intra_sra (void)
}
struct gimple_opt_pass pass_sra_early =
namespace {
const pass_data pass_data_sra_early =
{
{
GIMPLE_PASS,
"esra", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_intra_sra, /* gate */
early_intra_sra, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_TREE_SRA, /* tv_id */
PROP_cfg | PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_update_ssa
| TODO_verify_ssa /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"esra", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_TREE_SRA, /* tv_id */
( PROP_cfg | PROP_ssa ), /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_update_ssa | TODO_verify_ssa ), /* todo_flags_finish */
};
struct gimple_opt_pass pass_sra =
class pass_sra_early : public gimple_opt_pass
{
{
GIMPLE_PASS,
"sra", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_intra_sra, /* gate */
late_intra_sra, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_TREE_SRA, /* tv_id */
PROP_cfg | PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
TODO_update_address_taken, /* todo_flags_start */
TODO_update_ssa
| TODO_verify_ssa /* todo_flags_finish */
}
public:
pass_sra_early(gcc::context *ctxt)
: gimple_opt_pass(pass_data_sra_early, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_intra_sra (); }
unsigned int execute () { return early_intra_sra (); }
}; // class pass_sra_early
} // anon namespace
gimple_opt_pass *
make_pass_sra_early (gcc::context *ctxt)
{
return new pass_sra_early (ctxt);
}
namespace {
const pass_data pass_data_sra =
{
GIMPLE_PASS, /* type */
"sra", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_TREE_SRA, /* tv_id */
( PROP_cfg | PROP_ssa ), /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
TODO_update_address_taken, /* todo_flags_start */
( TODO_update_ssa | TODO_verify_ssa ), /* todo_flags_finish */
};
class pass_sra : public gimple_opt_pass
{
public:
pass_sra(gcc::context *ctxt)
: gimple_opt_pass(pass_data_sra, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_intra_sra (); }
unsigned int execute () { return late_intra_sra (); }
}; // class pass_sra
} // anon namespace
gimple_opt_pass *
make_pass_sra (gcc::context *ctxt)
{
return new pass_sra (ctxt);
}
/* Return true iff PARM (which must be a parm_decl) is an unused scalar
parameter. */
@ -5018,22 +5052,40 @@ ipa_early_sra_gate (void)
return flag_ipa_sra && dbg_cnt (eipa_sra);
}
struct gimple_opt_pass pass_early_ipa_sra =
namespace {
const pass_data pass_data_early_ipa_sra =
{
{
GIMPLE_PASS,
"eipa_sra", /* name */
OPTGROUP_NONE, /* optinfo_flags */
ipa_early_sra_gate, /* gate */
ipa_early_sra, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_IPA_SRA, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_dump_symtab /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"eipa_sra", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_IPA_SRA, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_dump_symtab, /* todo_flags_finish */
};
class pass_early_ipa_sra : public gimple_opt_pass
{
public:
pass_early_ipa_sra(gcc::context *ctxt)
: gimple_opt_pass(pass_data_early_ipa_sra, ctxt)
{}
/* opt_pass methods: */
bool gate () { return ipa_early_sra_gate (); }
unsigned int execute () { return ipa_early_sra (); }
}; // class pass_early_ipa_sra
} // anon namespace
gimple_opt_pass *
make_pass_early_ipa_sra (gcc::context *ctxt)
{
return new pass_early_ipa_sra (ctxt);
}

View File

@ -2121,28 +2121,46 @@ gate_ccp (void)
}
struct gimple_opt_pass pass_ccp =
namespace {
const pass_data pass_data_ccp =
{
{
GIMPLE_PASS,
"ccp", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_ccp, /* gate */
do_ssa_ccp, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_TREE_CCP, /* tv_id */
PROP_cfg | PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_ssa
| TODO_update_address_taken
| TODO_verify_stmts /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"ccp", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_TREE_CCP, /* tv_id */
( PROP_cfg | PROP_ssa ), /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_verify_ssa | TODO_update_address_taken
| TODO_verify_stmts ), /* todo_flags_finish */
};
class pass_ccp : public gimple_opt_pass
{
public:
pass_ccp(gcc::context *ctxt)
: gimple_opt_pass(pass_data_ccp, ctxt)
{}
/* opt_pass methods: */
opt_pass * clone () { return new pass_ccp (ctxt_); }
bool gate () { return gate_ccp (); }
unsigned int execute () { return do_ssa_ccp (); }
}; // class pass_ccp
} // anon namespace
gimple_opt_pass *
make_pass_ccp (gcc::context *ctxt)
{
return new pass_ccp (ctxt);
}
/* Try to optimize out __builtin_stack_restore. Optimize it out
@ -2521,23 +2539,40 @@ execute_fold_all_builtins (void)
}
struct gimple_opt_pass pass_fold_builtins =
namespace {
const pass_data pass_data_fold_builtins =
{
{
GIMPLE_PASS,
"fab", /* name */
OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
execute_fold_all_builtins, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
PROP_cfg | PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_ssa
| TODO_update_ssa /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"fab", /* name */
OPTGROUP_NONE, /* optinfo_flags */
false, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
( PROP_cfg | PROP_ssa ), /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_verify_ssa | TODO_update_ssa ), /* todo_flags_finish */
};
class pass_fold_builtins : public gimple_opt_pass
{
public:
pass_fold_builtins(gcc::context *ctxt)
: gimple_opt_pass(pass_data_fold_builtins, ctxt)
{}
/* opt_pass methods: */
opt_pass * clone () { return new pass_fold_builtins (ctxt_); }
unsigned int execute () { return execute_fold_all_builtins (); }
}; // class pass_fold_builtins
} // anon namespace
gimple_opt_pass *
make_pass_fold_builtins (gcc::context *ctxt)
{
return new pass_fold_builtins (ctxt);
}

View File

@ -823,24 +823,42 @@ gate_copy_prop (void)
return flag_tree_copy_prop != 0;
}
struct gimple_opt_pass pass_copy_prop =
namespace {
const pass_data pass_data_copy_prop =
{
{
GIMPLE_PASS,
"copyprop", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_copy_prop, /* gate */
execute_copy_prop, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_TREE_COPY_PROP, /* tv_id */
PROP_ssa | PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_cleanup_cfg
| TODO_verify_ssa
| TODO_update_ssa /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"copyprop", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_TREE_COPY_PROP, /* tv_id */
( PROP_ssa | PROP_cfg ), /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_cleanup_cfg | TODO_verify_ssa
| TODO_update_ssa ), /* todo_flags_finish */
};
class pass_copy_prop : public gimple_opt_pass
{
public:
pass_copy_prop(gcc::context *ctxt)
: gimple_opt_pass(pass_data_copy_prop, ctxt)
{}
/* opt_pass methods: */
opt_pass * clone () { return new pass_copy_prop (ctxt_); }
bool gate () { return gate_copy_prop (); }
unsigned int execute () { return execute_copy_prop (); }
}; // class pass_copy_prop
} // anon namespace
gimple_opt_pass *
make_pass_copy_prop (gcc::context *ctxt)
{
return new pass_copy_prop (ctxt);
}

View File

@ -435,22 +435,41 @@ gate_copyrename (void)
return flag_tree_copyrename != 0;
}
struct gimple_opt_pass pass_rename_ssa_copies =
namespace {
const pass_data pass_data_rename_ssa_copies =
{
{
GIMPLE_PASS,
"copyrename", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_copyrename, /* gate */
rename_ssa_copies, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_TREE_COPY_RENAME, /* tv_id */
PROP_cfg | PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_ssa /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"copyrename", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_TREE_COPY_RENAME, /* tv_id */
( PROP_cfg | PROP_ssa ), /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_ssa, /* todo_flags_finish */
};
class pass_rename_ssa_copies : public gimple_opt_pass
{
public:
pass_rename_ssa_copies(gcc::context *ctxt)
: gimple_opt_pass(pass_data_rename_ssa_copies, ctxt)
{}
/* opt_pass methods: */
opt_pass * clone () { return new pass_rename_ssa_copies (ctxt_); }
bool gate () { return gate_copyrename (); }
unsigned int execute () { return rename_ssa_copies (); }
}; // class pass_rename_ssa_copies
} // anon namespace
gimple_opt_pass *
make_pass_rename_ssa_copies (gcc::context *ctxt)
{
return new pass_rename_ssa_copies (ctxt);
}

View File

@ -1643,63 +1643,119 @@ gate_dce (void)
return flag_tree_dce != 0;
}
struct gimple_opt_pass pass_dce =
namespace {
const pass_data pass_data_dce =
{
{
GIMPLE_PASS,
"dce", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_dce, /* gate */
tree_ssa_dce, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_TREE_DCE, /* tv_id */
PROP_cfg | PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_ssa /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"dce", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_TREE_DCE, /* tv_id */
( PROP_cfg | PROP_ssa ), /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_ssa, /* todo_flags_finish */
};
struct gimple_opt_pass pass_dce_loop =
class pass_dce : public gimple_opt_pass
{
{
GIMPLE_PASS,
"dceloop", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_dce, /* gate */
tree_ssa_dce_loop, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_TREE_DCE, /* tv_id */
PROP_cfg | PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_ssa /* todo_flags_finish */
}
public:
pass_dce(gcc::context *ctxt)
: gimple_opt_pass(pass_data_dce, ctxt)
{}
/* opt_pass methods: */
opt_pass * clone () { return new pass_dce (ctxt_); }
bool gate () { return gate_dce (); }
unsigned int execute () { return tree_ssa_dce (); }
}; // class pass_dce
} // anon namespace
gimple_opt_pass *
make_pass_dce (gcc::context *ctxt)
{
return new pass_dce (ctxt);
}
namespace {
const pass_data pass_data_dce_loop =
{
GIMPLE_PASS, /* type */
"dceloop", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_TREE_DCE, /* tv_id */
( PROP_cfg | PROP_ssa ), /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_ssa, /* todo_flags_finish */
};
struct gimple_opt_pass pass_cd_dce =
class pass_dce_loop : public gimple_opt_pass
{
{
GIMPLE_PASS,
"cddce", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_dce, /* gate */
tree_ssa_cd_dce, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_TREE_CD_DCE, /* tv_id */
PROP_cfg | PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_ssa
| TODO_verify_flow /* todo_flags_finish */
}
public:
pass_dce_loop(gcc::context *ctxt)
: gimple_opt_pass(pass_data_dce_loop, ctxt)
{}
/* opt_pass methods: */
opt_pass * clone () { return new pass_dce_loop (ctxt_); }
bool gate () { return gate_dce (); }
unsigned int execute () { return tree_ssa_dce_loop (); }
}; // class pass_dce_loop
} // anon namespace
gimple_opt_pass *
make_pass_dce_loop (gcc::context *ctxt)
{
return new pass_dce_loop (ctxt);
}
namespace {
const pass_data pass_data_cd_dce =
{
GIMPLE_PASS, /* type */
"cddce", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_TREE_CD_DCE, /* tv_id */
( PROP_cfg | PROP_ssa ), /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_verify_ssa | TODO_verify_flow ), /* todo_flags_finish */
};
class pass_cd_dce : public gimple_opt_pass
{
public:
pass_cd_dce(gcc::context *ctxt)
: gimple_opt_pass(pass_data_cd_dce, ctxt)
{}
/* opt_pass methods: */
opt_pass * clone () { return new pass_cd_dce (ctxt_); }
bool gate () { return gate_dce (); }
unsigned int execute () { return tree_ssa_cd_dce (); }
}; // class pass_cd_dce
} // anon namespace
gimple_opt_pass *
make_pass_cd_dce (gcc::context *ctxt)
{
return new pass_cd_dce (ctxt);
}

View File

@ -919,29 +919,47 @@ gate_dominator (void)
return flag_tree_dom != 0;
}
struct gimple_opt_pass pass_dominator =
namespace {
const pass_data pass_data_dominator =
{
{
GIMPLE_PASS,
"dom", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_dominator, /* gate */
tree_ssa_dominator_optimize, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_TREE_SSA_DOMINATOR_OPTS, /* tv_id */
PROP_cfg | PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_cleanup_cfg
| TODO_update_ssa
GIMPLE_PASS, /* type */
"dom", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_TREE_SSA_DOMINATOR_OPTS, /* tv_id */
( PROP_cfg | PROP_ssa ), /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_cleanup_cfg | TODO_update_ssa
| TODO_verify_ssa
| TODO_verify_flow /* todo_flags_finish */
}
| TODO_verify_flow ), /* todo_flags_finish */
};
class pass_dominator : public gimple_opt_pass
{
public:
pass_dominator(gcc::context *ctxt)
: gimple_opt_pass(pass_data_dominator, ctxt)
{}
/* opt_pass methods: */
opt_pass * clone () { return new pass_dominator (ctxt_); }
bool gate () { return gate_dominator (); }
unsigned int execute () { return tree_ssa_dominator_optimize (); }
}; // class pass_dominator
} // anon namespace
gimple_opt_pass *
make_pass_dominator (gcc::context *ctxt)
{
return new pass_dominator (ctxt);
}
/* Given a conditional statement CONDSTMT, convert the
condition to a canonical form. */
@ -3094,25 +3112,43 @@ eliminate_degenerate_phis (void)
return 0;
}
struct gimple_opt_pass pass_phi_only_cprop =
namespace {
const pass_data pass_data_phi_only_cprop =
{
{
GIMPLE_PASS,
"phicprop", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_dominator, /* gate */
eliminate_degenerate_phis, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_TREE_PHI_CPROP, /* tv_id */
PROP_cfg | PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_cleanup_cfg
| TODO_verify_ssa
GIMPLE_PASS, /* type */
"phicprop", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_TREE_PHI_CPROP, /* tv_id */
( PROP_cfg | PROP_ssa ), /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_cleanup_cfg | TODO_verify_ssa
| TODO_verify_stmts
| TODO_update_ssa /* todo_flags_finish */
}
| TODO_update_ssa ), /* todo_flags_finish */
};
class pass_phi_only_cprop : public gimple_opt_pass
{
public:
pass_phi_only_cprop(gcc::context *ctxt)
: gimple_opt_pass(pass_data_phi_only_cprop, ctxt)
{}
/* opt_pass methods: */
opt_pass * clone () { return new pass_phi_only_cprop (ctxt_); }
bool gate () { return gate_dominator (); }
unsigned int execute () { return eliminate_degenerate_phis (); }
}; // class pass_phi_only_cprop
} // anon namespace
gimple_opt_pass *
make_pass_phi_only_cprop (gcc::context *ctxt)
{
return new pass_phi_only_cprop (ctxt);
}

View File

@ -366,22 +366,41 @@ gate_dse (void)
return flag_tree_dse != 0;
}
struct gimple_opt_pass pass_dse =
namespace {
const pass_data pass_data_dse =
{
{
GIMPLE_PASS,
"dse", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_dse, /* gate */
tree_ssa_dse, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_TREE_DSE, /* tv_id */
PROP_cfg | PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_ssa /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"dse", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_TREE_DSE, /* tv_id */
( PROP_cfg | PROP_ssa ), /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_ssa, /* todo_flags_finish */
};
class pass_dse : public gimple_opt_pass
{
public:
pass_dse(gcc::context *ctxt)
: gimple_opt_pass(pass_data_dse, ctxt)
{}
/* opt_pass methods: */
opt_pass * clone () { return new pass_dse (ctxt_); }
bool gate () { return gate_dse (); }
unsigned int execute () { return tree_ssa_dse (); }
}; // class pass_dse
} // anon namespace
gimple_opt_pass *
make_pass_dse (gcc::context *ctxt)
{
return new pass_dse (ctxt);
}

View File

@ -3548,23 +3548,41 @@ gate_forwprop (void)
return flag_tree_forwprop;
}
struct gimple_opt_pass pass_forwprop =
namespace {
const pass_data pass_data_forwprop =
{
{
GIMPLE_PASS,
"forwprop", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_forwprop, /* gate */
ssa_forward_propagate_and_combine, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_TREE_FORWPROP, /* tv_id */
PROP_cfg | PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_update_ssa
| TODO_verify_ssa /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"forwprop", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_TREE_FORWPROP, /* tv_id */
( PROP_cfg | PROP_ssa ), /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_update_ssa | TODO_verify_ssa ), /* todo_flags_finish */
};
class pass_forwprop : public gimple_opt_pass
{
public:
pass_forwprop(gcc::context *ctxt)
: gimple_opt_pass(pass_data_forwprop, ctxt)
{}
/* opt_pass methods: */
opt_pass * clone () { return new pass_forwprop (ctxt_); }
bool gate () { return gate_forwprop (); }
unsigned int execute () { return ssa_forward_propagate_and_combine (); }
}; // class pass_forwprop
} // anon namespace
gimple_opt_pass *
make_pass_forwprop (gcc::context *ctxt)
{
return new pass_forwprop (ctxt);
}

View File

@ -648,23 +648,40 @@ gate_ifcombine (void)
return 1;
}
struct gimple_opt_pass pass_tree_ifcombine =
namespace {
const pass_data pass_data_tree_ifcombine =
{
{
GIMPLE_PASS,
"ifcombine", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_ifcombine, /* gate */
tree_ssa_ifcombine, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_TREE_IFCOMBINE, /* tv_id */
PROP_cfg | PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_update_ssa
| TODO_verify_ssa /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"ifcombine", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_TREE_IFCOMBINE, /* tv_id */
( PROP_cfg | PROP_ssa ), /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_update_ssa | TODO_verify_ssa ), /* todo_flags_finish */
};
class pass_tree_ifcombine : public gimple_opt_pass
{
public:
pass_tree_ifcombine(gcc::context *ctxt)
: gimple_opt_pass(pass_data_tree_ifcombine, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_ifcombine (); }
unsigned int execute () { return tree_ssa_ifcombine (); }
}; // class pass_tree_ifcombine
} // anon namespace
gimple_opt_pass *
make_pass_tree_ifcombine (gcc::context *ctxt)
{
return new pass_tree_ifcombine (ctxt);
}

View File

@ -256,24 +256,41 @@ gate_ch (void)
return flag_tree_ch != 0;
}
struct gimple_opt_pass pass_ch =
namespace {
const pass_data pass_data_ch =
{
{
GIMPLE_PASS,
"ch", /* name */
OPTGROUP_LOOP, /* optinfo_flags */
gate_ch, /* gate */
copy_loop_headers, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_TREE_CH, /* tv_id */
PROP_cfg | PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_cleanup_cfg
| TODO_verify_ssa
| TODO_verify_flow /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"ch", /* name */
OPTGROUP_LOOP, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_TREE_CH, /* tv_id */
( PROP_cfg | PROP_ssa ), /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_cleanup_cfg | TODO_verify_ssa
| TODO_verify_flow ), /* todo_flags_finish */
};
class pass_ch : public gimple_opt_pass
{
public:
pass_ch(gcc::context *ctxt)
: gimple_opt_pass(pass_data_ch, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_ch (); }
unsigned int execute () { return copy_loop_headers (); }
}; // class pass_ch
} // anon namespace
gimple_opt_pass *
make_pass_ch (gcc::context *ctxt)
{
return new pass_ch (ctxt);
}

File diff suppressed because it is too large Load Diff

View File

@ -636,27 +636,45 @@ execute_cse_reciprocals (void)
return 0;
}
struct gimple_opt_pass pass_cse_reciprocals =
namespace {
const pass_data pass_data_cse_reciprocals =
{
{
GIMPLE_PASS,
"recip", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_cse_reciprocals, /* gate */
execute_cse_reciprocals, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_update_ssa | TODO_verify_ssa
| TODO_verify_stmts /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"recip", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_update_ssa | TODO_verify_ssa
| TODO_verify_stmts ), /* todo_flags_finish */
};
class pass_cse_reciprocals : public gimple_opt_pass
{
public:
pass_cse_reciprocals(gcc::context *ctxt)
: gimple_opt_pass(pass_data_cse_reciprocals, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_cse_reciprocals (); }
unsigned int execute () { return execute_cse_reciprocals (); }
}; // class pass_cse_reciprocals
} // anon namespace
gimple_opt_pass *
make_pass_cse_reciprocals (gcc::context *ctxt)
{
return new pass_cse_reciprocals (ctxt);
}
/* Records an occurrence at statement USE_STMT in the vector of trees
STMTS if it is dominated by *TOP_BB or dominates it or this basic block
is not yet initialized. Returns true if the occurrence was pushed on
@ -1535,27 +1553,45 @@ gate_cse_sincos (void)
return optimize;
}
struct gimple_opt_pass pass_cse_sincos =
namespace {
const pass_data pass_data_cse_sincos =
{
{
GIMPLE_PASS,
"sincos", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_cse_sincos, /* gate */
execute_cse_sincos, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_update_ssa | TODO_verify_ssa
| TODO_verify_stmts /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"sincos", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_update_ssa | TODO_verify_ssa
| TODO_verify_stmts ), /* todo_flags_finish */
};
class pass_cse_sincos : public gimple_opt_pass
{
public:
pass_cse_sincos(gcc::context *ctxt)
: gimple_opt_pass(pass_data_cse_sincos, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_cse_sincos (); }
unsigned int execute () { return execute_cse_sincos (); }
}; // class pass_cse_sincos
} // anon namespace
gimple_opt_pass *
make_pass_cse_sincos (gcc::context *ctxt)
{
return new pass_cse_sincos (ctxt);
}
/* A symbolic number is used to detect byte permutation and selection
patterns. Therefore the field N contains an artificial number
consisting of byte size markers:
@ -2008,26 +2044,44 @@ gate_optimize_bswap (void)
return flag_expensive_optimizations && optimize;
}
struct gimple_opt_pass pass_optimize_bswap =
namespace {
const pass_data pass_data_optimize_bswap =
{
{
GIMPLE_PASS,
"bswap", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_optimize_bswap, /* gate */
execute_optimize_bswap, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0 /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"bswap", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
};
class pass_optimize_bswap : public gimple_opt_pass
{
public:
pass_optimize_bswap(gcc::context *ctxt)
: gimple_opt_pass(pass_data_optimize_bswap, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_optimize_bswap (); }
unsigned int execute () { return execute_optimize_bswap (); }
}; // class pass_optimize_bswap
} // anon namespace
gimple_opt_pass *
make_pass_optimize_bswap (gcc::context *ctxt)
{
return new pass_optimize_bswap (ctxt);
}
/* Return true if stmt is a type conversion operation that can be stripped
when used in a widening multiply operation. */
static bool
@ -2795,24 +2849,41 @@ gate_optimize_widening_mul (void)
return flag_expensive_optimizations && optimize;
}
struct gimple_opt_pass pass_optimize_widening_mul =
namespace {
const pass_data pass_data_optimize_widening_mul =
{
{
GIMPLE_PASS,
"widening_mul", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_optimize_widening_mul, /* gate */
execute_optimize_widening_mul, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_ssa
| TODO_verify_stmts
| TODO_update_ssa /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"widening_mul", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_NONE, /* tv_id */
PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_verify_ssa | TODO_verify_stmts
| TODO_update_ssa ), /* todo_flags_finish */
};
class pass_optimize_widening_mul : public gimple_opt_pass
{
public:
pass_optimize_widening_mul(gcc::context *ctxt)
: gimple_opt_pass(pass_data_optimize_widening_mul, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_optimize_widening_mul (); }
unsigned int execute () { return execute_optimize_widening_mul (); }
}; // class pass_optimize_widening_mul
} // anon namespace
gimple_opt_pass *
make_pass_optimize_widening_mul (gcc::context *ctxt)
{
return new pass_optimize_widening_mul (ctxt);
}

View File

@ -2015,52 +2015,87 @@ gate_phiopt (void)
return 1;
}
struct gimple_opt_pass pass_phiopt =
namespace {
const pass_data pass_data_phiopt =
{
{
GIMPLE_PASS,
"phiopt", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_phiopt, /* gate */
tree_ssa_phiopt, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_TREE_PHIOPT, /* tv_id */
PROP_cfg | PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_ssa
| TODO_verify_flow
| TODO_verify_stmts /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"phiopt", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_TREE_PHIOPT, /* tv_id */
( PROP_cfg | PROP_ssa ), /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_verify_ssa | TODO_verify_flow
| TODO_verify_stmts ), /* todo_flags_finish */
};
class pass_phiopt : public gimple_opt_pass
{
public:
pass_phiopt(gcc::context *ctxt)
: gimple_opt_pass(pass_data_phiopt, ctxt)
{}
/* opt_pass methods: */
opt_pass * clone () { return new pass_phiopt (ctxt_); }
bool gate () { return gate_phiopt (); }
unsigned int execute () { return tree_ssa_phiopt (); }
}; // class pass_phiopt
} // anon namespace
gimple_opt_pass *
make_pass_phiopt (gcc::context *ctxt)
{
return new pass_phiopt (ctxt);
}
static bool
gate_cselim (void)
{
return flag_tree_cselim;
}
struct gimple_opt_pass pass_cselim =
namespace {
const pass_data pass_data_cselim =
{
{
GIMPLE_PASS,
"cselim", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_cselim, /* gate */
tree_ssa_cs_elim, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_TREE_PHIOPT, /* tv_id */
PROP_cfg | PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_verify_ssa
| TODO_verify_flow
| TODO_verify_stmts /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"cselim", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_TREE_PHIOPT, /* tv_id */
( PROP_cfg | PROP_ssa ), /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_verify_ssa | TODO_verify_flow
| TODO_verify_stmts ), /* todo_flags_finish */
};
class pass_cselim : public gimple_opt_pass
{
public:
pass_cselim(gcc::context *ctxt)
: gimple_opt_pass(pass_data_cselim, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_cselim (); }
unsigned int execute () { return tree_ssa_cs_elim (); }
}; // class pass_cselim
} // anon namespace
gimple_opt_pass *
make_pass_cselim (gcc::context *ctxt)
{
return new pass_cselim (ctxt);
}

View File

@ -394,23 +394,40 @@ gate_phiprop (void)
return flag_tree_phiprop;
}
struct gimple_opt_pass pass_phiprop =
namespace {
const pass_data pass_data_phiprop =
{
{
GIMPLE_PASS,
"phiprop", /* name */
OPTGROUP_NONE, /* optinfo_flags */
gate_phiprop, /* gate */
tree_ssa_phiprop, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_TREE_PHIPROP, /* tv_id */
PROP_cfg | PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_update_ssa
| TODO_verify_ssa /* todo_flags_finish */
}
GIMPLE_PASS, /* type */
"phiprop", /* name */
OPTGROUP_NONE, /* optinfo_flags */
true, /* has_gate */
true, /* has_execute */
TV_TREE_PHIPROP, /* tv_id */
( PROP_cfg | PROP_ssa ), /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
( TODO_update_ssa | TODO_verify_ssa ), /* todo_flags_finish */
};
class pass_phiprop : public gimple_opt_pass
{
public:
pass_phiprop(gcc::context *ctxt)
: gimple_opt_pass(pass_data_phiprop, ctxt)
{}
/* opt_pass methods: */
bool gate () { return gate_phiprop (); }
unsigned int execute () { return tree_ssa_phiprop (); }
}; // class pass_phiprop
} // anon namespace
gimple_opt_pass *
make_pass_phiprop (gcc::context *ctxt)
{
return new pass_phiprop (ctxt);
}

Some files were not shown because too many files have changed in this diff Show More