Automated conversion of passes to C++ classes
authorDavid Malcolm <dmalcolm@redhat.com>
Mon, 5 Aug 2013 20:16:05 +0000 (20:16 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Mon, 5 Aug 2013 20:16:05 +0000 (20:16 +0000)
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

119 files changed:
gcc/ChangeLog
gcc/asan.c
gcc/auto-inc-dec.c
gcc/bb-reorder.c
gcc/bt-load.c
gcc/cfgcleanup.c
gcc/cfgexpand.c
gcc/cfgrtl.c
gcc/cgraphbuild.c
gcc/combine-stack-adj.c
gcc/combine.c
gcc/compare-elim.c
gcc/config/epiphany/epiphany.h
gcc/config/epiphany/mode-switch-use.c
gcc/config/epiphany/resolve-sw-modes.c
gcc/config/i386/i386.c
gcc/config/mips/mips.c
gcc/config/sparc/sparc.c
gcc/cprop.c
gcc/cse.c
gcc/dce.c
gcc/df-core.c
gcc/dse.c
gcc/dwarf2cfi.c
gcc/except.c
gcc/final.c
gcc/function.c
gcc/fwprop.c
gcc/gcse.c
gcc/gimple-low.c
gcc/gimple-ssa-strength-reduction.c
gcc/ifcvt.c
gcc/init-regs.c
gcc/ipa-cp.c
gcc/ipa-inline-analysis.c
gcc/ipa-inline.c
gcc/ipa-pure-const.c
gcc/ipa-reference.c
gcc/ipa-split.c
gcc/ipa.c
gcc/ira.c
gcc/jump.c
gcc/loop-init.c
gcc/lower-subreg.c
gcc/lto-streamer-out.c
gcc/mode-switching.c
gcc/modulo-sched.c
gcc/omp-low.c
gcc/passes.c
gcc/postreload-gcse.c
gcc/postreload.c
gcc/predict.c
gcc/recog.c
gcc/ree.c
gcc/reg-stack.c
gcc/regcprop.c
gcc/reginfo.c
gcc/regmove.c
gcc/regrename.c
gcc/reorg.c
gcc/sched-rgn.c
gcc/stack-ptr-mod.c
gcc/store-motion.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/plugin/dumb_plugin.c
gcc/testsuite/g++.dg/plugin/selfassign.c
gcc/testsuite/gcc.dg/plugin/one_time_plugin.c
gcc/testsuite/gcc.dg/plugin/selfassign.c
gcc/tracer.c
gcc/trans-mem.c
gcc/tree-call-cdce.c
gcc/tree-cfg.c
gcc/tree-cfgcleanup.c
gcc/tree-complex.c
gcc/tree-eh.c
gcc/tree-emutls.c
gcc/tree-if-conv.c
gcc/tree-into-ssa.c
gcc/tree-loop-distribution.c
gcc/tree-mudflap.c
gcc/tree-nomudflap.c
gcc/tree-nrv.c
gcc/tree-object-size.c
gcc/tree-optimize.c
gcc/tree-pass.h
gcc/tree-profile.c
gcc/tree-sra.c
gcc/tree-ssa-ccp.c
gcc/tree-ssa-copy.c
gcc/tree-ssa-copyrename.c
gcc/tree-ssa-dce.c
gcc/tree-ssa-dom.c
gcc/tree-ssa-dse.c
gcc/tree-ssa-forwprop.c
gcc/tree-ssa-ifcombine.c
gcc/tree-ssa-loop-ch.c
gcc/tree-ssa-loop.c
gcc/tree-ssa-math-opts.c
gcc/tree-ssa-phiopt.c
gcc/tree-ssa-phiprop.c
gcc/tree-ssa-pre.c
gcc/tree-ssa-reassoc.c
gcc/tree-ssa-sink.c
gcc/tree-ssa-strlen.c
gcc/tree-ssa-structalias.c
gcc/tree-ssa-uncprop.c
gcc/tree-ssa-uninit.c
gcc/tree-ssa.c
gcc/tree-ssanames.c
gcc/tree-stdarg.c
gcc/tree-switch-conversion.c
gcc/tree-tailcall.c
gcc/tree-vect-generic.c
gcc/tree-vectorizer.c
gcc/tree-vrp.c
gcc/tree.c
gcc/tsan.c
gcc/var-tracking.c
gcc/web.c

index b985e37aec35a12273f40a07a5d1d9bda7741fc4..f45646972cdca8429447d3cbb8c5d29e890a4c0a 100644 (file)
+2013-08-05  David Malcolm  <dmalcolm@redhat.com>
+
+       This is the automated part of the conversion of passes from C
+       structs to C++ classes.
+
+       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.
+
 2013-08-05  David Malcolm  <dmalcolm@redhat.com>
 
        * passes.c (pass_manager::operator new): New.
index ecc5905082aa71d5058d83c78de8901188dea08d..78321b0ed39c33f54cd2986a619b95549b5c8844 100644 (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"
index 6119bb6e75745aeb1b874f3c2cc61e95090de68b..0d92b1d79b502467c10e537e6cd0b467c7e9b289 100644 (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);
+}
index 2cbeb6ae9f3c027d44743fb335d28990dfdee694..526ede632d4820394fb751fd57db0e65a09b2d35 100644 (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);
+}
index 9ca1bd98dcd64e2f2c5d70595a156dbc3f770f26..b53435680ec4c1a877d6e8f21605b3b407a954a2 100644 (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);
+}
index 99e0baa756ed5302f45febfd6ba9585976bf0771..f4f58cb588d8b5b1e7dc89660ce5ee322cdf09dd 100644 (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);
+}
 \f
 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);
+}
index c18727312407f4795e63031056aabe6516c55a78..a7d9170779c68b0500498a03720fd3fa0ab5a40e 100644 (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);
+}
index 36438b8409b273ba239d18e87d5c1ff823d94cf7..610fccc46dd79070ffec6d43a9e5706ebc625d84 100644 (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);
+}
 \f
 
 /* Link the basic blocks in the correct order, compacting the basic
index fb1515d603707e5bd9b733a376cf51507b3f537e..a7872dea9e163eafb90a31288b31465f8c9394ab 100644 (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);
+}
index 7392b92b3f5fec76bd0c70fdabb2330d2fbdc8d2..be47665ebc0782c94e9ba0767966f8d814818684 100644 (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);
+}
index 754cd341f45cb6f35bb4ea3da951e9766c7d3aa3..d0aae69f2698cb0c20768d0223ed9b81546bd968 100644 (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);
+}
index 367cd8ea8dce713e6684eff28ca2508ac70b9d71..e907376c577fbc4ea1521333260884eb4f0151c9 100644 (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);
+}
index bd84b5c793f3c84d7ec923ac15da889ab73463ee..f16ab85dde93d19dff620339fbf544a3f4a5df86 100644 (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.  */
index 6652963680111eeefeed486f54ada956ac86c2f9..8e278583215b18794bc700ea56022fda98a4d450 100644 (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);
+}
index 729a0ffc9b712cc0d78183191c33d6d7a2d93446..b43b4d953cdf8579a3fa6cdf70b24a0f71c667c1 100644 (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);
+}
index cce3c9c80e850d440079360f791e24d30bdcbba8..a85a13cd7c004d1ef141fe1dcb6e257cb66c3deb 100644 (file)
@@ -2602,27 +2602,44 @@ rest_of_handle_insert_vzeroupper (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_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 */
- }
+namespace {
+
+const pass_data pass_data_insert_vzeroupper =
+{
+  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
index 46e1d2d7c210d1a8bc3e387ef04a89234c8b1274..05ba003b7bdfd99eaff0944ce7373b56d7d60513 100644 (file)
@@ -16337,26 +16337,43 @@ mips_machine_reorg2 (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_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 */
- }
+namespace {
+
+const pass_data pass_data_mips_machine_reorg2 =
+{
+  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 */
index 87cfacaa72cd2d98c38d53ce611d61b7f5f54bbb..66c33f7212d453795ea47dda23b291c8ad4294de 100644 (file)
@@ -1000,26 +1000,44 @@ sparc_do_work_around_errata (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_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 */
- }
+namespace {
+
+const pass_data pass_data_work_around_errata =
+{
+  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 */
index 6a6b5f1fd10b108060626be41d192006d9242e4a..3518fd839ceea3d7d4b22ffe7fcd009cda1aeb84 100644 (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);
+}
index 31a1cd03f6642352744841b6a8cd077e51f10850..ee1b7be1170e7141b6fb9fe8ae4f38b445e9184f 100644 (file)
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -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);
+}
index 64ed81e35e86503192e9cbeaebb4c23074c6b5ed..fa22316b5cc8f9e8bd8959cc3d8dadbf7b1fa0ff 100644 (file)
--- a/gcc/dce.c
+++ b/gcc/dce.c
@@ -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);
+}
index d0e316c5c0f5f6db5e05adb7b9dddd389a3cd722..95df1c1b05697ddee36deddbf01be0b870126232 100644 (file)
@@ -746,26 +746,44 @@ gate_opt (void)
 }
 
 
-struct rtl_opt_pass pass_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 */
- }
+namespace {
+
+const pass_data pass_data_df_initialize_opt =
+{
+  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 =
-{
- {
-  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 */
- }
+namespace {
+
+const pass_data pass_data_df_initialize_no_opt =
+{
+  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 =
-{
- {
-  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 */
- }
+namespace {
+
+const pass_data pass_data_df_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);
+}
+
 
 
 
index d643cb0b4fa8508b1ef19058d17a37de000f9c06..8b132eb2c91031c83dd2cb031a74b20247bf0000 100644 (file)
--- a/gcc/dse.c
+++ b/gcc/dse.c
@@ -3729,42 +3729,78 @@ gate_dse2 (void)
     && dbg_cnt (dse2);
 }
 
-struct rtl_opt_pass pass_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 */
- }
+namespace {
+
+const pass_data pass_data_rtl_dse1 =
+{
+  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 =
-{
- {
-  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 */
- }
+class pass_rtl_dse1 : public rtl_opt_pass
+{
+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);
+}
index 29779d6ad6a731ee1b0ac8df531c7a10c1271d82..ee8d42c9b2842f2e1f8594fbb57c341035f1554c 100644 (file)
@@ -3370,24 +3370,42 @@ gate_dwarf2_frame (void)
   return dwarf2out_do_frame ();
 }
 
-struct rtl_opt_pass pass_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 */
- }
+namespace {
+
+const pass_data pass_data_dwarf2_frame =
+{
+  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"
index b25207b4c87e5f64150c156d7e0c36ac3273d47d..2d41d7b332dee0e901a86bce9b741d59c0609064 100644 (file)
@@ -2001,26 +2001,43 @@ set_nothrow_function_flags (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_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 */
- }
+namespace {
+
+const pass_data pass_data_set_nothrow_function_flags =
+{
+  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);
+}
+
 \f
 /* 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 =
-{
- {
-  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 */
- }
+namespace {
+
+const pass_data pass_data_convert_to_eh_region_ranges =
+{
+  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);
+}
 \f
 static void
 push_uleb128 (vec<uchar, va_gc> **data_area, unsigned int value)
index d9b4408aadf6d2c5bf9419ba0dc0749c534abd47..b755957bebd2526a282d7cdea10c64819442dec6 100644 (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);
+}
+
 \f
 /* 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);
+}
index 953fd48b2ad21e10e81f6e93c86a121ef08a9002..4685cb02727344d2cb11a0751d5f3461428ec741 100644 (file)
@@ -1948,26 +1948,43 @@ instantiate_virtual_regs (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_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 */
- }
+namespace {
+
+const pass_data pass_data_instantiate_virtual_regs =
+{
+  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);
+}
+
 \f
 /* 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 =
-{
- {
-  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 */
- }
+namespace {
+
+const pass_data pass_data_leaf_regs =
+{
+  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 =
-{
- {
-  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 */
- }
+namespace {
+
+const pass_data pass_data_thread_prologue_and_epilogue =
+{
+  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);
+}
 \f
 
 /* 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 =
-{
- {
-  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 */
- }
+namespace {
+
+const pass_data pass_data_match_asm_constraints =
+{
+  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"
index 17cc62aa2e4e2cfcfd1dc0135ef20722301b12dd..8fe02ac2a4338dc978f132cf1364a574054dff46 100644 (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);
+}
index ec80e8bde4782b3e9fa5d4465334d4f0920ae7ad..422d6f060eb0b0a394418665e8f8765b4837b10b 100644 (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
+{
+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,
-  "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 */
- }
+  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"
index 64cc031785d3722246252eb4d80b98319b6d6d3a..2884b6ff6fb9c2c7576611901f2abbfd47b4c347 100644 (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
index 4a0d631722aee67dc3616fe670a327f9ab0ca79f..c6f305c35eaaf563263559dc798264bd91db750c 100644 (file)
@@ -3478,22 +3478,40 @@ gate_strength_reduction (void)
   return flag_tree_slsr;
 }
 
-struct gimple_opt_pass pass_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 */
- }
+namespace {
+
+const pass_data pass_data_strength_reduction =
+{
+  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);
+}
index b149d54c793bcb7b2e765c193982ccf715cd287a..5698b4f5e7242a63449b5fcd1444a7673aefa015 100644 (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);
+}
index 270d39b16285959841cde07b8110d0f032d0cf67..ddb0b3792bae06cc09d233dfcef3b5b57e25b87f 100644 (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);
+}
index b463a62f72a13ec1d07860a94a8451071ddb4848..688209dd49c08c4337ff164274d35a8f047f0e61 100644 (file)
@@ -3652,32 +3652,51 @@ cgraph_gate_cp (void)
   return flag_ipa_cp && optimize;
 }
 
-struct ipa_opt_pass_d pass_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 */
+namespace {
+
+const pass_data pass_data_ipa_cp =
+{
+  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);
+}
index 518d3b99ba9bfc7ffef50108cb8d72915855583b..2f30797443a39a35c81a6a697352870e603d55e4 100644 (file)
@@ -2715,26 +2715,46 @@ compute_inline_parameters_for_current (void)
   return 0;
 }
 
-struct gimple_opt_pass pass_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 */
-  }
+namespace {
+
+const pass_data pass_data_inline_parameters =
+{
+  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.  */
index 6eede0d35fc150a37b0d3c95298fcf8848e251b6..96cbc9a0133f2d8f93857f8660696e3d026df3eb 100644 (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);
+}
index b00ae2374a3a6c460fb0aa16bdcddc7b849d1667..7a293657114b6defa209f4bf3c1dc0f85df1fd52 100644 (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);
+}
index 9c56b7f55180a531622f91e28b23ac3a3866478c..3742474ed65f536dac6ca425def9fc1d7fbf0296 100644 (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);
+}
index e786478981e43731ed4489a00870b3e94dbefae5..c83c4d04dbfa5c8c74edb303de9ecbf6482a24f2 100644 (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);
+}
index aa6485c87a6eb71addfc8cae85b8da0e0e585c36..01e9bee2e28e7ac6b286083b5c559beb20a9e831 100644 (file)
--- a/gcc/ipa.c
+++ b/gcc/ipa.c
@@ -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);
+}
index ee0c5e80d9919e25045367137a178e6351dcb9d5..487746ee6375ed6d355b43df2426da35b85a2379 100644 (file)
--- a/gcc/ira.c
+++ b/gcc/ira.c
@@ -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);
+}
index 4fb1e6e6befebaae8f17ddf7a177dcf63069d557..6f7bcb72d1c45d8336e8a5fda23a12e719a88c89 100644 (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);
+}
+
 \f
 /* Initialize LABEL_NUSES and JUMP_LABEL fields, add REG_LABEL_TARGET
    for remaining targets for JUMP_P.  Delete any REG_LABEL_OPERAND
index 65f9c6c9d4a1fd9915bdd3cc36956a017898afef..80c31ef70cd6ccb708a6d429b95deddb656e031a 100644 (file)
@@ -316,26 +316,43 @@ gate_handle_loop2 (void)
     } 
 }
 
-struct rtl_opt_pass pass_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 */
- }
+namespace {
+
+const pass_data pass_data_loop2 =
+{
+  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);
+}
+
 \f
 /* 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 =
-{
- {
-  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 */
- }
+namespace {
+
+const pass_data pass_data_rtl_loop_init =
+{
+  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);
+}
+
 \f
 /* Finalization of the RTL loop passes.  */
 
@@ -394,27 +428,43 @@ rtl_loop_done (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_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 */
- }
+namespace {
+
+const pass_data pass_data_rtl_loop_done =
+{
+  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);
+}
+
 \f
 /* 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 =
-{
- {
-  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 */
- }
+namespace {
+
+const pass_data pass_data_rtl_move_loop_invariants =
+{
+  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);
+}
+
 \f
 /* Loop unswitching for RTL.  */
 static bool
@@ -468,26 +536,44 @@ rtl_unswitch (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_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 */
- }
+namespace {
+
+const pass_data pass_data_rtl_unswitch =
+{
+  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);
+}
+
 \f
 /* 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 =
-{
- {
-  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 */
- }
+namespace {
+
+const pass_data pass_data_rtl_unroll_and_peel_loops =
+{
+  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);
+}
+
 \f
 /* The doloop optimization.  */
 static bool
@@ -559,22 +663,40 @@ rtl_doloop (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_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 */
- }
+namespace {
+
+const pass_data pass_data_rtl_doloop =
+{
+  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);
+}
index eb22d8c87f577dacac2b52715bd0f911755b7b39..ac67398a2db73260a7114e6802c82e6f34bc71c5 100644 (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
+{
+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,
-  "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 */
- }
+  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);
+}
index ab7a89968612685f48756a633f5eaa465e74e901..5649bd8443e6f386c9b974fad8708e269a894ebf 100644 (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);
+}
index 0d112b19074989f966c457430ede23e7607e2467..c941eb11672dec619845814bc719c5092d213e0b 100644 (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);
+}
index 1e9b16c6fcb230689c190c7931f489d91077a079..0df5fb61a2554055f6807338720523d0a0939fce 100644 (file)
@@ -3351,24 +3351,41 @@ rest_of_handle_sms (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_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 */
- }
+namespace {
+
+const pass_data pass_data_sms =
+{
+  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);
+}
index e07c21a4e6c15b21198c0371ec1d9e1b0045c13b..e5eaddb51fc084103f5e1e5fcda15be070532b1d 100644 (file)
@@ -6018,25 +6018,43 @@ gate_expand_omp (void)
   return (flag_openmp != 0 && !seen_error ());
 }
 
-struct gimple_opt_pass pass_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 */
- }
+namespace {
+
+const pass_data pass_data_expand_omp =
+{
+  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);
+}
 \f
 /* 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 =
-{
- {
-  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 */
- }
+namespace {
+
+const pass_data pass_data_lower_omp =
+{
+  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);
+}
 \f
 /* 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 =
-{
-  {
-    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 */
-  }
+namespace {
+
+const pass_data pass_data_diagnose_omp_blocks =
+{
+  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"
index 8efce30b6e6ebf59b22b884ceb763471b4c4dcd9..fd82c4ccb772fd4eed6718c8b37ea342abcd1e6b 100644 (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 =
-{
- {
-  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 */
- }
+namespace {
+
+const pass_data pass_data_early_local_passes =
+{
+  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 =
-{
- {
-  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 */
- }
+namespace {
+
+const pass_data pass_data_all_early_optimizations =
+{
+  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 =
-{
- {
-  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 */
- }
+namespace {
+
+const pass_data pass_data_all_optimizations =
+{
+  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 =
-{
- {
-  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 */
- }
+namespace {
+
+const pass_data pass_data_all_optimizations_g =
+{
+  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 =
-{
- {
-  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 */
- }
+namespace {
+
+const pass_data pass_data_rest_of_compilation =
+{
+  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 =
-{
- {
-  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 */
- }
+namespace {
+
+const pass_data pass_data_postreload =
+{
+  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
index aeffc14435eda175aac26a2b225abcdc0da66fed..0f3ed7acda65eaed4fd437ae856b9e75a990604b 100644 (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);
+}
index f340503f69c23765d2c8d0b23e5fb4f82726f67a..97d7e5d03325a4a7268a5cb8ea3b8d6710a2d973 100644 (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);
+}
index 9a15c87dac9f2f83a21a73f6e8bc901b39175a10..ec7933826580644cf7d67784c6e115a99d257d1b 100644 (file)
@@ -2900,46 +2900,82 @@ predictor_name (enum br_predictor predictor)
   return predictor_info[predictor].name;
 }
 
-struct gimple_opt_pass pass_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 */
- }
+namespace {
+
+const pass_data pass_data_profile =
+{
+  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 =
-{
- {
-  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 */
- }
+class pass_profile : public gimple_opt_pass
+{
+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
index aa026a27d59938e8d64098b0998be64ecd6e9b48..352fbac896dc39afc4cbf4e40036e843a4867663 100644 (file)
@@ -3778,27 +3778,44 @@ rest_of_handle_peephole2 (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_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 */
- }
+namespace {
+
+const pass_data pass_data_peephole2 =
+{
+  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 =
-{
- {
-  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 */
- }
+namespace {
+
+const pass_data pass_data_split_all_insns =
+{
+  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 =
-{
- {
-  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 */
- }
+namespace {
+
+const pass_data pass_data_split_after_reload =
+{
+  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 =
-{
- {
-  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 */
- }
+namespace {
+
+const pass_data pass_data_split_before_regstack =
+{
+  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 =
-{
- {
-  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 */
- }
+namespace {
+
+const pass_data pass_data_split_before_sched2 =
+{
+  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 =
-{
- {
-  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 */
- }
+namespace {
+
+const pass_data pass_data_split_for_shorten_branches =
+{
+  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);
+}
index c0d43c8f72aec5fc677bb4985a5df0c19bc6453e..4dab6e9199592ce6071740d692a00eaab5fd41d7 100644 (file)
--- a/gcc/ree.c
+++ b/gcc/ree.c
@@ -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);
+}
index 2dd9289d1181b1d35161b203ba098e7e294acd57..b3574e66d1736380209c72891c8efbbb66d45dc5 100644 (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);
+}
index 896902f30121d8ca2d1ed48bbe0adc62326b95d2..19f3349517075dc3df4fbe3c8477515789088ef5 100644 (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);
+}
index 0153cd9d8ece0ebe9b9fc77cfcafe8236994ad27..1fb6b5d226b3f75bfadc1ef33fc762666a69ea1d 100644 (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);
+}
+
 \f
 
 /* Set up preferred, alternate, and allocno classes for REGNO as
index 1ce8a7ed285e10c09faa01262115cd595d2f9b5a..da7fac9844eb457ab7830685a21a3a6656baa1ee 100644 (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);
+}
index 20e2ae9f7926ca29a96c993ab4ec51b4d707b28a..6830bd8389a0a2b69223e52fd5ad80b65f89d0b8 100644 (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);
+}
index e601818a0d050053eac3f0e081c713c91b0a3964..78804088a43f34f1e486af1de8755fc19a0965ee 100644 (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);
+}
index 2c971e2a99939bb902dc053cd51926ddc98ab203..e1a2dce16a2b337b5de8462357dfe136a9e22459 100644 (file)
@@ -3617,44 +3617,80 @@ rest_of_handle_sched2 (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_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 */
- }
+namespace {
+
+const pass_data pass_data_sched =
+{
+  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 =
-{
- {
-  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 */
- }
+class pass_sched : public rtl_opt_pass
+{
+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);
+}
index 739bcfc3ac518982f8b92f52d24883311fce2b75..737a07f57274c15a6738c3702f111f0fb4556932 100644 (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);
+}
index df7567074085855c0d2bf89ca79f209d1e96f6b6..e0b58477d4cd82254da687b1d13a4b0f91d88261 100644 (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);
+}
index 387006e2e3d7a3d78f6c9030c71fa9ed405dd7f0..757c9f274248416c962c79c535e7e2010b3341d1 100644 (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
index ab69c14294e24a682089011a8591398071b94428..e197d667251f51af14cb1bfc5cd3c57318af8d03 100644 (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.  */
index 3e0b38ec3413cf8d20085965f6cec2deaee3ed6a..7235089c7d31a7f53b3252fd0ba19d5eb21f7d8b 100644 (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.
 
index 31dfe69b1fbe9b915522a2fab7a3f90cfa3144a0..2d996da1235f131cbcf00b14c376102c00b628d0 100644 (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)
index 3e0b38ec3413cf8d20085965f6cec2deaee3ed6a..7235089c7d31a7f53b3252fd0ba19d5eb21f7d8b 100644 (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.
 
index 975cadb9285a27e639538a54beb686b89aecf332..0139669aa16efdab4e05b640c889216ad562614e 100644 (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);
+}
index 5b07e7185bf5c42dedbbafdb4fac8784d3dc5f3a..220ded277b53e986ef5484ca6693f0d533f3865f 100644 (file)
@@ -801,25 +801,43 @@ diagnose_tm_blocks (void)
   return 0;
 }
 
-struct gimple_opt_pass pass_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 */
-  }
+namespace {
+
+const pass_data pass_data_diagnose_tm_blocks =
+{
+  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);
+}
 \f
 /* 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 =
-{
- {
-  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 */
- }
+namespace {
+
+const pass_data pass_data_lower_tm =
+{
+  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);
+}
 \f
 /* Collect region information for each transaction.  */
 
@@ -1968,25 +2004,42 @@ gate_tm_init (void)
   return true;
 }
 
-struct gimple_opt_pass pass_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 */
- }
+namespace {
+
+const pass_data pass_data_tm_init =
+{
+  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);
+}
 \f
 /* 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 =
-{
- {
-  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 */
- }
+namespace {
+
+const pass_data pass_data_tm_mark =
+{
+  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);
+}
 \f
 
 /* 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 =
-{
- {
-  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 */
- }
+namespace {
+
+const pass_data pass_data_tm_edges =
+{
+  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);
+}
 \f
 /* 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 =
-{
- {
-  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 */
- }
+namespace {
+
+const pass_data pass_data_tm_memopt =
+{
+  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);
+}
+
 \f
 /* 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 =
-{
- {
-  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 */
- },
+namespace {
+
+const pass_data pass_data_ipa_tm =
+{
+  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"
index 9b6186e33934e185fb0293fe204c2b1aaa25ed54..8edcad93b8b34a210e768ae4159bf144917adfe5 100644 (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);
+}
index 4b91a35f17d46a3530b5c2549250d033429f7543..af8685c7a753f0573a68bce4ea98d92be60eed04 100644 (file)
@@ -253,26 +253,43 @@ execute_build_cfg (void)
   return 0;
 }
 
-struct gimple_opt_pass pass_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 */
- }
+namespace {
+
+const pass_data pass_data_build_cfg =
+{
+  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 =
-{
- {
-  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 */
- }
+namespace {
+
+const pass_data pass_data_split_crit_edges =
+{
+  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 =
-{
- {
-  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 */
- }
+namespace {
+
+const pass_data pass_data_warn_function_return =
+{
+  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 =
-{
- {
-  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 */
- }
+namespace {
+
+const pass_data pass_data_warn_function_noreturn =
+{
+  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 =
-{
-  {
-    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 */
-  }
+namespace {
+
+const pass_data pass_data_warn_unused_result =
+{
+  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.  */
 
index 9b314f73ea62bbd006059d063e3d908a9499f4c3..8917f855705dc43802000702185af8bf816d8c9a 100644 (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);
+}
index 5caba01cde41979648f73cc4e0b896dcf6c62415..225728fdaeb73517d6a68d3886284494a5780b67 100644 (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);
+}
+
 \f
 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);
+}
index 0850bd53cf114aa86ed87e1c96847b427c0bd627..6ffbd26671117f6ff947019d6311e3f9868b3d49 100644 (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);
+}
 \f
 /* 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);
+}
 \f
 /* 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);
+}
 \f
 /* 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);
+}
 \f
 /* Verify that BB containing STMT as the last statement, has precisely the
    edge that make_eh_edges would create.  */
index 6329fdd50154556e0d37618efddac112f8e8b0c1..ed8edc3569c27e59398cf07bfe41f0f9184a783f 100644 (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);
+}
index 0ebb8c36cea7e833cf621bfa307a82f521bc3c56..a886169ed00586fb5c89cc3183851a77afcacbfd 100644 (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);
+}
index 4c630a3130ee1bde71b59819717a91221004456d..33d4ba8c623593e223489ccde34918cbe6c956d3 100644 (file)
@@ -2410,27 +2410,43 @@ rewrite_into_ssa (void)
 }
 
 
-struct gimple_opt_pass pass_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 */
- }
+namespace {
+
+const pass_data pass_data_build_ssa =
+{
+  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.  */
index 13b78cc37d2f713c4d219d158d103f938e30c5e0..2317edcc7a391688d410d923a055954f209c6e1d 100644 (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);
+}
index 7f24cbf5e4072f1eb9155193821f4102af84476b..adf2f7bd7d27870ea5006ba7ef431149206081a4 100644 (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
+{
+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,
-  "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 */
- }
+  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"
index 657c82dad532438ddae9c92a438213579922122f..6659f05f5b1002d63b5cb5d0a8591ecdada2f7ae 100644 (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
+{
+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,
-  "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 */
- }
+  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.
index 51bc7cd90cd3edd4cf7bba8895f11bb99df0132a..2acb2ebaa343aabe8477a09a690c9b952b8e4f8f 100644 (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);
+}
index 16345713505811da7070a5ef086b0317e9f7b2d2..1a52a416a632db2ee08e9d1db07b6990322b11a5 100644 (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);
+}
index 0948d2e6977984c4c4b51d047901c63a4d2d9b2b..9c99ec23a2e7bd623d0f498bdbdb1f18d73a291c 100644 (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);
+}
index 41f7d176c40ee60a981e392ea7a85ff034615cda..41d5d92c8a9bad6083fb6145bac66f430138fe84 100644 (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 struct simple_ipa_opt_pass pass_early_local_passes;
-
-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 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 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 struct rtl_opt_pass pass_into_cfg_layout_mode;
-extern struct rtl_opt_pass pass_outof_cfg_layout_mode;
-
-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 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 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 simple_ipa_opt_pass *make_pass_early_local_passes (gcc::context *ctxt);
+
+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 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 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 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 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 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;
index 9985b40a2a87206691f7a7687c3c56a4b543c261..e276a592b2f3bb99bb1bcec6e359cebf561cf6ac 100644 (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"
index 7e950aeecdf2d2a36b966ae1f8c129cab34ab0d4..2bce84843b9a4d1a567bfb8a1a7f7b3b628749ec 100644 (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
+{
+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,
-  "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 */
- }
+  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);
+}
index 1bc4c2fb7b5d7b223977b87d8bcf1917ad5d09fa..6472f484e3349eca8a6744c51e763703d1e4ef5b 100644 (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);
+}
index 625f46e19429e32383c75dfebc8c0e6af0d49554..75ab54aeda6e426577b8923b83ccfc69738d3577 100644 (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);
+}
index 6f49b7ecf5a304df7d32a34d33a726967d390fe9..990598ef29ba8e4a2c73d4a18d29cf5569bf319f 100644 (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);
+}
index fd1bc69be56b0afec655372a550dc16d80a5bfad..4fd3cd8ad246db0747a3d673ce28d28d39d91880 100644 (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
+{
+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,
-  "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 */
- }
+  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);
+}
index 83ca27a0bf4ada27078c8cd0473b14859bbf6501..691e6f905a221cf42f3854e9e23f9ff067a042d0 100644 (file)
@@ -919,29 +919,47 @@ gate_dominator (void)
   return flag_tree_dom != 0;
 }
 
-struct gimple_opt_pass pass_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
+namespace {
+
+const pass_data pass_data_dominator =
+{
+  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 =
-{
- {
-  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
+namespace {
+
+const pass_data pass_data_phi_only_cprop =
+{
+  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);
+}
index 39f47abd83be37df4114e767d050b2491a1899ad..65787582a28394b1d4a6fb7e86240961ee7fd6aa 100644 (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);
+}
index df192952a1d75649554a4d77df63c87b485efdfc..c3e0fac07759e1951de5cc78b97e16cc1ceb7a7d 100644 (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);
+}
index 9598eb81a45481c1d14faa1e3e0852273cfa996c..984a7634ef6dd74021e3201544895ffcb75e6989 100644 (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);
+}
index ff17c7e78fbf1599038d3769155f7d5124622773..f500761c9c214cd674c9d1d083ed22a9700571f6 100644 (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);
+}
index 99e27a1359a6077249fd9166b1fad01c14645319..717f54ee93286c04d979cbd865d2a2fb7b6a2b58 100644 (file)
@@ -41,26 +41,43 @@ gate_tree_loop (void)
   return flag_tree_loop_optimize != 0;
 }
 
-struct gimple_opt_pass pass_tree_loop =
-{
- {
-  GIMPLE_PASS,
-  "loop",                              /* name */
-  OPTGROUP_LOOP,                        /* optinfo_flags */
-  gate_tree_loop,                      /* gate */
-  NULL,                                        /* execute */
-  NULL,                                        /* sub */
-  NULL,                                        /* next */
-  0,                                   /* static_pass_number */
-  TV_TREE_LOOP,                                /* tv_id */
-  PROP_cfg,                            /* properties_required */
-  0,                                   /* properties_provided */
-  0,                                   /* properties_destroyed */
-  0,                                   /* todo_flags_start */
-  TODO_verify_ssa                      /* todo_flags_finish */
- }
+namespace {
+
+const pass_data pass_data_tree_loop =
+{
+  GIMPLE_PASS, /* type */
+  "loop", /* name */
+  OPTGROUP_LOOP, /* optinfo_flags */
+  true, /* has_gate */
+  false, /* has_execute */
+  TV_TREE_LOOP, /* tv_id */
+  PROP_cfg, /* properties_required */
+  0, /* properties_provided */
+  0, /* properties_destroyed */
+  0, /* todo_flags_start */
+  TODO_verify_ssa, /* todo_flags_finish */
 };
 
+class pass_tree_loop : public gimple_opt_pass
+{
+public:
+  pass_tree_loop(gcc::context *ctxt)
+    : gimple_opt_pass(pass_data_tree_loop, ctxt)
+  {}
+
+  /* opt_pass methods: */
+  bool gate () { return gate_tree_loop (); }
+
+}; // class pass_tree_loop
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_tree_loop (gcc::context *ctxt)
+{
+  return new pass_tree_loop (ctxt);
+}
+
 /* Loop optimizer initialization.  */
 
 static unsigned int
@@ -80,26 +97,43 @@ tree_ssa_loop_init (void)
   return 0;
 }
 
-struct gimple_opt_pass pass_tree_loop_init =
-{
- {
-  GIMPLE_PASS,
-  "loopinit",                          /* name */
-  OPTGROUP_LOOP,                        /* optinfo_flags */
-  NULL,                                        /* gate */
-  tree_ssa_loop_init,                  /* 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 */
- }
+namespace {
+
+const pass_data pass_data_tree_loop_init =
+{
+  GIMPLE_PASS, /* type */
+  "loopinit", /* name */
+  OPTGROUP_LOOP, /* 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_tree_loop_init : public gimple_opt_pass
+{
+public:
+  pass_tree_loop_init(gcc::context *ctxt)
+    : gimple_opt_pass(pass_data_tree_loop_init, ctxt)
+  {}
+
+  /* opt_pass methods: */
+  unsigned int execute () { return tree_ssa_loop_init (); }
+
+}; // class pass_tree_loop_init
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_tree_loop_init (gcc::context *ctxt)
+{
+  return new pass_tree_loop_init (ctxt);
+}
+
 /* Loop invariant motion pass.  */
 
 static unsigned int
@@ -117,26 +151,45 @@ gate_tree_ssa_loop_im (void)
   return flag_tree_loop_im != 0;
 }
 
-struct gimple_opt_pass pass_lim =
-{
- {
-  GIMPLE_PASS,
-  "lim",                               /* name */
-  OPTGROUP_LOOP,                        /* optinfo_flags */
-  gate_tree_ssa_loop_im,               /* gate */
-  tree_ssa_loop_im,                    /* execute */
-  NULL,                                        /* sub */
-  NULL,                                        /* next */
-  0,                                   /* static_pass_number */
-  TV_LIM,                              /* tv_id */
-  PROP_cfg,                            /* properties_required */
-  0,                                   /* properties_provided */
-  0,                                   /* properties_destroyed */
-  0,                                   /* todo_flags_start */
-  0                                    /* todo_flags_finish */
- }
+namespace {
+
+const pass_data pass_data_lim =
+{
+  GIMPLE_PASS, /* type */
+  "lim", /* name */
+  OPTGROUP_LOOP, /* optinfo_flags */
+  true, /* has_gate */
+  true, /* has_execute */
+  TV_LIM, /* tv_id */
+  PROP_cfg, /* properties_required */
+  0, /* properties_provided */
+  0, /* properties_destroyed */
+  0, /* todo_flags_start */
+  0, /* todo_flags_finish */
 };
 
+class pass_lim : public gimple_opt_pass
+{
+public:
+  pass_lim(gcc::context *ctxt)
+    : gimple_opt_pass(pass_data_lim, ctxt)
+  {}
+
+  /* opt_pass methods: */
+  opt_pass * clone () { return new pass_lim (ctxt_); }
+  bool gate () { return gate_tree_ssa_loop_im (); }
+  unsigned int execute () { return tree_ssa_loop_im (); }
+
+}; // class pass_lim
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_lim (gcc::context *ctxt)
+{
+  return new pass_lim (ctxt);
+}
+
 /* Loop unswitching pass.  */
 
 static unsigned int
@@ -154,26 +207,44 @@ gate_tree_ssa_loop_unswitch (void)
   return flag_unswitch_loops != 0;
 }
 
-struct gimple_opt_pass pass_tree_unswitch =
-{
- {
-  GIMPLE_PASS,
-  "unswitch",                          /* name */
-  OPTGROUP_LOOP,                        /* optinfo_flags */
-  gate_tree_ssa_loop_unswitch,         /* gate */
-  tree_ssa_loop_unswitch,              /* execute */
-  NULL,                                        /* sub */
-  NULL,                                        /* next */
-  0,                                   /* static_pass_number */
-  TV_TREE_LOOP_UNSWITCH,               /* tv_id */
-  PROP_cfg,                            /* properties_required */
-  0,                                   /* properties_provided */
-  0,                                   /* properties_destroyed */
-  0,                                   /* todo_flags_start */
-  0                                    /* todo_flags_finish */
- }
+namespace {
+
+const pass_data pass_data_tree_unswitch =
+{
+  GIMPLE_PASS, /* type */
+  "unswitch", /* name */
+  OPTGROUP_LOOP, /* optinfo_flags */
+  true, /* has_gate */
+  true, /* has_execute */
+  TV_TREE_LOOP_UNSWITCH, /* tv_id */
+  PROP_cfg, /* properties_required */
+  0, /* properties_provided */
+  0, /* properties_destroyed */
+  0, /* todo_flags_start */
+  0, /* todo_flags_finish */
 };
 
+class pass_tree_unswitch : public gimple_opt_pass
+{
+public:
+  pass_tree_unswitch(gcc::context *ctxt)
+    : gimple_opt_pass(pass_data_tree_unswitch, ctxt)
+  {}
+
+  /* opt_pass methods: */
+  bool gate () { return gate_tree_ssa_loop_unswitch (); }
+  unsigned int execute () { return tree_ssa_loop_unswitch (); }
+
+}; // class pass_tree_unswitch
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_tree_unswitch (gcc::context *ctxt)
+{
+  return new pass_tree_unswitch (ctxt);
+}
+
 /* Predictive commoning.  */
 
 static unsigned
@@ -191,26 +262,44 @@ gate_tree_predictive_commoning (void)
   return flag_predictive_commoning != 0;
 }
 
-struct gimple_opt_pass pass_predcom =
-{
- {
-  GIMPLE_PASS,
-  "pcom",                              /* name */
-  OPTGROUP_LOOP,                        /* optinfo_flags */
-  gate_tree_predictive_commoning,      /* gate */
-  run_tree_predictive_commoning,       /* execute */
-  NULL,                                        /* sub */
-  NULL,                                        /* next */
-  0,                                   /* static_pass_number */
-  TV_PREDCOM,                          /* tv_id */
-  PROP_cfg,                            /* properties_required */
-  0,                                   /* properties_provided */
-  0,                                   /* properties_destroyed */
-  0,                                   /* todo_flags_start */
-  TODO_update_ssa_only_virtuals        /* todo_flags_finish */
- }
+namespace {
+
+const pass_data pass_data_predcom =
+{
+  GIMPLE_PASS, /* type */
+  "pcom", /* name */
+  OPTGROUP_LOOP, /* optinfo_flags */
+  true, /* has_gate */
+  true, /* has_execute */
+  TV_PREDCOM, /* tv_id */
+  PROP_cfg, /* properties_required */
+  0, /* properties_provided */
+  0, /* properties_destroyed */
+  0, /* todo_flags_start */
+  TODO_update_ssa_only_virtuals, /* todo_flags_finish */
 };
 
+class pass_predcom : public gimple_opt_pass
+{
+public:
+  pass_predcom(gcc::context *ctxt)
+    : gimple_opt_pass(pass_data_predcom, ctxt)
+  {}
+
+  /* opt_pass methods: */
+  bool gate () { return gate_tree_predictive_commoning (); }
+  unsigned int execute () { return run_tree_predictive_commoning (); }
+
+}; // class pass_predcom
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_predcom (gcc::context *ctxt)
+{
+  return new pass_predcom (ctxt);
+}
+
 /* Loop autovectorization.  */
 
 static unsigned int
@@ -228,27 +317,44 @@ gate_tree_vectorize (void)
   return flag_tree_vectorize;
 }
 
-struct gimple_opt_pass pass_vectorize =
-{
- {
-  GIMPLE_PASS,
-  "vect",                               /* name */
-  OPTGROUP_LOOP
-  | OPTGROUP_VEC,                       /* optinfo_flags */
-  gate_tree_vectorize,                  /* gate */
-  tree_vectorize,                       /* execute */
-  NULL,                                 /* sub */
-  NULL,                                 /* next */
-  0,                                    /* static_pass_number */
-  TV_TREE_VECTORIZATION,                /* tv_id */
-  PROP_cfg | PROP_ssa,                  /* properties_required */
-  0,                                    /* properties_provided */
-  0,                                    /* properties_destroyed */
-  0,                                   /* todo_flags_start */
-  0                                    /* todo_flags_finish */
- }
+namespace {
+
+const pass_data pass_data_vectorize =
+{
+  GIMPLE_PASS, /* type */
+  "vect", /* name */
+  OPTGROUP_LOOP | OPTGROUP_VEC, /* optinfo_flags */
+  true, /* has_gate */
+  true, /* has_execute */
+  TV_TREE_VECTORIZATION, /* tv_id */
+  ( PROP_cfg | PROP_ssa ), /* properties_required */
+  0, /* properties_provided */
+  0, /* properties_destroyed */
+  0, /* todo_flags_start */
+  0, /* todo_flags_finish */
 };
 
+class pass_vectorize : public gimple_opt_pass
+{
+public:
+  pass_vectorize(gcc::context *ctxt)
+    : gimple_opt_pass(pass_data_vectorize, ctxt)
+  {}
+
+  /* opt_pass methods: */
+  bool gate () { return gate_tree_vectorize (); }
+  unsigned int execute () { return tree_vectorize (); }
+
+}; // class pass_vectorize
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_vectorize (gcc::context *ctxt)
+{
+  return new pass_vectorize (ctxt);
+}
+
 /* GRAPHITE optimizations.  */
 
 static unsigned int
@@ -278,46 +384,81 @@ gate_graphite_transforms (void)
   return flag_graphite != 0;
 }
 
-struct gimple_opt_pass pass_graphite =
-{
- {
-  GIMPLE_PASS,
-  "graphite0",                         /* name */
-  OPTGROUP_LOOP,                        /* optinfo_flags */
-  gate_graphite_transforms,            /* gate */
-  NULL,                                        /* execute */
-  NULL,                                        /* sub */
-  NULL,                                        /* next */
-  0,                                   /* static_pass_number */
-  TV_GRAPHITE,                         /* tv_id */
-  PROP_cfg | PROP_ssa,                 /* properties_required */
-  0,                                   /* properties_provided */
-  0,                                   /* properties_destroyed */
-  0,                                   /* todo_flags_start */
-  0                                    /* todo_flags_finish */
- }
+namespace {
+
+const pass_data pass_data_graphite =
+{
+  GIMPLE_PASS, /* type */
+  "graphite0", /* name */
+  OPTGROUP_LOOP, /* optinfo_flags */
+  true, /* has_gate */
+  false, /* has_execute */
+  TV_GRAPHITE, /* tv_id */
+  ( PROP_cfg | PROP_ssa ), /* properties_required */
+  0, /* properties_provided */
+  0, /* properties_destroyed */
+  0, /* todo_flags_start */
+  0, /* todo_flags_finish */
 };
 
-struct gimple_opt_pass pass_graphite_transforms =
-{
- {
-  GIMPLE_PASS,
-  "graphite",                          /* name */
-  OPTGROUP_LOOP,                        /* optinfo_flags */
-  gate_graphite_transforms,            /* gate */
-  graphite_transforms,                 /* execute */
-  NULL,                                        /* sub */
-  NULL,                                        /* next */
-  0,                                   /* static_pass_number */
-  TV_GRAPHITE_TRANSFORMS,              /* tv_id */
-  PROP_cfg | PROP_ssa,                 /* properties_required */
-  0,                                   /* properties_provided */
-  0,                                   /* properties_destroyed */
-  0,                                   /* todo_flags_start */
-  0                                    /* todo_flags_finish */
- }
+class pass_graphite : public gimple_opt_pass
+{
+public:
+  pass_graphite(gcc::context *ctxt)
+    : gimple_opt_pass(pass_data_graphite, ctxt)
+  {}
+
+  /* opt_pass methods: */
+  bool gate () { return gate_graphite_transforms (); }
+
+}; // class pass_graphite
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_graphite (gcc::context *ctxt)
+{
+  return new pass_graphite (ctxt);
+}
+
+namespace {
+
+const pass_data pass_data_graphite_transforms =
+{
+  GIMPLE_PASS, /* type */
+  "graphite", /* name */
+  OPTGROUP_LOOP, /* optinfo_flags */
+  true, /* has_gate */
+  true, /* has_execute */
+  TV_GRAPHITE_TRANSFORMS, /* tv_id */
+  ( PROP_cfg | PROP_ssa ), /* properties_required */
+  0, /* properties_provided */
+  0, /* properties_destroyed */
+  0, /* todo_flags_start */
+  0, /* todo_flags_finish */
 };
 
+class pass_graphite_transforms : public gimple_opt_pass
+{
+public:
+  pass_graphite_transforms(gcc::context *ctxt)
+    : gimple_opt_pass(pass_data_graphite_transforms, ctxt)
+  {}
+
+  /* opt_pass methods: */
+  bool gate () { return gate_graphite_transforms (); }
+  unsigned int execute () { return graphite_transforms (); }
+
+}; // class pass_graphite_transforms
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_graphite_transforms (gcc::context *ctxt)
+{
+  return new pass_graphite_transforms (ctxt);
+}
+
 /* Check the correctness of the data dependence analyzers.  */
 
 static unsigned int
@@ -336,26 +477,44 @@ gate_check_data_deps (void)
   return flag_check_data_deps != 0;
 }
 
-struct gimple_opt_pass pass_check_data_deps =
-{
- {
-  GIMPLE_PASS,
-  "ckdd",                              /* name */
-  OPTGROUP_LOOP,                        /* optinfo_flags */
-  gate_check_data_deps,                        /* gate */
-  check_data_deps,                     /* execute */
-  NULL,                                        /* sub */
-  NULL,                                        /* next */
-  0,                                   /* static_pass_number */
-  TV_CHECK_DATA_DEPS,                          /* tv_id */
-  PROP_cfg | PROP_ssa,                 /* properties_required */
-  0,                                   /* properties_provided */
-  0,                                   /* properties_destroyed */
-  0,                                   /* todo_flags_start */
-  0                                    /* todo_flags_finish */
- }
+namespace {
+
+const pass_data pass_data_check_data_deps =
+{
+  GIMPLE_PASS, /* type */
+  "ckdd", /* name */
+  OPTGROUP_LOOP, /* optinfo_flags */
+  true, /* has_gate */
+  true, /* has_execute */
+  TV_CHECK_DATA_DEPS, /* tv_id */
+  ( PROP_cfg | PROP_ssa ), /* properties_required */
+  0, /* properties_provided */
+  0, /* properties_destroyed */
+  0, /* todo_flags_start */
+  0, /* todo_flags_finish */
 };
 
+class pass_check_data_deps : public gimple_opt_pass
+{
+public:
+  pass_check_data_deps(gcc::context *ctxt)
+    : gimple_opt_pass(pass_data_check_data_deps, ctxt)
+  {}
+
+  /* opt_pass methods: */
+  bool gate () { return gate_check_data_deps (); }
+  unsigned int execute () { return check_data_deps (); }
+
+}; // class pass_check_data_deps
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_check_data_deps (gcc::context *ctxt)
+{
+  return new pass_check_data_deps (ctxt);
+}
+
 /* Canonical induction variable creation pass.  */
 
 static unsigned int
@@ -373,26 +532,44 @@ gate_tree_ssa_loop_ivcanon (void)
   return flag_tree_loop_ivcanon != 0;
 }
 
-struct gimple_opt_pass pass_iv_canon =
-{
- {
-  GIMPLE_PASS,
-  "ivcanon",                           /* name */
-  OPTGROUP_LOOP,                        /* optinfo_flags */
-  gate_tree_ssa_loop_ivcanon,          /* gate */
-  tree_ssa_loop_ivcanon,               /* execute */
-  NULL,                                        /* sub */
-  NULL,                                        /* next */
-  0,                                   /* static_pass_number */
-  TV_TREE_LOOP_IVCANON,                        /* tv_id */
-  PROP_cfg | PROP_ssa,                 /* properties_required */
-  0,                                   /* properties_provided */
-  0,                                   /* properties_destroyed */
-  0,                                   /* todo_flags_start */
-  0                                    /* todo_flags_finish */
- }
+namespace {
+
+const pass_data pass_data_iv_canon =
+{
+  GIMPLE_PASS, /* type */
+  "ivcanon", /* name */
+  OPTGROUP_LOOP, /* optinfo_flags */
+  true, /* has_gate */
+  true, /* has_execute */
+  TV_TREE_LOOP_IVCANON, /* tv_id */
+  ( PROP_cfg | PROP_ssa ), /* properties_required */
+  0, /* properties_provided */
+  0, /* properties_destroyed */
+  0, /* todo_flags_start */
+  0, /* todo_flags_finish */
 };
 
+class pass_iv_canon : public gimple_opt_pass
+{
+public:
+  pass_iv_canon(gcc::context *ctxt)
+    : gimple_opt_pass(pass_data_iv_canon, ctxt)
+  {}
+
+  /* opt_pass methods: */
+  bool gate () { return gate_tree_ssa_loop_ivcanon (); }
+  unsigned int execute () { return tree_ssa_loop_ivcanon (); }
+
+}; // class pass_iv_canon
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_iv_canon (gcc::context *ctxt)
+{
+  return new pass_iv_canon (ctxt);
+}
+
 /* Propagation of constants using scev.  */
 
 static bool
@@ -401,28 +578,45 @@ gate_scev_const_prop (void)
   return flag_tree_scev_cprop;
 }
 
-struct gimple_opt_pass pass_scev_cprop =
-{
- {
-  GIMPLE_PASS,
-  "sccp",                              /* name */
-  OPTGROUP_LOOP,                        /* optinfo_flags */
-  gate_scev_const_prop,                        /* gate */
-  scev_const_prop,                     /* execute */
-  NULL,                                        /* sub */
-  NULL,                                        /* next */
-  0,                                   /* static_pass_number */
-  TV_SCEV_CONST,                       /* tv_id */
-  PROP_cfg | PROP_ssa,                 /* properties_required */
-  0,                                   /* properties_provided */
-  0,                                   /* properties_destroyed */
-  0,                                   /* todo_flags_start */
-  TODO_cleanup_cfg
-    | TODO_update_ssa_only_virtuals
-                                       /* todo_flags_finish */
- }
+namespace {
+
+const pass_data pass_data_scev_cprop =
+{
+  GIMPLE_PASS, /* type */
+  "sccp", /* name */
+  OPTGROUP_LOOP, /* optinfo_flags */
+  true, /* has_gate */
+  true, /* has_execute */
+  TV_SCEV_CONST, /* tv_id */
+  ( PROP_cfg | PROP_ssa ), /* properties_required */
+  0, /* properties_provided */
+  0, /* properties_destroyed */
+  0, /* todo_flags_start */
+  ( TODO_cleanup_cfg
+    | TODO_update_ssa_only_virtuals ), /* todo_flags_finish */
 };
 
+class pass_scev_cprop : public gimple_opt_pass
+{
+public:
+  pass_scev_cprop(gcc::context *ctxt)
+    : gimple_opt_pass(pass_data_scev_cprop, ctxt)
+  {}
+
+  /* opt_pass methods: */
+  bool gate () { return gate_scev_const_prop (); }
+  unsigned int execute () { return scev_const_prop (); }
+
+}; // class pass_scev_cprop
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_scev_cprop (gcc::context *ctxt)
+{
+  return new pass_scev_cprop (ctxt);
+}
+
 /* Record bounds on numbers of iterations of loops.  */
 
 static unsigned int
@@ -436,26 +630,43 @@ tree_ssa_loop_bounds (void)
   return 0;
 }
 
-struct gimple_opt_pass pass_record_bounds =
-{
- {
-  GIMPLE_PASS,
-  "*record_bounds",                    /* name */
-  OPTGROUP_NONE,                        /* optinfo_flags */
-  NULL,                                        /* gate */
-  tree_ssa_loop_bounds,                        /* execute */
-  NULL,                                        /* sub */
-  NULL,                                        /* next */
-  0,                                   /* static_pass_number */
-  TV_TREE_LOOP_BOUNDS,                 /* tv_id */
-  PROP_cfg | PROP_ssa,                 /* properties_required */
-  0,                                   /* properties_provided */
-  0,                                   /* properties_destroyed */
-  0,                                   /* todo_flags_start */
-  0                                    /* todo_flags_finish */
- }
+namespace {
+
+const pass_data pass_data_record_bounds =
+{
+  GIMPLE_PASS, /* type */
+  "*record_bounds", /* name */
+  OPTGROUP_NONE, /* optinfo_flags */
+  false, /* has_gate */
+  true, /* has_execute */
+  TV_TREE_LOOP_BOUNDS, /* tv_id */
+  ( PROP_cfg | PROP_ssa ), /* properties_required */
+  0, /* properties_provided */
+  0, /* properties_destroyed */
+  0, /* todo_flags_start */
+  0, /* todo_flags_finish */
 };
 
+class pass_record_bounds : public gimple_opt_pass
+{
+public:
+  pass_record_bounds(gcc::context *ctxt)
+    : gimple_opt_pass(pass_data_record_bounds, ctxt)
+  {}
+
+  /* opt_pass methods: */
+  unsigned int execute () { return tree_ssa_loop_bounds (); }
+
+}; // class pass_record_bounds
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_record_bounds (gcc::context *ctxt)
+{
+  return new pass_record_bounds (ctxt);
+}
+
 /* Complete unrolling of loops.  */
 
 static unsigned int
@@ -475,26 +686,44 @@ gate_tree_complete_unroll (void)
   return true;
 }
 
-struct gimple_opt_pass pass_complete_unroll =
-{
- {
-  GIMPLE_PASS,
-  "cunroll",                           /* name */
-  OPTGROUP_LOOP,                        /* optinfo_flags */
-  gate_tree_complete_unroll,           /* gate */
-  tree_complete_unroll,                        /* execute */
-  NULL,                                        /* sub */
-  NULL,                                        /* next */
-  0,                                   /* static_pass_number */
-  TV_COMPLETE_UNROLL,                  /* tv_id */
-  PROP_cfg | PROP_ssa,                 /* properties_required */
-  0,                                   /* properties_provided */
-  0,                                   /* properties_destroyed */
-  0,                                   /* todo_flags_start */
-  0                                    /* todo_flags_finish */
- }
+namespace {
+
+const pass_data pass_data_complete_unroll =
+{
+  GIMPLE_PASS, /* type */
+  "cunroll", /* name */
+  OPTGROUP_LOOP, /* optinfo_flags */
+  true, /* has_gate */
+  true, /* has_execute */
+  TV_COMPLETE_UNROLL, /* tv_id */
+  ( PROP_cfg | PROP_ssa ), /* properties_required */
+  0, /* properties_provided */
+  0, /* properties_destroyed */
+  0, /* todo_flags_start */
+  0, /* todo_flags_finish */
 };
 
+class pass_complete_unroll : public gimple_opt_pass
+{
+public:
+  pass_complete_unroll(gcc::context *ctxt)
+    : gimple_opt_pass(pass_data_complete_unroll, ctxt)
+  {}
+
+  /* opt_pass methods: */
+  bool gate () { return gate_tree_complete_unroll (); }
+  unsigned int execute () { return tree_complete_unroll (); }
+
+}; // class pass_complete_unroll
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_complete_unroll (gcc::context *ctxt)
+{
+  return new pass_complete_unroll (ctxt);
+}
+
 /* Complete unrolling of inner loops.  */
 
 static unsigned int
@@ -522,26 +751,44 @@ gate_tree_complete_unroll_inner (void)
   return optimize >= 2;
 }
 
-struct gimple_opt_pass pass_complete_unrolli =
-{
- {
-  GIMPLE_PASS,
-  "cunrolli",                          /* name */
-  OPTGROUP_LOOP,                        /* optinfo_flags */
-  gate_tree_complete_unroll_inner,     /* gate */
-  tree_complete_unroll_inner,          /* execute */
-  NULL,                                        /* sub */
-  NULL,                                        /* next */
-  0,                                   /* static_pass_number */
-  TV_COMPLETE_UNROLL,                  /* tv_id */
-  PROP_cfg | PROP_ssa,                 /* properties_required */
-  0,                                   /* properties_provided */
-  0,                                   /* properties_destroyed */
-  0,                                   /* todo_flags_start */
-  TODO_verify_flow                     /* todo_flags_finish */
- }
+namespace {
+
+const pass_data pass_data_complete_unrolli =
+{
+  GIMPLE_PASS, /* type */
+  "cunrolli", /* name */
+  OPTGROUP_LOOP, /* optinfo_flags */
+  true, /* has_gate */
+  true, /* has_execute */
+  TV_COMPLETE_UNROLL, /* tv_id */
+  ( PROP_cfg | PROP_ssa ), /* properties_required */
+  0, /* properties_provided */
+  0, /* properties_destroyed */
+  0, /* todo_flags_start */
+  TODO_verify_flow, /* todo_flags_finish */
 };
 
+class pass_complete_unrolli : public gimple_opt_pass
+{
+public:
+  pass_complete_unrolli(gcc::context *ctxt)
+    : gimple_opt_pass(pass_data_complete_unrolli, ctxt)
+  {}
+
+  /* opt_pass methods: */
+  bool gate () { return gate_tree_complete_unroll_inner (); }
+  unsigned int execute () { return tree_complete_unroll_inner (); }
+
+}; // class pass_complete_unrolli
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_complete_unrolli (gcc::context *ctxt)
+{
+  return new pass_complete_unrolli (ctxt);
+}
+
 /* Parallelization.  */
 
 static bool
@@ -561,26 +808,44 @@ tree_parallelize_loops (void)
   return 0;
 }
 
-struct gimple_opt_pass pass_parallelize_loops =
-{
- {
-  GIMPLE_PASS,
-  "parloops",                          /* name */
-  OPTGROUP_LOOP,                        /* optinfo_flags */
-  gate_tree_parallelize_loops,         /* gate */
-  tree_parallelize_loops,                      /* execute */
-  NULL,                                        /* sub */
-  NULL,                                        /* next */
-  0,                                   /* static_pass_number */
-  TV_TREE_PARALLELIZE_LOOPS,           /* tv_id */
-  PROP_cfg | PROP_ssa,                 /* properties_required */
-  0,                                   /* properties_provided */
-  0,                                   /* properties_destroyed */
-  0,                                   /* todo_flags_start */
-  TODO_verify_flow                     /* todo_flags_finish */
- }
+namespace {
+
+const pass_data pass_data_parallelize_loops =
+{
+  GIMPLE_PASS, /* type */
+  "parloops", /* name */
+  OPTGROUP_LOOP, /* optinfo_flags */
+  true, /* has_gate */
+  true, /* has_execute */
+  TV_TREE_PARALLELIZE_LOOPS, /* tv_id */
+  ( PROP_cfg | PROP_ssa ), /* properties_required */
+  0, /* properties_provided */
+  0, /* properties_destroyed */
+  0, /* todo_flags_start */
+  TODO_verify_flow, /* todo_flags_finish */
 };
 
+class pass_parallelize_loops : public gimple_opt_pass
+{
+public:
+  pass_parallelize_loops(gcc::context *ctxt)
+    : gimple_opt_pass(pass_data_parallelize_loops, ctxt)
+  {}
+
+  /* opt_pass methods: */
+  bool gate () { return gate_tree_parallelize_loops (); }
+  unsigned int execute () { return tree_parallelize_loops (); }
+
+}; // class pass_parallelize_loops
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_parallelize_loops (gcc::context *ctxt)
+{
+  return new pass_parallelize_loops (ctxt);
+}
+
 /* Prefetching.  */
 
 static unsigned int
@@ -598,26 +863,44 @@ gate_tree_ssa_loop_prefetch (void)
   return flag_prefetch_loop_arrays > 0;
 }
 
-struct gimple_opt_pass pass_loop_prefetch =
-{
- {
-  GIMPLE_PASS,
-  "aprefetch",                         /* name */
-  OPTGROUP_LOOP,                        /* optinfo_flags */
-  gate_tree_ssa_loop_prefetch,         /* gate */
-  tree_ssa_loop_prefetch,              /* execute */
-  NULL,                                        /* sub */
-  NULL,                                        /* next */
-  0,                                   /* static_pass_number */
-  TV_TREE_PREFETCH,                    /* tv_id */
-  PROP_cfg | PROP_ssa,                 /* properties_required */
-  0,                                   /* properties_provided */
-  0,                                   /* properties_destroyed */
-  0,                                   /* todo_flags_start */
-  0                                    /* todo_flags_finish */
- }
+namespace {
+
+const pass_data pass_data_loop_prefetch =
+{
+  GIMPLE_PASS, /* type */
+  "aprefetch", /* name */
+  OPTGROUP_LOOP, /* optinfo_flags */
+  true, /* has_gate */
+  true, /* has_execute */
+  TV_TREE_PREFETCH, /* tv_id */
+  ( PROP_cfg | PROP_ssa ), /* properties_required */
+  0, /* properties_provided */
+  0, /* properties_destroyed */
+  0, /* todo_flags_start */
+  0, /* todo_flags_finish */
 };
 
+class pass_loop_prefetch : public gimple_opt_pass
+{
+public:
+  pass_loop_prefetch(gcc::context *ctxt)
+    : gimple_opt_pass(pass_data_loop_prefetch, ctxt)
+  {}
+
+  /* opt_pass methods: */
+  bool gate () { return gate_tree_ssa_loop_prefetch (); }
+  unsigned int execute () { return tree_ssa_loop_prefetch (); }
+
+}; // class pass_loop_prefetch
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_loop_prefetch (gcc::context *ctxt)
+{
+  return new pass_loop_prefetch (ctxt);
+}
+
 /* Induction variable optimizations.  */
 
 static unsigned int
@@ -636,26 +919,44 @@ gate_tree_ssa_loop_ivopts (void)
   return flag_ivopts != 0;
 }
 
-struct gimple_opt_pass pass_iv_optimize =
-{
- {
-  GIMPLE_PASS,
-  "ivopts",                            /* name */
-  OPTGROUP_LOOP,                        /* optinfo_flags */
-  gate_tree_ssa_loop_ivopts,           /* gate */
-  tree_ssa_loop_ivopts,                        /* execute */
-  NULL,                                        /* sub */
-  NULL,                                        /* next */
-  0,                                   /* static_pass_number */
-  TV_TREE_LOOP_IVOPTS,                 /* tv_id */
-  PROP_cfg | PROP_ssa,                 /* properties_required */
-  0,                                   /* properties_provided */
-  0,                                   /* properties_destroyed */
-  0,                                   /* todo_flags_start */
-  TODO_update_ssa                      /* todo_flags_finish */
- }
+namespace {
+
+const pass_data pass_data_iv_optimize =
+{
+  GIMPLE_PASS, /* type */
+  "ivopts", /* name */
+  OPTGROUP_LOOP, /* optinfo_flags */
+  true, /* has_gate */
+  true, /* has_execute */
+  TV_TREE_LOOP_IVOPTS, /* tv_id */
+  ( PROP_cfg | PROP_ssa ), /* properties_required */
+  0, /* properties_provided */
+  0, /* properties_destroyed */
+  0, /* todo_flags_start */
+  TODO_update_ssa, /* todo_flags_finish */
 };
 
+class pass_iv_optimize : public gimple_opt_pass
+{
+public:
+  pass_iv_optimize(gcc::context *ctxt)
+    : gimple_opt_pass(pass_data_iv_optimize, ctxt)
+  {}
+
+  /* opt_pass methods: */
+  bool gate () { return gate_tree_ssa_loop_ivopts (); }
+  unsigned int execute () { return tree_ssa_loop_ivopts (); }
+
+}; // class pass_iv_optimize
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_iv_optimize (gcc::context *ctxt)
+{
+  return new pass_iv_optimize (ctxt);
+}
+
 /* Loop optimizer finalization.  */
 
 static unsigned int
@@ -667,23 +968,39 @@ tree_ssa_loop_done (void)
   return 0;
 }
 
-struct gimple_opt_pass pass_tree_loop_done =
-{
- {
-  GIMPLE_PASS,
-  "loopdone",                          /* name */
-  OPTGROUP_LOOP,                        /* optinfo_flags */
-  NULL,                                        /* gate */
-  tree_ssa_loop_done,                  /* 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 */
-  TODO_cleanup_cfg
-    | TODO_verify_flow                 /* todo_flags_finish */
- }
+namespace {
+
+const pass_data pass_data_tree_loop_done =
+{
+  GIMPLE_PASS, /* type */
+  "loopdone", /* name */
+  OPTGROUP_LOOP, /* 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 */
+  ( TODO_cleanup_cfg | TODO_verify_flow ), /* todo_flags_finish */
 };
+
+class pass_tree_loop_done : public gimple_opt_pass
+{
+public:
+  pass_tree_loop_done(gcc::context *ctxt)
+    : gimple_opt_pass(pass_data_tree_loop_done, ctxt)
+  {}
+
+  /* opt_pass methods: */
+  unsigned int execute () { return tree_ssa_loop_done (); }
+
+}; // class pass_tree_loop_done
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_tree_loop_done (gcc::context *ctxt)
+{
+  return new pass_tree_loop_done (ctxt);
+}
index e9c32b3c8be28cec47055cfa39d6d4fd1fb63daf..d1691478c4bf0c874a9b52866ad10316a3c4a736 100644 (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);
+}
index 5e99678ac01caba423e2b312b533ea9c41ead449..ddcd040ba7c3e2edf326447f9b439986ed9782a1 100644 (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);
+}
index 96d7ba6a9356d9d147a94d38e125e317aadda463..1257334f51b9d051a84d6614c27ed150cd53984e 100644 (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);
+}
index 642a343afe8f7351c15d718054057747ec75a468..f6928a8c0b3175e923f7a078fde6b8cf78daa04f 100644 (file)
@@ -4786,27 +4786,44 @@ gate_pre (void)
   return flag_tree_pre != 0;
 }
 
-struct gimple_opt_pass pass_pre =
+namespace {
+
+const pass_data pass_data_pre =
 {
- {
-  GIMPLE_PASS,
-  "pre",                               /* name */
-  OPTGROUP_NONE,                        /* optinfo_flags */
-  gate_pre,                            /* gate */
-  do_pre,                              /* execute */
-  NULL,                                        /* sub */
-  NULL,                                        /* next */
-  0,                                   /* static_pass_number */
-  TV_TREE_PRE,                         /* tv_id */
-  PROP_no_crit_edges | PROP_cfg
-    | PROP_ssa,                                /* properties_required */
-  0,                                   /* properties_provided */
-  0,                                   /* properties_destroyed */
-  TODO_rebuild_alias,                  /* todo_flags_start */
-  TODO_verify_ssa                      /* todo_flags_finish */
- }
+  GIMPLE_PASS, /* type */
+  "pre", /* name */
+  OPTGROUP_NONE, /* optinfo_flags */
+  true, /* has_gate */
+  true, /* has_execute */
+  TV_TREE_PRE, /* tv_id */
+  ( PROP_no_crit_edges | PROP_cfg | PROP_ssa ), /* properties_required */
+  0, /* properties_provided */
+  0, /* properties_destroyed */
+  TODO_rebuild_alias, /* todo_flags_start */
+  TODO_verify_ssa, /* todo_flags_finish */
 };
 
+class pass_pre : public gimple_opt_pass
+{
+public:
+  pass_pre(gcc::context *ctxt)
+    : gimple_opt_pass(pass_data_pre, ctxt)
+  {}
+
+  /* opt_pass methods: */
+  bool gate () { return gate_pre (); }
+  unsigned int execute () { return do_pre (); }
+
+}; // class pass_pre
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_pre (gcc::context *ctxt)
+{
+  return new pass_pre (ctxt);
+}
+
 
 /* Gate and execute functions for FRE.  */
 
@@ -4839,22 +4856,41 @@ gate_fre (void)
   return flag_tree_fre != 0;
 }
 
-struct gimple_opt_pass pass_fre =
+namespace {
+
+const pass_data pass_data_fre =
 {
- {
-  GIMPLE_PASS,
-  "fre",                               /* name */
-  OPTGROUP_NONE,                        /* optinfo_flags */
-  gate_fre,                            /* gate */
-  execute_fre,                         /* execute */
-  NULL,                                        /* sub */
-  NULL,                                        /* next */
-  0,                                   /* static_pass_number */
-  TV_TREE_FRE,                         /* 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 */
+  "fre", /* name */
+  OPTGROUP_NONE, /* optinfo_flags */
+  true, /* has_gate */
+  true, /* has_execute */
+  TV_TREE_FRE, /* 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_fre : public gimple_opt_pass
+{
+public:
+  pass_fre(gcc::context *ctxt)
+    : gimple_opt_pass(pass_data_fre, ctxt)
+  {}
+
+  /* opt_pass methods: */
+  opt_pass * clone () { return new pass_fre (ctxt_); }
+  bool gate () { return gate_fre (); }
+  unsigned int execute () { return execute_fre (); }
+
+}; // class pass_fre
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_fre (gcc::context *ctxt)
+{
+  return new pass_fre (ctxt);
+}
index 1a2619d607ce360980198642c3685b6f8fcbff3c..7e1d8c77a3f991e34ea3dcf8b9b7cf52efeccf72 100644 (file)
@@ -4450,24 +4450,43 @@ gate_tree_ssa_reassoc (void)
   return flag_tree_reassoc != 0;
 }
 
-struct gimple_opt_pass pass_reassoc =
+namespace {
+
+const pass_data pass_data_reassoc =
 {
- {
-  GIMPLE_PASS,
-  "reassoc",                           /* name */
-  OPTGROUP_NONE,                        /* optinfo_flags */
-  gate_tree_ssa_reassoc,               /* gate */
-  execute_reassoc,                     /* execute */
-  NULL,                                        /* sub */
-  NULL,                                        /* next */
-  0,                                   /* static_pass_number */
-  TV_TREE_REASSOC,                     /* tv_id */
-  PROP_cfg | PROP_ssa,                 /* properties_required */
-  0,                                   /* properties_provided */
-  0,                                   /* properties_destroyed */
-  0,                                   /* todo_flags_start */
-  TODO_verify_ssa
-  | TODO_update_ssa_only_virtuals
-  | TODO_verify_flow                   /* todo_flags_finish */
- }
+  GIMPLE_PASS, /* type */
+  "reassoc", /* name */
+  OPTGROUP_NONE, /* optinfo_flags */
+  true, /* has_gate */
+  true, /* has_execute */
+  TV_TREE_REASSOC, /* tv_id */
+  ( PROP_cfg | PROP_ssa ), /* properties_required */
+  0, /* properties_provided */
+  0, /* properties_destroyed */
+  0, /* todo_flags_start */
+  ( TODO_verify_ssa
+    | TODO_update_ssa_only_virtuals
+    | TODO_verify_flow ), /* todo_flags_finish */
 };
+
+class pass_reassoc : public gimple_opt_pass
+{
+public:
+  pass_reassoc(gcc::context *ctxt)
+    : gimple_opt_pass(pass_data_reassoc, ctxt)
+  {}
+
+  /* opt_pass methods: */
+  opt_pass * clone () { return new pass_reassoc (ctxt_); }
+  bool gate () { return gate_tree_ssa_reassoc (); }
+  unsigned int execute () { return execute_reassoc (); }
+
+}; // class pass_reassoc
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_reassoc (gcc::context *ctxt)
+{
+  return new pass_reassoc (ctxt);
+}
index 87a0a599110e0c0de795ec7aec0901fd42a48f49..e8540e80534d06c6e7a3819ee0c9433370c3278d 100644 (file)
@@ -586,25 +586,41 @@ gate_sink (void)
   return flag_tree_sink != 0;
 }
 
-struct gimple_opt_pass pass_sink_code =
+namespace {
+
+const pass_data pass_data_sink_code =
 {
- {
-  GIMPLE_PASS,
-  "sink",                              /* name */
-  OPTGROUP_NONE,                        /* optinfo_flags */
-  gate_sink,                           /* gate */
-  do_sink,                             /* execute */
-  NULL,                                        /* sub */
-  NULL,                                        /* next */
-  0,                                   /* static_pass_number */
-  TV_TREE_SINK,                                /* tv_id */
-  PROP_no_crit_edges | PROP_cfg
-    | PROP_ssa,                                /* properties_required */
-  0,                                   /* properties_provided */
-  0,                                   /* properties_destroyed */
-  0,                                   /* todo_flags_start */
-  TODO_update_ssa
-    | TODO_verify_ssa
-    | TODO_verify_flow                 /* todo_flags_finish */
- }
+  GIMPLE_PASS, /* type */
+  "sink", /* name */
+  OPTGROUP_NONE, /* optinfo_flags */
+  true, /* has_gate */
+  true, /* has_execute */
+  TV_TREE_SINK, /* tv_id */
+  ( PROP_no_crit_edges | PROP_cfg | PROP_ssa ), /* properties_required */
+  0, /* properties_provided */
+  0, /* properties_destroyed */
+  0, /* todo_flags_start */
+  ( TODO_update_ssa | TODO_verify_ssa
+    | TODO_verify_flow ), /* todo_flags_finish */
 };
+
+class pass_sink_code : public gimple_opt_pass
+{
+public:
+  pass_sink_code(gcc::context *ctxt)
+    : gimple_opt_pass(pass_data_sink_code, ctxt)
+  {}
+
+  /* opt_pass methods: */
+  bool gate () { return gate_sink (); }
+  unsigned int execute () { return do_sink (); }
+
+}; // class pass_sink_code
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_sink_code (gcc::context *ctxt)
+{
+  return new pass_sink_code (ctxt);
+}
index c0f9ccd564284d2bfb1f33802d18e2f54eb5aaf5..75d27f1989badcedeafc4c2d3102089dce25978b 100644 (file)
@@ -2065,22 +2065,40 @@ gate_strlen (void)
   return flag_optimize_strlen != 0;
 }
 
-struct gimple_opt_pass pass_strlen =
+namespace {
+
+const pass_data pass_data_strlen =
 {
- {
-  GIMPLE_PASS,
-  "strlen",                    /* name */
-  OPTGROUP_NONE,                /* optinfo_flags */
-  gate_strlen,                 /* gate */
-  tree_ssa_strlen,             /* execute */
-  NULL,                                /* sub */
-  NULL,                                /* next */
-  0,                           /* static_pass_number */
-  TV_TREE_STRLEN,              /* 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 */
+  "strlen", /* name */
+  OPTGROUP_NONE, /* optinfo_flags */
+  true, /* has_gate */
+  true, /* has_execute */
+  TV_TREE_STRLEN, /* 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_strlen : public gimple_opt_pass
+{
+public:
+  pass_strlen(gcc::context *ctxt)
+    : gimple_opt_pass(pass_data_strlen, ctxt)
+  {}
+
+  /* opt_pass methods: */
+  bool gate () { return gate_strlen (); }
+  unsigned int execute () { return tree_ssa_strlen (); }
+
+}; // class pass_strlen
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_strlen (gcc::context *ctxt)
+{
+  return new pass_strlen (ctxt);
+}
index d46cbb34b88085d46e23f1b05a8d5428fb872ac2..a29db7f4df4717497262d776de196d5671b410d8 100644 (file)
@@ -6960,49 +6960,83 @@ gate_tree_pta (void)
 /* A dummy pass to cause points-to information to be computed via
    TODO_rebuild_alias.  */
 
-struct gimple_opt_pass pass_build_alias =
-{
- {
-  GIMPLE_PASS,
-  "alias",                 /* name */
-  OPTGROUP_NONE,            /* optinfo_flags */
-  gate_tree_pta,           /* gate */
-  NULL,                     /* 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_rebuild_alias        /* todo_flags_finish */
- }
+namespace {
+
+const pass_data pass_data_build_alias =
+{
+  GIMPLE_PASS, /* type */
+  "alias", /* name */
+  OPTGROUP_NONE, /* optinfo_flags */
+  true, /* has_gate */
+  false, /* has_execute */
+  TV_NONE, /* tv_id */
+  ( PROP_cfg | PROP_ssa ), /* properties_required */
+  0, /* properties_provided */
+  0, /* properties_destroyed */
+  0, /* todo_flags_start */
+  TODO_rebuild_alias, /* todo_flags_finish */
 };
 
+class pass_build_alias : public gimple_opt_pass
+{
+public:
+  pass_build_alias(gcc::context *ctxt)
+    : gimple_opt_pass(pass_data_build_alias, ctxt)
+  {}
+
+  /* opt_pass methods: */
+  bool gate () { return gate_tree_pta (); }
+
+}; // class pass_build_alias
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_build_alias (gcc::context *ctxt)
+{
+  return new pass_build_alias (ctxt);
+}
+
 /* A dummy pass to cause points-to information to be computed via
    TODO_rebuild_alias.  */
 
-struct gimple_opt_pass pass_build_ealias =
-{
- {
-  GIMPLE_PASS,
-  "ealias",                /* name */
-  OPTGROUP_NONE,            /* optinfo_flags */
-  gate_tree_pta,           /* gate */
-  NULL,                     /* 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_rebuild_alias        /* todo_flags_finish */
- }
+namespace {
+
+const pass_data pass_data_build_ealias =
+{
+  GIMPLE_PASS, /* type */
+  "ealias", /* name */
+  OPTGROUP_NONE, /* optinfo_flags */
+  true, /* has_gate */
+  false, /* has_execute */
+  TV_NONE, /* tv_id */
+  ( PROP_cfg | PROP_ssa ), /* properties_required */
+  0, /* properties_provided */
+  0, /* properties_destroyed */
+  0, /* todo_flags_start */
+  TODO_rebuild_alias, /* todo_flags_finish */
 };
 
+class pass_build_ealias : public gimple_opt_pass
+{
+public:
+  pass_build_ealias(gcc::context *ctxt)
+    : gimple_opt_pass(pass_data_build_ealias, ctxt)
+  {}
+
+  /* opt_pass methods: */
+  bool gate () { return gate_tree_pta (); }
+
+}; // class pass_build_ealias
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_build_ealias (gcc::context *ctxt)
+{
+  return new pass_build_ealias (ctxt);
+}
+
 
 /* Return true if we should execute IPA PTA.  */
 static bool
@@ -7359,22 +7393,40 @@ ipa_pta_execute (void)
   return 0;
 }
 
-struct simple_ipa_opt_pass pass_ipa_pta =
-{
- {
-  SIMPLE_IPA_PASS,
-  "pta",                               /* name */
-  OPTGROUP_NONE,                        /* optinfo_flags */
-  gate_ipa_pta,                        /* gate */
-  ipa_pta_execute,                     /* execute */
-  NULL,                                        /* sub */
-  NULL,                                        /* next */
-  0,                                   /* static_pass_number */
-  TV_IPA_PTA,                  /* tv_id */
-  0,                                   /* properties_required */
-  0,                                   /* properties_provided */
-  0,                                   /* properties_destroyed */
-  0,                                   /* todo_flags_start */
-  TODO_update_ssa                       /* todo_flags_finish */
- }
+namespace {
+
+const pass_data pass_data_ipa_pta =
+{
+  SIMPLE_IPA_PASS, /* type */
+  "pta", /* name */
+  OPTGROUP_NONE, /* optinfo_flags */
+  true, /* has_gate */
+  true, /* has_execute */
+  TV_IPA_PTA, /* tv_id */
+  0, /* properties_required */
+  0, /* properties_provided */
+  0, /* properties_destroyed */
+  0, /* todo_flags_start */
+  TODO_update_ssa, /* todo_flags_finish */
 };
+
+class pass_ipa_pta : public simple_ipa_opt_pass
+{
+public:
+  pass_ipa_pta(gcc::context *ctxt)
+    : simple_ipa_opt_pass(pass_data_ipa_pta, ctxt)
+  {}
+
+  /* opt_pass methods: */
+  bool gate () { return gate_ipa_pta (); }
+  unsigned int execute () { return ipa_pta_execute (); }
+
+}; // class pass_ipa_pta
+
+} // anon namespace
+
+simple_ipa_opt_pass *
+make_pass_ipa_pta (gcc::context *ctxt)
+{
+  return new pass_ipa_pta (ctxt);
+}
index 555485a07c31d451dcd0b0bd486e20a4a54896ee..837c4eaf066f94f64a5b38ad1978158a0bfa8165 100644 (file)
@@ -585,22 +585,41 @@ gate_uncprop (void)
   return flag_tree_dom != 0;
 }
 
-struct gimple_opt_pass pass_uncprop =
+namespace {
+
+const pass_data pass_data_uncprop =
 {
- {
-  GIMPLE_PASS,
-  "uncprop",                           /* name */
-  OPTGROUP_NONE,                        /* optinfo_flags */
-  gate_uncprop,                                /* gate */
-  tree_ssa_uncprop,                    /* execute */
-  NULL,                                        /* sub */
-  NULL,                                        /* next */
-  0,                                   /* static_pass_number */
-  TV_TREE_SSA_UNCPROP,                 /* 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 */
+  "uncprop", /* name */
+  OPTGROUP_NONE, /* optinfo_flags */
+  true, /* has_gate */
+  true, /* has_execute */
+  TV_TREE_SSA_UNCPROP, /* 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_uncprop : public gimple_opt_pass
+{
+public:
+  pass_uncprop(gcc::context *ctxt)
+    : gimple_opt_pass(pass_data_uncprop, ctxt)
+  {}
+
+  /* opt_pass methods: */
+  opt_pass * clone () { return new pass_uncprop (ctxt_); }
+  bool gate () { return gate_uncprop (); }
+  unsigned int execute () { return tree_ssa_uncprop (); }
+
+}; // class pass_uncprop
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_uncprop (gcc::context *ctxt)
+{
+  return new pass_uncprop (ctxt);
+}
index 9a726f115a94d298dca43659c0c0a332f3cf8ce9..6d2d768a24310a5874e49f650d52a7f4ea965726 100644 (file)
@@ -2046,22 +2046,41 @@ gate_warn_uninitialized (void)
   return warn_uninitialized != 0;
 }
 
-struct gimple_opt_pass pass_late_warn_uninitialized =
+namespace {
+
+const pass_data pass_data_late_warn_uninitialized =
 {
- {
-  GIMPLE_PASS,
-  "uninit",                            /* name */
-  OPTGROUP_NONE,                        /* optinfo_flags */
-  gate_warn_uninitialized,             /* gate */
-  execute_late_warn_uninitialized,     /* 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 */
+  "uninit", /* 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_late_warn_uninitialized : public gimple_opt_pass
+{
+public:
+  pass_late_warn_uninitialized(gcc::context *ctxt)
+    : gimple_opt_pass(pass_data_late_warn_uninitialized, ctxt)
+  {}
+
+  /* opt_pass methods: */
+  opt_pass * clone () { return new pass_late_warn_uninitialized (ctxt_); }
+  bool gate () { return gate_warn_uninitialized (); }
+  unsigned int execute () { return execute_late_warn_uninitialized (); }
+
+}; // class pass_late_warn_uninitialized
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_late_warn_uninitialized (gcc::context *ctxt)
+{
+  return new pass_late_warn_uninitialized (ctxt);
+}
index 215206743e8eaec6b13646c89ed1a3c9056c5c06..83a265c43ac8c78c2dd0c81f9349686cb1688db0 100644 (file)
@@ -1088,26 +1088,43 @@ execute_init_datastructures (void)
   return 0;
 }
 
-struct gimple_opt_pass pass_init_datastructures =
+namespace {
+
+const pass_data pass_data_init_datastructures =
 {
- {
-  GIMPLE_PASS,
-  "*init_datastructures",              /* name */
-  OPTGROUP_NONE,                        /* optinfo_flags */
-  NULL,                                        /* gate */
-  execute_init_datastructures,         /* 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 */
+  "*init_datastructures", /* 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_init_datastructures : public gimple_opt_pass
+{
+public:
+  pass_init_datastructures(gcc::context *ctxt)
+    : gimple_opt_pass(pass_data_init_datastructures, ctxt)
+  {}
+
+  /* opt_pass methods: */
+  unsigned int execute () { return execute_init_datastructures (); }
+
+}; // class pass_init_datastructures
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_init_datastructures (gcc::context *ctxt)
+{
+  return new pass_init_datastructures (ctxt);
+}
+
 /* Deallocate memory associated with SSA data structures for FNDECL.  */
 
 void
@@ -1698,26 +1715,44 @@ gate_warn_uninitialized (void)
   return warn_uninitialized != 0;
 }
 
-struct gimple_opt_pass pass_early_warn_uninitialized =
+namespace {
+
+const pass_data pass_data_early_warn_uninitialized =
 {
- {
-  GIMPLE_PASS,
-  "*early_warn_uninitialized",         /* name */
-  OPTGROUP_NONE,                        /* optinfo_flags */
-  gate_warn_uninitialized,             /* gate */
-  execute_early_warn_uninitialized,    /* execute */
-  NULL,                                        /* sub */
-  NULL,                                        /* next */
-  0,                                   /* static_pass_number */
-  TV_TREE_UNINIT,                      /* tv_id */
-  PROP_ssa,                            /* properties_required */
-  0,                                   /* properties_provided */
-  0,                                   /* properties_destroyed */
-  0,                                   /* todo_flags_start */
-  0                                     /* todo_flags_finish */
- }
+  GIMPLE_PASS, /* type */
+  "*early_warn_uninitialized", /* name */
+  OPTGROUP_NONE, /* optinfo_flags */
+  true, /* has_gate */
+  true, /* has_execute */
+  TV_TREE_UNINIT, /* tv_id */
+  PROP_ssa, /* properties_required */
+  0, /* properties_provided */
+  0, /* properties_destroyed */
+  0, /* todo_flags_start */
+  0, /* todo_flags_finish */
 };
 
+class pass_early_warn_uninitialized : public gimple_opt_pass
+{
+public:
+  pass_early_warn_uninitialized(gcc::context *ctxt)
+    : gimple_opt_pass(pass_data_early_warn_uninitialized, ctxt)
+  {}
+
+  /* opt_pass methods: */
+  bool gate () { return gate_warn_uninitialized (); }
+  unsigned int execute () { return execute_early_warn_uninitialized (); }
+
+}; // class pass_early_warn_uninitialized
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_early_warn_uninitialized (gcc::context *ctxt)
+{
+  return new pass_early_warn_uninitialized (ctxt);
+}
+
 
 /* If necessary, rewrite the base of the reference tree *TP from
    a MEM_REF to a plain or converted symbol.  */
@@ -2130,22 +2165,38 @@ execute_update_addresses_taken (void)
   timevar_pop (TV_ADDRESS_TAKEN);
 }
 
-struct gimple_opt_pass pass_update_address_taken =
+namespace {
+
+const pass_data pass_data_update_address_taken =
 {
- {
-  GIMPLE_PASS,
-  "addressables",                      /* name */
-  OPTGROUP_NONE,                        /* optinfo_flags */
-  NULL,                                        /* gate */
-  NULL,                                        /* execute */
-  NULL,                                        /* sub */
-  NULL,                                        /* next */
-  0,                                   /* static_pass_number */
-  TV_ADDRESS_TAKEN,                    /* tv_id */
-  PROP_ssa,                            /* properties_required */
-  0,                                   /* properties_provided */
-  0,                                   /* properties_destroyed */
-  0,                                   /* todo_flags_start */
-  TODO_update_address_taken             /* todo_flags_finish */
- }
+  GIMPLE_PASS, /* type */
+  "addressables", /* name */
+  OPTGROUP_NONE, /* optinfo_flags */
+  false, /* has_gate */
+  false, /* has_execute */
+  TV_ADDRESS_TAKEN, /* tv_id */
+  PROP_ssa, /* properties_required */
+  0, /* properties_provided */
+  0, /* properties_destroyed */
+  0, /* todo_flags_start */
+  TODO_update_address_taken, /* todo_flags_finish */
 };
+
+class pass_update_address_taken : public gimple_opt_pass
+{
+public:
+  pass_update_address_taken(gcc::context *ctxt)
+    : gimple_opt_pass(pass_data_update_address_taken, ctxt)
+  {}
+
+  /* opt_pass methods: */
+
+}; // class pass_update_address_taken
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_update_address_taken (gcc::context *ctxt)
+{
+  return new pass_update_address_taken (ctxt);
+}
index 0a405ce2a3085f77977125691acbde0a1e5f096e..a6af3da192cfd67c7c2ffafeb4363ecc008229de 100644 (file)
@@ -440,22 +440,39 @@ release_dead_ssa_names (void)
   return 0;
 }
 
-struct gimple_opt_pass pass_release_ssa_names =
+namespace {
+
+const pass_data pass_data_release_ssa_names =
 {
- {
-  GIMPLE_PASS,
-  "release_ssa",                       /* name */
-  OPTGROUP_NONE,                        /* optinfo_flags */
-  NULL,                                        /* gate */
-  release_dead_ssa_names,              /* execute */
-  NULL,                                        /* sub */
-  NULL,                                        /* next */
-  0,                                   /* static_pass_number */
-  TV_TREE_SSA_OTHER,                   /* tv_id */
-  PROP_ssa,                            /* properties_required */
-  0,                                   /* properties_provided */
-  0,                                   /* properties_destroyed */
-  TODO_remove_unused_locals,           /* todo_flags_start */
-  0                                    /* todo_flags_finish */
- }
+  GIMPLE_PASS, /* type */
+  "release_ssa", /* name */
+  OPTGROUP_NONE, /* optinfo_flags */
+  false, /* has_gate */
+  true, /* has_execute */
+  TV_TREE_SSA_OTHER, /* tv_id */
+  PROP_ssa, /* properties_required */
+  0, /* properties_provided */
+  0, /* properties_destroyed */
+  TODO_remove_unused_locals, /* todo_flags_start */
+  0, /* todo_flags_finish */
 };
+
+class pass_release_ssa_names : public gimple_opt_pass
+{
+public:
+  pass_release_ssa_names(gcc::context *ctxt)
+    : gimple_opt_pass(pass_data_release_ssa_names, ctxt)
+  {}
+
+  /* opt_pass methods: */
+  unsigned int execute () { return release_dead_ssa_names (); }
+
+}; // class pass_release_ssa_names
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_release_ssa_names (gcc::context *ctxt)
+{
+  return new pass_release_ssa_names (ctxt);
+}
index 8ad9fc2d22e48917f843b21eded1b527f783e70c..50592c03a365b65af934bc5610bf390fc6d4831e 100644 (file)
@@ -985,22 +985,40 @@ finish:
 }
 
 
-struct gimple_opt_pass pass_stdarg =
+namespace {
+
+const pass_data pass_data_stdarg =
 {
- {
-  GIMPLE_PASS,
-  "stdarg",                            /* name */
-  OPTGROUP_NONE,                        /* optinfo_flags */
-  gate_optimize_stdarg,                        /* gate */
-  execute_optimize_stdarg,             /* 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 */
-  0                                    /* todo_flags_finish */
- }
+  GIMPLE_PASS, /* type */
+  "stdarg", /* 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 */
+  0, /* todo_flags_finish */
 };
+
+class pass_stdarg : public gimple_opt_pass
+{
+public:
+  pass_stdarg(gcc::context *ctxt)
+    : gimple_opt_pass(pass_data_stdarg, ctxt)
+  {}
+
+  /* opt_pass methods: */
+  bool gate () { return gate_optimize_stdarg (); }
+  unsigned int execute () { return execute_optimize_stdarg (); }
+
+}; // class pass_stdarg
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_stdarg (gcc::context *ctxt)
+{
+  return new pass_stdarg (ctxt);
+}
index 9ad7daf0689bc0aca63283abfdd8622201c9655e..0d128981e38d8ba753c0ccdccbd28f2f81b0bc91 100644 (file)
@@ -1463,25 +1463,42 @@ switchconv_gate (void)
   return flag_tree_switch_conversion != 0;
 }
 
-struct gimple_opt_pass pass_convert_switch =
+namespace {
+
+const pass_data pass_data_convert_switch =
 {
- {
-  GIMPLE_PASS,
-  "switchconv",                                /* name */
-  OPTGROUP_NONE,                        /* optinfo_flags */
-  switchconv_gate,                     /* gate */
-  do_switchconv,                       /* execute */
-  NULL,                                        /* sub */
-  NULL,                                        /* next */
-  0,                                   /* static_pass_number */
-  TV_TREE_SWITCH_CONVERSION,           /* 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_verify_stmts
-  | TODO_verify_flow                   /* todo_flags_finish */
- }
+  GIMPLE_PASS, /* type */
+  "switchconv", /* name */
+  OPTGROUP_NONE, /* optinfo_flags */
+  true, /* has_gate */
+  true, /* has_execute */
+  TV_TREE_SWITCH_CONVERSION, /* 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_verify_stmts
+    | TODO_verify_flow ), /* todo_flags_finish */
 };
+
+class pass_convert_switch : public gimple_opt_pass
+{
+public:
+  pass_convert_switch(gcc::context *ctxt)
+    : gimple_opt_pass(pass_data_convert_switch, ctxt)
+  {}
+
+  /* opt_pass methods: */
+  bool gate () { return switchconv_gate (); }
+  unsigned int execute () { return do_switchconv (); }
+
+}; // class pass_convert_switch
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_convert_switch (gcc::context *ctxt)
+{
+  return new pass_convert_switch (ctxt);
+}
index c6581dcedcdb3619970b1a8a1ce56da6863f648f..8cd7255e49b3847328368544662b0b8a8200a522 100644 (file)
@@ -1048,42 +1048,79 @@ execute_tail_calls (void)
   return tree_optimize_tail_calls_1 (true);
 }
 
-struct gimple_opt_pass pass_tail_recursion =
+namespace {
+
+const pass_data pass_data_tail_recursion =
 {
- {
-  GIMPLE_PASS,
-  "tailr",                             /* name */
-  OPTGROUP_NONE,                        /* optinfo_flags */
-  gate_tail_calls,                     /* gate */
-  execute_tail_recursion,              /* 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 */
+  "tailr", /* 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_ssa, /* todo_flags_finish */
 };
 
-struct gimple_opt_pass pass_tail_calls =
+class pass_tail_recursion : public gimple_opt_pass
+{
+public:
+  pass_tail_recursion(gcc::context *ctxt)
+    : gimple_opt_pass(pass_data_tail_recursion, ctxt)
+  {}
+
+  /* opt_pass methods: */
+  opt_pass * clone () { return new pass_tail_recursion (ctxt_); }
+  bool gate () { return gate_tail_calls (); }
+  unsigned int execute () { return execute_tail_recursion (); }
+
+}; // class pass_tail_recursion
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_tail_recursion (gcc::context *ctxt)
+{
+  return new pass_tail_recursion (ctxt);
+}
+
+namespace {
+
+const pass_data pass_data_tail_calls =
 {
- {
-  GIMPLE_PASS,
-  "tailc",                             /* name */
-  OPTGROUP_NONE,                        /* optinfo_flags */
-  gate_tail_calls,                     /* gate */
-  execute_tail_calls,                  /* 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 */
+  "tailc", /* 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_ssa, /* todo_flags_finish */
 };
+
+class pass_tail_calls : public gimple_opt_pass
+{
+public:
+  pass_tail_calls(gcc::context *ctxt)
+    : gimple_opt_pass(pass_data_tail_calls, ctxt)
+  {}
+
+  /* opt_pass methods: */
+  bool gate () { return gate_tail_calls (); }
+  unsigned int execute () { return execute_tail_calls (); }
+
+}; // class pass_tail_calls
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_tail_calls (gcc::context *ctxt)
+{
+  return new pass_tail_calls (ctxt);
+}
index 516bd6f954c628349017dd97560b1e1a2f875809..b2a6944687c144619bee7deb8d97fb285e38dc21 100644 (file)
@@ -1454,50 +1454,86 @@ expand_vector_operations (void)
   return cfg_changed ? TODO_cleanup_cfg : 0;
 }
 
-struct gimple_opt_pass pass_lower_vector =
+namespace {
+
+const pass_data pass_data_lower_vector =
 {
- {
-  GIMPLE_PASS,
-  "veclower",                          /* name */
-  OPTGROUP_VEC,                         /* optinfo_flags */
-  gate_expand_vector_operations_ssa,    /* gate */
-  expand_vector_operations,            /* execute */
-  NULL,                                        /* sub */
-  NULL,                                        /* next */
-  0,                                   /* static_pass_number */
-  TV_NONE,                             /* tv_id */
-  PROP_cfg,                            /* properties_required */
-  PROP_gimple_lvec,                    /* properties_provided */
-  0,                                   /* properties_destroyed */
-  0,                                   /* todo_flags_start */
-  TODO_update_ssa                      /* todo_flags_finish */
-    | TODO_verify_ssa
-    | TODO_verify_stmts | TODO_verify_flow
-    | TODO_cleanup_cfg
- }
+  GIMPLE_PASS, /* type */
+  "veclower", /* name */
+  OPTGROUP_VEC, /* optinfo_flags */
+  true, /* has_gate */
+  true, /* has_execute */
+  TV_NONE, /* tv_id */
+  PROP_cfg, /* properties_required */
+  PROP_gimple_lvec, /* properties_provided */
+  0, /* properties_destroyed */
+  0, /* todo_flags_start */
+  ( TODO_update_ssa | TODO_verify_ssa
+    | TODO_verify_stmts
+    | TODO_verify_flow
+    | TODO_cleanup_cfg ), /* todo_flags_finish */
 };
 
-struct gimple_opt_pass pass_lower_vector_ssa =
+class pass_lower_vector : public gimple_opt_pass
+{
+public:
+  pass_lower_vector(gcc::context *ctxt)
+    : gimple_opt_pass(pass_data_lower_vector, ctxt)
+  {}
+
+  /* opt_pass methods: */
+  bool gate () { return gate_expand_vector_operations_ssa (); }
+  unsigned int execute () { return expand_vector_operations (); }
+
+}; // class pass_lower_vector
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_lower_vector (gcc::context *ctxt)
+{
+  return new pass_lower_vector (ctxt);
+}
+
+namespace {
+
+const pass_data pass_data_lower_vector_ssa =
 {
- {
-  GIMPLE_PASS,
-  "veclower2",                         /* name */
-  OPTGROUP_VEC,                         /* optinfo_flags */
-  0,                                   /* gate */
-  expand_vector_operations,            /* execute */
-  NULL,                                        /* sub */
-  NULL,                                        /* next */
-  0,                                   /* static_pass_number */
-  TV_NONE,                             /* tv_id */
-  PROP_cfg,                            /* properties_required */
-  PROP_gimple_lvec,                    /* properties_provided */
-  0,                                   /* properties_destroyed */
-  0,                                   /* todo_flags_start */
-  TODO_update_ssa                      /* todo_flags_finish */
-    | TODO_verify_ssa
-    | TODO_verify_stmts | TODO_verify_flow
-    | TODO_cleanup_cfg
- }
+  GIMPLE_PASS, /* type */
+  "veclower2", /* name */
+  OPTGROUP_VEC, /* optinfo_flags */
+  false, /* has_gate */
+  true, /* has_execute */
+  TV_NONE, /* tv_id */
+  PROP_cfg, /* properties_required */
+  PROP_gimple_lvec, /* properties_provided */
+  0, /* properties_destroyed */
+  0, /* todo_flags_start */
+  ( TODO_update_ssa | TODO_verify_ssa
+    | TODO_verify_stmts
+    | TODO_verify_flow
+    | TODO_cleanup_cfg ), /* todo_flags_finish */
 };
 
+class pass_lower_vector_ssa : public gimple_opt_pass
+{
+public:
+  pass_lower_vector_ssa(gcc::context *ctxt)
+    : gimple_opt_pass(pass_data_lower_vector_ssa, ctxt)
+  {}
+
+  /* opt_pass methods: */
+  opt_pass * clone () { return new pass_lower_vector_ssa (ctxt_); }
+  unsigned int execute () { return expand_vector_operations (); }
+
+}; // class pass_lower_vector_ssa
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_lower_vector_ssa (gcc::context *ctxt)
+{
+  return new pass_lower_vector_ssa (ctxt);
+}
+
 #include "gt-tree-vect-generic.h"
index 1ef31eefd1d169745fc3ae66be4706fc310ef2ec..cfcc95d06f2cbc2373be89ba2202550b64c91be9 100644 (file)
@@ -197,29 +197,45 @@ gate_vect_slp (void)
           || flag_tree_slp_vectorize == 1);
 }
 
-struct gimple_opt_pass pass_slp_vectorize =
+namespace {
+
+const pass_data pass_data_slp_vectorize =
 {
- {
-  GIMPLE_PASS,
-  "slp",                                /* name */
-  OPTGROUP_LOOP
-  | OPTGROUP_VEC,                       /* optinfo_flags */
-  gate_vect_slp,                        /* gate */
-  execute_vect_slp,                     /* execute */
-  NULL,                                 /* sub */
-  NULL,                                 /* next */
-  0,                                    /* static_pass_number */
-  TV_TREE_SLP_VECTORIZATION,            /* tv_id */
-  PROP_ssa | PROP_cfg,                  /* properties_required */
-  0,                                    /* properties_provided */
-  0,                                    /* properties_destroyed */
-  0,                                    /* todo_flags_start */
-  TODO_verify_ssa
-    | TODO_update_ssa
-    | TODO_verify_stmts                 /* todo_flags_finish */
- }
+  GIMPLE_PASS, /* type */
+  "slp", /* name */
+  OPTGROUP_LOOP | OPTGROUP_VEC, /* optinfo_flags */
+  true, /* has_gate */
+  true, /* has_execute */
+  TV_TREE_SLP_VECTORIZATION, /* tv_id */
+  ( PROP_ssa | PROP_cfg ), /* properties_required */
+  0, /* properties_provided */
+  0, /* properties_destroyed */
+  0, /* todo_flags_start */
+  ( TODO_verify_ssa | TODO_update_ssa
+    | TODO_verify_stmts ), /* todo_flags_finish */
 };
 
+class pass_slp_vectorize : public gimple_opt_pass
+{
+public:
+  pass_slp_vectorize(gcc::context *ctxt)
+    : gimple_opt_pass(pass_data_slp_vectorize, ctxt)
+  {}
+
+  /* opt_pass methods: */
+  bool gate () { return gate_vect_slp (); }
+  unsigned int execute () { return execute_vect_slp (); }
+
+}; // class pass_slp_vectorize
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_slp_vectorize (gcc::context *ctxt)
+{
+  return new pass_slp_vectorize (ctxt);
+}
+
 
 /* Increase alignment of global arrays to improve vectorization potential.
    TODO:
@@ -272,23 +288,40 @@ gate_increase_alignment (void)
 }
 
 
-struct simple_ipa_opt_pass pass_ipa_increase_alignment =
+namespace {
+
+const pass_data pass_data_ipa_increase_alignment =
 {
- {
-  SIMPLE_IPA_PASS,
-  "increase_alignment",                 /* name */
-  OPTGROUP_LOOP
-  | OPTGROUP_VEC,                       /* optinfo_flags */
-  gate_increase_alignment,              /* gate */
-  increase_alignment,                   /* execute */
-  NULL,                                 /* sub */
-  NULL,                                 /* next */
-  0,                                    /* static_pass_number */
-  TV_IPA_OPT,                           /* tv_id */
-  0,                                    /* properties_required */
-  0,                                    /* properties_provided */
-  0,                                    /* properties_destroyed */
-  0,                                    /* todo_flags_start */
-  0                                     /* todo_flags_finish */
- }
+  SIMPLE_IPA_PASS, /* type */
+  "increase_alignment", /* name */
+  OPTGROUP_LOOP | OPTGROUP_VEC, /* optinfo_flags */
+  true, /* has_gate */
+  true, /* has_execute */
+  TV_IPA_OPT, /* tv_id */
+  0, /* properties_required */
+  0, /* properties_provided */
+  0, /* properties_destroyed */
+  0, /* todo_flags_start */
+  0, /* todo_flags_finish */
 };
+
+class pass_ipa_increase_alignment : public simple_ipa_opt_pass
+{
+public:
+  pass_ipa_increase_alignment(gcc::context *ctxt)
+    : simple_ipa_opt_pass(pass_data_ipa_increase_alignment, ctxt)
+  {}
+
+  /* opt_pass methods: */
+  bool gate () { return gate_increase_alignment (); }
+  unsigned int execute () { return increase_alignment (); }
+
+}; // class pass_ipa_increase_alignment
+
+} // anon namespace
+
+simple_ipa_opt_pass *
+make_pass_ipa_increase_alignment (gcc::context *ctxt)
+{
+  return new pass_ipa_increase_alignment (ctxt);
+}
index ca9d8bdb30587fcfac169d964e444d94a6bfce1d..ff82591f5f476b557e7b5ebec5fb34994bd4bc9f 100644 (file)
@@ -9584,25 +9584,43 @@ gate_vrp (void)
   return flag_tree_vrp != 0;
 }
 
-struct gimple_opt_pass pass_vrp =
-{
- {
-  GIMPLE_PASS,
-  "vrp",                               /* name */
-  OPTGROUP_NONE,                        /* optinfo_flags */
-  gate_vrp,                            /* gate */
-  execute_vrp,                         /* execute */
-  NULL,                                        /* sub */
-  NULL,                                        /* next */
-  0,                                   /* static_pass_number */
-  TV_TREE_VRP,                         /* tv_id */
-  PROP_ssa,                            /* properties_required */
-  0,                                   /* properties_provided */
-  0,                                   /* properties_destroyed */
-  0,                                   /* todo_flags_start */
-  TODO_cleanup_cfg
-    | TODO_update_ssa
+namespace {
+
+const pass_data pass_data_vrp =
+{
+  GIMPLE_PASS, /* type */
+  "vrp", /* name */
+  OPTGROUP_NONE, /* optinfo_flags */
+  true, /* has_gate */
+  true, /* has_execute */
+  TV_TREE_VRP, /* tv_id */
+  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_vrp : public gimple_opt_pass
+{
+public:
+  pass_vrp(gcc::context *ctxt)
+    : gimple_opt_pass(pass_data_vrp, ctxt)
+  {}
+
+  /* opt_pass methods: */
+  opt_pass * clone () { return new pass_vrp (ctxt_); }
+  bool gate () { return gate_vrp (); }
+  unsigned int execute () { return execute_vrp (); }
+
+}; // class pass_vrp
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_vrp (gcc::context *ctxt)
+{
+  return new pass_vrp (ctxt);
+}
index c9f47d26260d1f3e5de4c24ac717f1ee84e27e9c..a1c0deab21e33014ffbdef76242258fcb7ceedbc 100644 (file)
@@ -5505,26 +5505,43 @@ free_lang_data (void)
 }
 
 
-struct simple_ipa_opt_pass pass_ipa_free_lang_data =
-{
- {
-  SIMPLE_IPA_PASS,
-  "*free_lang_data",                   /* name */
-  OPTGROUP_NONE,                        /* optinfo_flags */
-  NULL,                                        /* gate */
-  free_lang_data,                      /* execute */
-  NULL,                                        /* sub */
-  NULL,                                        /* next */
-  0,                                   /* static_pass_number */
-  TV_IPA_FREE_LANG_DATA,               /* tv_id */
-  0,                                   /* properties_required */
-  0,                                   /* properties_provided */
-  0,                                   /* properties_destroyed */
-  0,                                   /* todo_flags_start */
-  0                                    /* todo_flags_finish */
- }
+namespace {
+
+const pass_data pass_data_ipa_free_lang_data =
+{
+  SIMPLE_IPA_PASS, /* type */
+  "*free_lang_data", /* name */
+  OPTGROUP_NONE, /* optinfo_flags */
+  false, /* has_gate */
+  true, /* has_execute */
+  TV_IPA_FREE_LANG_DATA, /* tv_id */
+  0, /* properties_required */
+  0, /* properties_provided */
+  0, /* properties_destroyed */
+  0, /* todo_flags_start */
+  0, /* todo_flags_finish */
 };
 
+class pass_ipa_free_lang_data : public simple_ipa_opt_pass
+{
+public:
+  pass_ipa_free_lang_data(gcc::context *ctxt)
+    : simple_ipa_opt_pass(pass_data_ipa_free_lang_data, ctxt)
+  {}
+
+  /* opt_pass methods: */
+  unsigned int execute () { return free_lang_data (); }
+
+}; // class pass_ipa_free_lang_data
+
+} // anon namespace
+
+simple_ipa_opt_pass *
+make_pass_ipa_free_lang_data (gcc::context *ctxt)
+{
+  return new pass_ipa_free_lang_data (ctxt);
+}
+
 /* The backbone of is_attribute_p().  ATTR_LEN is the string length of
    ATTR_NAME.  Also used internally by remove_attribute().  */
 bool
index d218eed5a1b1affd2bbdfffb4a184c2af488d5da..b9171c803aa1d8cbbb4b5264ffddf00ba08829fc 100644 (file)
@@ -733,48 +733,85 @@ tsan_finish_file (void)
 
 /* The pass descriptor.  */
 
-struct gimple_opt_pass pass_tsan =
+namespace {
+
+const pass_data pass_data_tsan =
 {
- {
-  GIMPLE_PASS,
-  "tsan",                              /* name  */
-  OPTGROUP_NONE,                       /* optinfo_flags */
-  tsan_gate,                           /* gate  */
-  tsan_pass,                           /* execute  */
-  NULL,                                        /* sub  */
-  NULL,                                        /* next  */
-  0,                                   /* static_pass_number  */
-  TV_NONE,                             /* tv_id  */
-  PROP_ssa | PROP_cfg,                 /* properties_required  */
-  0,                                   /* properties_provided  */
-  0,                                   /* properties_destroyed  */
-  0,                                   /* todo_flags_start  */
-  TODO_verify_all | TODO_update_ssa    /* todo_flags_finish  */
- }
+  GIMPLE_PASS, /* type */
+  "tsan", /* name */
+  OPTGROUP_NONE, /* optinfo_flags */
+  true, /* has_gate */
+  true, /* has_execute */
+  TV_NONE, /* tv_id */
+  ( PROP_ssa | PROP_cfg ), /* properties_required */
+  0, /* properties_provided */
+  0, /* properties_destroyed */
+  0, /* todo_flags_start */
+  ( TODO_verify_all | TODO_update_ssa ), /* todo_flags_finish */
 };
 
+class pass_tsan : public gimple_opt_pass
+{
+public:
+  pass_tsan(gcc::context *ctxt)
+    : gimple_opt_pass(pass_data_tsan, ctxt)
+  {}
+
+  /* opt_pass methods: */
+  opt_pass * clone () { return new pass_tsan (ctxt_); }
+  bool gate () { return tsan_gate (); }
+  unsigned int execute () { return tsan_pass (); }
+
+}; // class pass_tsan
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_tsan (gcc::context *ctxt)
+{
+  return new pass_tsan (ctxt);
+}
+
 static bool
 tsan_gate_O0 (void)
 {
   return flag_tsan != 0 && !optimize;
 }
 
-struct gimple_opt_pass pass_tsan_O0 =
+namespace {
+
+const pass_data pass_data_tsan_O0 =
 {
- {
-  GIMPLE_PASS,
-  "tsan0",                             /* name  */
-  OPTGROUP_NONE,                       /* optinfo_flags */
-  tsan_gate_O0,                                /* gate  */
-  tsan_pass,                           /* execute  */
-  NULL,                                        /* sub  */
-  NULL,                                        /* next  */
-  0,                                   /* static_pass_number  */
-  TV_NONE,                             /* tv_id  */
-  PROP_ssa | PROP_cfg,                 /* properties_required  */
-  0,                                   /* properties_provided  */
-  0,                                   /* properties_destroyed  */
-  0,                                   /* todo_flags_start  */
-  TODO_verify_all | TODO_update_ssa    /* todo_flags_finish  */
- }
+  GIMPLE_PASS, /* type */
+  "tsan0", /* name */
+  OPTGROUP_NONE, /* optinfo_flags */
+  true, /* has_gate */
+  true, /* has_execute */
+  TV_NONE, /* tv_id */
+  ( PROP_ssa | PROP_cfg ), /* properties_required */
+  0, /* properties_provided */
+  0, /* properties_destroyed */
+  0, /* todo_flags_start */
+  ( TODO_verify_all | TODO_update_ssa ), /* todo_flags_finish */
 };
+
+class pass_tsan_O0 : public gimple_opt_pass
+{
+public:
+  pass_tsan_O0(gcc::context *ctxt)
+    : gimple_opt_pass(pass_data_tsan_O0, ctxt)
+  {}
+
+  /* opt_pass methods: */
+  bool gate () { return tsan_gate_O0 (); }
+  unsigned int execute () { return tsan_pass (); }
+
+}; // class pass_tsan_O0
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_tsan_O0 (gcc::context *ctxt)
+{
+  return new pass_tsan_O0 (ctxt);
+}
index 8108413ea72c1066a6935a8c27c569c79bd5ed53..d82d2621fc69ea7dbdff5b9547fe200102c46206 100644 (file)
@@ -10218,23 +10218,40 @@ gate_handle_var_tracking (void)
 
 
 
-struct rtl_opt_pass pass_variable_tracking =
-{
- {
-  RTL_PASS,
-  "vartrack",                           /* name */
-  OPTGROUP_NONE,                        /* optinfo_flags */
-  gate_handle_var_tracking,             /* gate */
-  variable_tracking_main,               /* execute */
-  NULL,                                 /* sub */
-  NULL,                                 /* next */
-  0,                                    /* static_pass_number */
-  TV_VAR_TRACKING,                      /* 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 */
- }
+namespace {
+
+const pass_data pass_data_variable_tracking =
+{
+  RTL_PASS, /* type */
+  "vartrack", /* name */
+  OPTGROUP_NONE, /* optinfo_flags */
+  true, /* has_gate */
+  true, /* has_execute */
+  TV_VAR_TRACKING, /* 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_variable_tracking : public rtl_opt_pass
+{
+public:
+  pass_variable_tracking(gcc::context *ctxt)
+    : rtl_opt_pass(pass_data_variable_tracking, ctxt)
+  {}
+
+  /* opt_pass methods: */
+  bool gate () { return gate_handle_var_tracking (); }
+  unsigned int execute () { return variable_tracking_main (); }
+
+}; // class pass_variable_tracking
+
+} // anon namespace
+
+rtl_opt_pass *
+make_pass_variable_tracking (gcc::context *ctxt)
+{
+  return new pass_variable_tracking (ctxt);
+}
index df4c84fd7741c23fbab51c1f44e9a21542c2b873..90c18a81401beabde3811f2bd5d97ef9c97b7010 100644 (file)
--- a/gcc/web.c
+++ b/gcc/web.c
@@ -449,22 +449,40 @@ web_main (void)
   return 0;
 }
 \f
-struct rtl_opt_pass pass_web =
+namespace {
+
+const pass_data pass_data_web =
 {
- {
-  RTL_PASS,
-  "web",                                /* name */
-  OPTGROUP_NONE,                        /* optinfo_flags */
-  gate_handle_web,                      /* gate */
-  web_main,                            /* execute */
-  NULL,                                 /* sub */
-  NULL,                                 /* next */
-  0,                                    /* static_pass_number */
-  TV_WEB,                               /* 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 */
+  "web", /* name */
+  OPTGROUP_NONE, /* optinfo_flags */
+  true, /* has_gate */
+  true, /* has_execute */
+  TV_WEB, /* 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_web : public rtl_opt_pass
+{
+public:
+  pass_web(gcc::context *ctxt)
+    : rtl_opt_pass(pass_data_web, ctxt)
+  {}
+
+  /* opt_pass methods: */
+  bool gate () { return gate_handle_web (); }
+  unsigned int execute () { return web_main (); }
+
+}; // class pass_web
+
+} // anon namespace
+
+rtl_opt_pass *
+make_pass_web (gcc::context *ctxt)
+{
+  return new pass_web (ctxt);
+}