From 57dc196fd5efa2c59fd57ef21974e8a281f800e3 Mon Sep 17 00:00:00 2001
From: David Malcolm <dmalcolm@redhat.com>
Date: Fri, 19 Apr 2013 16:24:05 -0400
Subject: [PATCH 3/6] Autogenerated part of conversion of passes to instances
 of C++ classes

	Patch autogenerated by refactor.py from
	https://github.com/davidmalcolm/gcc-refactoring-scripts
	revision 31647b9efa0e413f85ef0b284f2ae8a95870d5f5

	* asan.c (struct gimple_opt_pass pass_asan): convert from a global
	struct to a subclass of gimple_opt_pass
	(make_pass_asan): New function to create an instance of the new class
	pass_asan
	(struct gimple_opt_pass pass_asan_O0): convert from a global struct to
	a subclass of gimple_opt_pass
	(make_pass_asan_O0): New function to create an instance of the new
	class pass_asan_O0
	* auto-inc-dec.c (struct rtl_opt_pass pass_inc_dec): convert from a
	global struct to a subclass of rtl_opt_pass
	(make_pass_inc_dec): New function to create an instance of the new
	class pass_inc_dec
	* bb-reorder.c (struct rtl_opt_pass pass_reorder_blocks): convert from
	a global struct to a subclass of rtl_opt_pass
	(make_pass_reorder_blocks): New function to create an instance of the
	new class pass_reorder_blocks
	(struct rtl_opt_pass pass_duplicate_computed_gotos): convert from a
	global struct to a subclass of rtl_opt_pass
	(make_pass_duplicate_computed_gotos): New function to create an
	instance of the new class pass_duplicate_computed_gotos
	(struct rtl_opt_pass pass_partition_blocks): convert from a global
	struct to a subclass of rtl_opt_pass
	(make_pass_partition_blocks): New function to create an instance of
	the new class pass_partition_blocks
	* bt-load.c (struct rtl_opt_pass pass_branch_target_load_optimize1):
	convert from a global struct to a subclass of rtl_opt_pass
	(make_pass_branch_target_load_optimize1): New function to create an
	instance of the new class pass_branch_target_load_optimize1
	(struct rtl_opt_pass pass_branch_target_load_optimize2): convert from
	a global struct to a subclass of rtl_opt_pass
	(make_pass_branch_target_load_optimize2): New function to create an
	instance of the new class pass_branch_target_load_optimize2
	* cfgcleanup.c (struct rtl_opt_pass pass_jump): convert from a global
	struct to a subclass of rtl_opt_pass
	(make_pass_jump): New function to create an instance of the new class
	pass_jump
	(struct rtl_opt_pass pass_jump2): convert from a global struct to a
	subclass of rtl_opt_pass
	(make_pass_jump2): New function to create an instance of the new class
	pass_jump2
	* cfgexpand.c (struct rtl_opt_pass pass_expand): convert from a global
	struct to a subclass of rtl_opt_pass
	(make_pass_expand): New function to create an instance of the new
	class pass_expand
	* cfgrtl.c (struct rtl_opt_pass pass_free_cfg): convert from a global
	struct to a subclass of rtl_opt_pass
	(make_pass_free_cfg): New function to create an instance of the new
	class pass_free_cfg
	(struct rtl_opt_pass pass_into_cfg_layout_mode): convert from a global
	struct to a subclass of rtl_opt_pass
	(make_pass_into_cfg_layout_mode): New function to create an instance
	of the new class pass_into_cfg_layout_mode
	(struct rtl_opt_pass pass_outof_cfg_layout_mode): convert from a
	global struct to a subclass of rtl_opt_pass
	(make_pass_outof_cfg_layout_mode): New function to create an instance
	of the new class pass_outof_cfg_layout_mode
	* cgraphbuild.c (struct gimple_opt_pass pass_build_cgraph_edges):
	convert from a global struct to a subclass of gimple_opt_pass
	(make_pass_build_cgraph_edges): New function to create an instance of
	the new class pass_build_cgraph_edges
	(struct gimple_opt_pass pass_rebuild_cgraph_edges): convert from a
	global struct to a subclass of gimple_opt_pass
	(make_pass_rebuild_cgraph_edges): New function to create an instance
	of the new class pass_rebuild_cgraph_edges
	(struct gimple_opt_pass pass_remove_cgraph_callee_edges): convert from
	a global struct to a subclass of gimple_opt_pass
	(make_pass_remove_cgraph_callee_edges): New function to create an
	instance of the new class pass_remove_cgraph_callee_edges
	* combine-stack-adj.c (struct rtl_opt_pass pass_stack_adjustments):
	convert from a global struct to a subclass of rtl_opt_pass
	(make_pass_stack_adjustments): New function to create an instance of
	the new class pass_stack_adjustments
	* combine.c (struct rtl_opt_pass pass_combine): convert from a global
	struct to a subclass of rtl_opt_pass
	(make_pass_combine): New function to create an instance of the new
	class pass_combine
	* compare-elim.c (struct rtl_opt_pass pass_compare_elim_after_reload):
	convert from a global struct to a subclass of rtl_opt_pass
	(make_pass_compare_elim_after_reload): New function to create an
	instance of the new class pass_compare_elim_after_reload
	* cprop.c (struct rtl_opt_pass pass_rtl_cprop): convert from a global
	struct to a subclass of rtl_opt_pass
	(make_pass_rtl_cprop): New function to create an instance of the new
	class pass_rtl_cprop
	* cse.c (struct rtl_opt_pass pass_cse): convert from a global struct
	to a subclass of rtl_opt_pass
	(make_pass_cse): New function to create an instance of the new class
	pass_cse
	(struct rtl_opt_pass pass_cse2): convert from a global struct to a
	subclass of rtl_opt_pass
	(make_pass_cse2): New function to create an instance of the new class
	pass_cse2
	(struct rtl_opt_pass pass_cse_after_global_opts): convert from a
	global struct to a subclass of rtl_opt_pass
	(make_pass_cse_after_global_opts): New function to create an instance
	of the new class pass_cse_after_global_opts
	* dce.c (struct rtl_opt_pass pass_ud_rtl_dce): convert from a global
	struct to a subclass of rtl_opt_pass
	(make_pass_ud_rtl_dce): New function to create an instance of the new
	class pass_ud_rtl_dce
	(struct rtl_opt_pass pass_fast_rtl_dce): convert from a global struct
	to a subclass of rtl_opt_pass
	(make_pass_fast_rtl_dce): New function to create an instance of the
	new class pass_fast_rtl_dce
	* df-core.c (struct rtl_opt_pass pass_df_initialize_opt): convert from
	a global struct to a subclass of rtl_opt_pass
	(make_pass_df_initialize_opt): New function to create an instance of
	the new class pass_df_initialize_opt
	(struct rtl_opt_pass pass_df_initialize_no_opt): convert from a global
	struct to a subclass of rtl_opt_pass
	(make_pass_df_initialize_no_opt): New function to create an instance
	of the new class pass_df_initialize_no_opt
	(struct rtl_opt_pass pass_df_finish): convert from a global struct to
	a subclass of rtl_opt_pass
	(make_pass_df_finish): New function to create an instance of the new
	class pass_df_finish
	* dse.c (struct rtl_opt_pass pass_rtl_dse1): convert from a global
	struct to a subclass of rtl_opt_pass
	(make_pass_rtl_dse1): New function to create an instance of the new
	class pass_rtl_dse1
	(struct rtl_opt_pass pass_rtl_dse2): convert from a global struct to a
	subclass of rtl_opt_pass
	(make_pass_rtl_dse2): New function to create an instance of the new
	class pass_rtl_dse2
	* dwarf2cfi.c (struct rtl_opt_pass pass_dwarf2_frame): convert from a
	global struct to a subclass of rtl_opt_pass
	(make_pass_dwarf2_frame): New function to create an instance of the
	new class pass_dwarf2_frame
	* except.c (struct rtl_opt_pass pass_set_nothrow_function_flags):
	convert from a global struct to a subclass of rtl_opt_pass
	(make_pass_set_nothrow_function_flags): New function to create an
	instance of the new class pass_set_nothrow_function_flags
	(struct rtl_opt_pass pass_convert_to_eh_region_ranges): convert from a
	global struct to a subclass of rtl_opt_pass
	(make_pass_convert_to_eh_region_ranges): New function to create an
	instance of the new class pass_convert_to_eh_region_ranges
	* final.c (struct rtl_opt_pass pass_compute_alignments): convert from
	a global struct to a subclass of rtl_opt_pass
	(make_pass_compute_alignments): New function to create an instance of
	the new class pass_compute_alignments
	(struct rtl_opt_pass pass_final): convert from a global struct to a
	subclass of rtl_opt_pass
	(make_pass_final): New function to create an instance of the new class
	pass_final
	(struct rtl_opt_pass pass_shorten_branches): convert from a global
	struct to a subclass of rtl_opt_pass
	(make_pass_shorten_branches): New function to create an instance of
	the new class pass_shorten_branches
	(struct rtl_opt_pass pass_clean_state): convert from a global struct
	to a subclass of rtl_opt_pass
	(make_pass_clean_state): New function to create an instance of the new
	class pass_clean_state
	* function.c (struct rtl_opt_pass pass_instantiate_virtual_regs):
	convert from a global struct to a subclass of rtl_opt_pass
	(make_pass_instantiate_virtual_regs): New function to create an
	instance of the new class pass_instantiate_virtual_regs
	(struct rtl_opt_pass pass_leaf_regs): convert from a global struct to
	a subclass of rtl_opt_pass
	(make_pass_leaf_regs): New function to create an instance of the new
	class pass_leaf_regs
	(struct rtl_opt_pass pass_thread_prologue_and_epilogue): convert from
	a global struct to a subclass of rtl_opt_pass
	(make_pass_thread_prologue_and_epilogue): New function to create an
	instance of the new class pass_thread_prologue_and_epilogue
	(struct rtl_opt_pass pass_match_asm_constraints): convert from a
	global struct to a subclass of rtl_opt_pass
	(make_pass_match_asm_constraints): New function to create an instance
	of the new class pass_match_asm_constraints
	* fwprop.c (struct rtl_opt_pass pass_rtl_fwprop): convert from a
	global struct to a subclass of rtl_opt_pass
	(make_pass_rtl_fwprop): New function to create an instance of the new
	class pass_rtl_fwprop
	(struct rtl_opt_pass pass_rtl_fwprop_addr): convert from a global
	struct to a subclass of rtl_opt_pass
	(make_pass_rtl_fwprop_addr): New function to create an instance of the
	new class pass_rtl_fwprop_addr
	* gcse.c (struct rtl_opt_pass pass_rtl_pre): convert from a global
	struct to a subclass of rtl_opt_pass
	(make_pass_rtl_pre): New function to create an instance of the new
	class pass_rtl_pre
	(struct rtl_opt_pass pass_rtl_hoist): convert from a global struct to
	a subclass of rtl_opt_pass
	(make_pass_rtl_hoist): New function to create an instance of the new
	class pass_rtl_hoist
	* gimple-low.c (struct gimple_opt_pass pass_lower_cf): convert from a
	global struct to a subclass of gimple_opt_pass
	(make_pass_lower_cf): New function to create an instance of the new
	class pass_lower_cf
	* gimple-ssa-strength-reduction.c (struct gimple_opt_pass
	pass_strength_reduction): convert from a global struct to a subclass
	of gimple_opt_pass
	(make_pass_strength_reduction): New function to create an instance of
	the new class pass_strength_reduction
	* ifcvt.c (struct rtl_opt_pass pass_rtl_ifcvt): convert from a global
	struct to a subclass of rtl_opt_pass
	(make_pass_rtl_ifcvt): New function to create an instance of the new
	class pass_rtl_ifcvt
	(struct rtl_opt_pass pass_if_after_combine): convert from a global
	struct to a subclass of rtl_opt_pass
	(make_pass_if_after_combine): New function to create an instance of
	the new class pass_if_after_combine
	(struct rtl_opt_pass pass_if_after_reload): convert from a global
	struct to a subclass of rtl_opt_pass
	(make_pass_if_after_reload): New function to create an instance of the
	new class pass_if_after_reload
	* init-regs.c (struct rtl_opt_pass pass_initialize_regs): convert from
	a global struct to a subclass of rtl_opt_pass
	(make_pass_initialize_regs): New function to create an instance of the
	new class pass_initialize_regs
	* ipa-cp.c (struct ipa_opt_pass_d pass_ipa_cp): convert from a global
	struct to a subclass of ipa_opt_pass_d
	(make_pass_ipa_cp): New function to create an instance of the new
	class pass_ipa_cp
	* ipa-inline-analysis.c (struct gimple_opt_pass
	pass_inline_parameters): convert from a global struct to a subclass of
	gimple_opt_pass
	(make_pass_inline_parameters): New function to create an instance of
	the new class pass_inline_parameters
	* ipa-inline.c (struct gimple_opt_pass pass_early_inline): convert
	from a global struct to a subclass of gimple_opt_pass
	(make_pass_early_inline): New function to create an instance of the
	new class pass_early_inline
	(struct ipa_opt_pass_d pass_ipa_inline): convert from a global struct
	to a subclass of ipa_opt_pass_d
	(make_pass_ipa_inline): New function to create an instance of the new
	class pass_ipa_inline
	* ipa-pure-const.c (struct gimple_opt_pass pass_local_pure_const):
	convert from a global struct to a subclass of gimple_opt_pass
	(make_pass_local_pure_const): New function to create an instance of
	the new class pass_local_pure_const
	(struct ipa_opt_pass_d pass_ipa_pure_const): convert from a global
	struct to a subclass of ipa_opt_pass_d
	(make_pass_ipa_pure_const): New function to create an instance of the
	new class pass_ipa_pure_const
	* ipa-reference.c (struct ipa_opt_pass_d pass_ipa_reference): convert
	from a global struct to a subclass of ipa_opt_pass_d
	(make_pass_ipa_reference): New function to create an instance of the
	new class pass_ipa_reference
	* ipa-split.c (struct gimple_opt_pass pass_split_functions): convert
	from a global struct to a subclass of gimple_opt_pass
	(make_pass_split_functions): New function to create an instance of the
	new class pass_split_functions
	(struct gimple_opt_pass pass_feedback_split_functions): convert from a
	global struct to a subclass of gimple_opt_pass
	(make_pass_feedback_split_functions): New function to create an
	instance of the new class pass_feedback_split_functions
	* ipa.c (struct simple_ipa_opt_pass
	pass_ipa_function_and_variable_visibility): convert from a global
	struct to a subclass of simple_ipa_opt_pass
	(make_pass_ipa_function_and_variable_visibility): New function to
	create an instance of the new class
	pass_ipa_function_and_variable_visibility
	(struct simple_ipa_opt_pass pass_ipa_free_inline_summary): convert
	from a global struct to a subclass of simple_ipa_opt_pass
	(make_pass_ipa_free_inline_summary): New function to create an
	instance of the new class pass_ipa_free_inline_summary
	(struct ipa_opt_pass_d pass_ipa_whole_program_visibility): convert
	from a global struct to a subclass of ipa_opt_pass_d
	(make_pass_ipa_whole_program_visibility): New function to create an
	instance of the new class pass_ipa_whole_program_visibility
	(struct ipa_opt_pass_d pass_ipa_profile): convert from a global struct
	to a subclass of ipa_opt_pass_d
	(make_pass_ipa_profile): New function to create an instance of the new
	class pass_ipa_profile
	(struct ipa_opt_pass_d pass_ipa_cdtor_merge): convert from a global
	struct to a subclass of ipa_opt_pass_d
	(make_pass_ipa_cdtor_merge): New function to create an instance of the
	new class pass_ipa_cdtor_merge
	* ira.c (struct rtl_opt_pass pass_ira): convert from a global struct
	to a subclass of rtl_opt_pass
	(make_pass_ira): New function to create an instance of the new class
	pass_ira
	(struct rtl_opt_pass pass_reload): convert from a global struct to a
	subclass of rtl_opt_pass
	(make_pass_reload): New function to create an instance of the new
	class pass_reload
	* jump.c (struct rtl_opt_pass pass_cleanup_barriers): convert from a
	global struct to a subclass of rtl_opt_pass
	(make_pass_cleanup_barriers): New function to create an instance of
	the new class pass_cleanup_barriers
	* loop-init.c (struct rtl_opt_pass pass_loop2): convert from a global
	struct to a subclass of rtl_opt_pass
	(make_pass_loop2): New function to create an instance of the new class
	pass_loop2
	(struct rtl_opt_pass pass_rtl_loop_init): convert from a global struct
	to a subclass of rtl_opt_pass
	(make_pass_rtl_loop_init): New function to create an instance of the
	new class pass_rtl_loop_init
	(struct rtl_opt_pass pass_rtl_loop_done): convert from a global struct
	to a subclass of rtl_opt_pass
	(make_pass_rtl_loop_done): New function to create an instance of the
	new class pass_rtl_loop_done
	(struct rtl_opt_pass pass_rtl_move_loop_invariants): convert from a
	global struct to a subclass of rtl_opt_pass
	(make_pass_rtl_move_loop_invariants): New function to create an
	instance of the new class pass_rtl_move_loop_invariants
	(struct rtl_opt_pass pass_rtl_unswitch): convert from a global struct
	to a subclass of rtl_opt_pass
	(make_pass_rtl_unswitch): New function to create an instance of the
	new class pass_rtl_unswitch
	(struct rtl_opt_pass pass_rtl_unroll_and_peel_loops): convert from a
	global struct to a subclass of rtl_opt_pass
	(make_pass_rtl_unroll_and_peel_loops): New function to create an
	instance of the new class pass_rtl_unroll_and_peel_loops
	(struct rtl_opt_pass pass_rtl_doloop): convert from a global struct to
	a subclass of rtl_opt_pass
	(make_pass_rtl_doloop): New function to create an instance of the new
	class pass_rtl_doloop
	* lower-subreg.c (struct rtl_opt_pass pass_lower_subreg): convert from
	a global struct to a subclass of rtl_opt_pass
	(make_pass_lower_subreg): New function to create an instance of the
	new class pass_lower_subreg
	(struct rtl_opt_pass pass_lower_subreg2): convert from a global struct
	to a subclass of rtl_opt_pass
	(make_pass_lower_subreg2): New function to create an instance of the
	new class pass_lower_subreg2
	* lto-streamer-out.c (struct ipa_opt_pass_d pass_ipa_lto_gimple_out):
	convert from a global struct to a subclass of ipa_opt_pass_d
	(make_pass_ipa_lto_gimple_out): New function to create an instance of
	the new class pass_ipa_lto_gimple_out
	(struct ipa_opt_pass_d pass_ipa_lto_finish_out): convert from a global
	struct to a subclass of ipa_opt_pass_d
	(make_pass_ipa_lto_finish_out): New function to create an instance of
	the new class pass_ipa_lto_finish_out
	* mode-switching.c (struct rtl_opt_pass pass_mode_switching): convert
	from a global struct to a subclass of rtl_opt_pass
	(make_pass_mode_switching): New function to create an instance of the
	new class pass_mode_switching
	* modulo-sched.c (struct rtl_opt_pass pass_sms): convert from a global
	struct to a subclass of rtl_opt_pass
	(make_pass_sms): New function to create an instance of the new class
	pass_sms
	* omp-low.c (struct gimple_opt_pass pass_expand_omp): convert from a
	global struct to a subclass of gimple_opt_pass
	(make_pass_expand_omp): New function to create an instance of the new
	class pass_expand_omp
	(struct gimple_opt_pass pass_lower_omp): convert from a global struct
	to a subclass of gimple_opt_pass
	(make_pass_lower_omp): New function to create an instance of the new
	class pass_lower_omp
	(struct gimple_opt_pass pass_diagnose_omp_blocks): convert from a
	global struct to a subclass of gimple_opt_pass
	(make_pass_diagnose_omp_blocks): New function to create an instance of
	the new class pass_diagnose_omp_blocks
	* passes.c (struct simple_ipa_opt_pass pass_early_local_passes):
	convert from a global struct to a subclass of simple_ipa_opt_pass
	(make_pass_early_local_passes): New function to create an instance of
	the new class pass_early_local_passes
	(struct gimple_opt_pass pass_all_early_optimizations): convert from a
	global struct to a subclass of gimple_opt_pass
	(make_pass_all_early_optimizations): New function to create an
	instance of the new class pass_all_early_optimizations
	(struct gimple_opt_pass pass_all_optimizations): convert from a global
	struct to a subclass of gimple_opt_pass
	(make_pass_all_optimizations): New function to create an instance of
	the new class pass_all_optimizations
	(struct gimple_opt_pass pass_all_optimizations_g): convert from a
	global struct to a subclass of gimple_opt_pass
	(make_pass_all_optimizations_g): New function to create an instance of
	the new class pass_all_optimizations_g
	(struct rtl_opt_pass pass_rest_of_compilation): convert from a global
	struct to a subclass of rtl_opt_pass
	(make_pass_rest_of_compilation): New function to create an instance of
	the new class pass_rest_of_compilation
	(struct rtl_opt_pass pass_postreload): convert from a global struct to
	a subclass of rtl_opt_pass
	(make_pass_postreload): New function to create an instance of the new
	class pass_postreload
	* postreload-gcse.c (struct rtl_opt_pass pass_gcse2): convert from a
	global struct to a subclass of rtl_opt_pass
	(make_pass_gcse2): New function to create an instance of the new class
	pass_gcse2
	* postreload.c (struct rtl_opt_pass pass_postreload_cse): convert from
	a global struct to a subclass of rtl_opt_pass
	(make_pass_postreload_cse): New function to create an instance of the
	new class pass_postreload_cse
	* predict.c (struct gimple_opt_pass pass_profile): convert from a
	global struct to a subclass of gimple_opt_pass
	(make_pass_profile): New function to create an instance of the new
	class pass_profile
	(struct gimple_opt_pass pass_strip_predict_hints): convert from a
	global struct to a subclass of gimple_opt_pass
	(make_pass_strip_predict_hints): New function to create an instance of
	the new class pass_strip_predict_hints
	* recog.c (struct rtl_opt_pass pass_peephole2): convert from a global
	struct to a subclass of rtl_opt_pass
	(make_pass_peephole2): New function to create an instance of the new
	class pass_peephole2
	(struct rtl_opt_pass pass_split_all_insns): convert from a global
	struct to a subclass of rtl_opt_pass
	(make_pass_split_all_insns): New function to create an instance of the
	new class pass_split_all_insns
	(struct rtl_opt_pass pass_split_after_reload): convert from a global
	struct to a subclass of rtl_opt_pass
	(make_pass_split_after_reload): New function to create an instance of
	the new class pass_split_after_reload
	(struct rtl_opt_pass pass_split_before_regstack): convert from a
	global struct to a subclass of rtl_opt_pass
	(make_pass_split_before_regstack): New function to create an instance
	of the new class pass_split_before_regstack
	(struct rtl_opt_pass pass_split_before_sched2): convert from a global
	struct to a subclass of rtl_opt_pass
	(make_pass_split_before_sched2): New function to create an instance of
	the new class pass_split_before_sched2
	(struct rtl_opt_pass pass_split_for_shorten_branches): convert from a
	global struct to a subclass of rtl_opt_pass
	(make_pass_split_for_shorten_branches): New function to create an
	instance of the new class pass_split_for_shorten_branches
	* ree.c (struct rtl_opt_pass pass_ree): convert from a global struct
	to a subclass of rtl_opt_pass
	(make_pass_ree): New function to create an instance of the new class
	pass_ree
	* reg-stack.c (struct rtl_opt_pass pass_stack_regs): convert from a
	global struct to a subclass of rtl_opt_pass
	(make_pass_stack_regs): New function to create an instance of the new
	class pass_stack_regs
	(struct rtl_opt_pass pass_stack_regs_run): convert from a global
	struct to a subclass of rtl_opt_pass
	(make_pass_stack_regs_run): New function to create an instance of the
	new class pass_stack_regs_run
	* regcprop.c (struct rtl_opt_pass pass_cprop_hardreg): convert from a
	global struct to a subclass of rtl_opt_pass
	(make_pass_cprop_hardreg): New function to create an instance of the
	new class pass_cprop_hardreg
	* reginfo.c (struct rtl_opt_pass pass_reginfo_init): convert from a
	global struct to a subclass of rtl_opt_pass
	(make_pass_reginfo_init): New function to create an instance of the
	new class pass_reginfo_init
	* regmove.c (struct rtl_opt_pass pass_regmove): convert from a global
	struct to a subclass of rtl_opt_pass
	(make_pass_regmove): New function to create an instance of the new
	class pass_regmove
	* regrename.c (struct rtl_opt_pass pass_regrename): convert from a
	global struct to a subclass of rtl_opt_pass
	(make_pass_regrename): New function to create an instance of the new
	class pass_regrename
	* reorg.c (struct rtl_opt_pass pass_delay_slots): convert from a
	global struct to a subclass of rtl_opt_pass
	(make_pass_delay_slots): New function to create an instance of the new
	class pass_delay_slots
	(struct rtl_opt_pass pass_machine_reorg): convert from a global struct
	to a subclass of rtl_opt_pass
	(make_pass_machine_reorg): New function to create an instance of the
	new class pass_machine_reorg
	* sched-rgn.c (struct rtl_opt_pass pass_sched): convert from a global
	struct to a subclass of rtl_opt_pass
	(make_pass_sched): New function to create an instance of the new class
	pass_sched
	(struct rtl_opt_pass pass_sched2): convert from a global struct to a
	subclass of rtl_opt_pass
	(make_pass_sched2): New function to create an instance of the new
	class pass_sched2
	* stack-ptr-mod.c (struct rtl_opt_pass pass_stack_ptr_mod): convert
	from a global struct to a subclass of rtl_opt_pass
	(make_pass_stack_ptr_mod): New function to create an instance of the
	new class pass_stack_ptr_mod
	* store-motion.c (struct rtl_opt_pass pass_rtl_store_motion): convert
	from a global struct to a subclass of rtl_opt_pass
	(make_pass_rtl_store_motion): New function to create an instance of
	the new class pass_rtl_store_motion
	* tracer.c (struct gimple_opt_pass pass_tracer): convert from a global
	struct to a subclass of gimple_opt_pass
	(make_pass_tracer): New function to create an instance of the new
	class pass_tracer
	* trans-mem.c (struct gimple_opt_pass pass_diagnose_tm_blocks):
	convert from a global struct to a subclass of gimple_opt_pass
	(make_pass_diagnose_tm_blocks): New function to create an instance of
	the new class pass_diagnose_tm_blocks
	(struct gimple_opt_pass pass_lower_tm): convert from a global struct
	to a subclass of gimple_opt_pass
	(make_pass_lower_tm): New function to create an instance of the new
	class pass_lower_tm
	(struct gimple_opt_pass pass_tm_init): convert from a global struct to
	a subclass of gimple_opt_pass
	(make_pass_tm_init): New function to create an instance of the new
	class pass_tm_init
	(struct gimple_opt_pass pass_tm_mark): convert from a global struct to
	a subclass of gimple_opt_pass
	(make_pass_tm_mark): New function to create an instance of the new
	class pass_tm_mark
	(struct gimple_opt_pass pass_tm_edges): convert from a global struct
	to a subclass of gimple_opt_pass
	(make_pass_tm_edges): New function to create an instance of the new
	class pass_tm_edges
	(struct gimple_opt_pass pass_tm_memopt): convert from a global struct
	to a subclass of gimple_opt_pass
	(make_pass_tm_memopt): New function to create an instance of the new
	class pass_tm_memopt
	(struct simple_ipa_opt_pass pass_ipa_tm): convert from a global struct
	to a subclass of simple_ipa_opt_pass
	(make_pass_ipa_tm): New function to create an instance of the new
	class pass_ipa_tm
	* tree-call-cdce.c (struct gimple_opt_pass pass_call_cdce): convert
	from a global struct to a subclass of gimple_opt_pass
	(make_pass_call_cdce): New function to create an instance of the new
	class pass_call_cdce
	* tree-cfg.c (struct gimple_opt_pass pass_build_cfg): convert from a
	global struct to a subclass of gimple_opt_pass
	(make_pass_build_cfg): New function to create an instance of the new
	class pass_build_cfg
	(struct gimple_opt_pass pass_split_crit_edges): convert from a global
	struct to a subclass of gimple_opt_pass
	(make_pass_split_crit_edges): New function to create an instance of
	the new class pass_split_crit_edges
	(struct gimple_opt_pass pass_warn_function_return): convert from a
	global struct to a subclass of gimple_opt_pass
	(make_pass_warn_function_return): New function to create an instance
	of the new class pass_warn_function_return
	(struct gimple_opt_pass pass_warn_function_noreturn): convert from a
	global struct to a subclass of gimple_opt_pass
	(make_pass_warn_function_noreturn): New function to create an instance
	of the new class pass_warn_function_noreturn
	(struct gimple_opt_pass pass_warn_unused_result): convert from a
	global struct to a subclass of gimple_opt_pass
	(make_pass_warn_unused_result): New function to create an instance of
	the new class pass_warn_unused_result
	* tree-cfgcleanup.c (struct gimple_opt_pass pass_merge_phi): convert
	from a global struct to a subclass of gimple_opt_pass
	(make_pass_merge_phi): New function to create an instance of the new
	class pass_merge_phi
	* tree-complex.c (struct gimple_opt_pass pass_lower_complex): convert
	from a global struct to a subclass of gimple_opt_pass
	(make_pass_lower_complex): New function to create an instance of the
	new class pass_lower_complex
	(struct gimple_opt_pass pass_lower_complex_O0): convert from a global
	struct to a subclass of gimple_opt_pass
	(make_pass_lower_complex_O0): New function to create an instance of
	the new class pass_lower_complex_O0
	* tree-eh.c (struct gimple_opt_pass pass_lower_eh): convert from a
	global struct to a subclass of gimple_opt_pass
	(make_pass_lower_eh): New function to create an instance of the new
	class pass_lower_eh
	(struct gimple_opt_pass pass_refactor_eh): convert from a global
	struct to a subclass of gimple_opt_pass
	(make_pass_refactor_eh): New function to create an instance of the new
	class pass_refactor_eh
	(struct gimple_opt_pass pass_lower_resx): convert from a global struct
	to a subclass of gimple_opt_pass
	(make_pass_lower_resx): New function to create an instance of the new
	class pass_lower_resx
	(struct gimple_opt_pass pass_lower_eh_dispatch): convert from a global
	struct to a subclass of gimple_opt_pass
	(make_pass_lower_eh_dispatch): New function to create an instance of
	the new class pass_lower_eh_dispatch
	(struct gimple_opt_pass pass_cleanup_eh): convert from a global struct
	to a subclass of gimple_opt_pass
	(make_pass_cleanup_eh): New function to create an instance of the new
	class pass_cleanup_eh
	* tree-emutls.c (struct simple_ipa_opt_pass pass_ipa_lower_emutls):
	convert from a global struct to a subclass of simple_ipa_opt_pass
	(make_pass_ipa_lower_emutls): New function to create an instance of
	the new class pass_ipa_lower_emutls
	* tree-if-conv.c (struct gimple_opt_pass pass_if_conversion): convert
	from a global struct to a subclass of gimple_opt_pass
	(make_pass_if_conversion): New function to create an instance of the
	new class pass_if_conversion
	* tree-into-ssa.c (struct gimple_opt_pass pass_build_ssa): convert
	from a global struct to a subclass of gimple_opt_pass
	(make_pass_build_ssa): New function to create an instance of the new
	class pass_build_ssa
	* tree-loop-distribution.c (struct gimple_opt_pass
	pass_loop_distribution): convert from a global struct to a subclass of
	gimple_opt_pass
	(make_pass_loop_distribution): New function to create an instance of
	the new class pass_loop_distribution
	* tree-mudflap.c (struct gimple_opt_pass pass_mudflap_1): convert from
	a global struct to a subclass of gimple_opt_pass
	(make_pass_mudflap_1): New function to create an instance of the new
	class pass_mudflap_1
	(struct gimple_opt_pass pass_mudflap_2): convert from a global struct
	to a subclass of gimple_opt_pass
	(make_pass_mudflap_2): New function to create an instance of the new
	class pass_mudflap_2
	* tree-nomudflap.c (struct gimple_opt_pass pass_mudflap_1): convert
	from a global struct to a subclass of gimple_opt_pass
	(make_pass_mudflap_1): New function to create an instance of the new
	class pass_mudflap_1
	(struct gimple_opt_pass pass_mudflap_2): convert from a global struct
	to a subclass of gimple_opt_pass
	(make_pass_mudflap_2): New function to create an instance of the new
	class pass_mudflap_2
	* tree-nrv.c (struct gimple_opt_pass pass_nrv): convert from a global
	struct to a subclass of gimple_opt_pass
	(make_pass_nrv): New function to create an instance of the new class
	pass_nrv
	(struct gimple_opt_pass pass_return_slot): convert from a global
	struct to a subclass of gimple_opt_pass
	(make_pass_return_slot): New function to create an instance of the new
	class pass_return_slot
	* tree-object-size.c (struct gimple_opt_pass pass_object_sizes):
	convert from a global struct to a subclass of gimple_opt_pass
	(make_pass_object_sizes): New function to create an instance of the
	new class pass_object_sizes
	* tree-optimize.c (struct gimple_opt_pass
	pass_cleanup_cfg_post_optimizing): convert from a global struct to a
	subclass of gimple_opt_pass
	(make_pass_cleanup_cfg_post_optimizing): New function to create an
	instance of the new class pass_cleanup_cfg_post_optimizing
	(struct gimple_opt_pass pass_fixup_cfg): convert from a global struct
	to a subclass of gimple_opt_pass
	(make_pass_fixup_cfg): New function to create an instance of the new
	class pass_fixup_cfg
	* tree-pass.h (struct gimple_opt_pass pass_mudflap_1): replace
	declaration with that of new function make_pass_mudflap_1
	(struct gimple_opt_pass pass_mudflap_2): replace declaration with that
	of new function make_pass_mudflap_2
	(struct gimple_opt_pass pass_asan): replace declaration with that of
	new function make_pass_asan
	(struct gimple_opt_pass pass_asan_O0): replace declaration with that
	of new function make_pass_asan_O0
	(struct gimple_opt_pass pass_tsan): replace declaration with that of
	new function make_pass_tsan
	(struct gimple_opt_pass pass_tsan_O0): replace declaration with that
	of new function make_pass_tsan_O0
	(struct gimple_opt_pass pass_lower_cf): replace declaration with that
	of new function make_pass_lower_cf
	(struct gimple_opt_pass pass_refactor_eh): replace declaration with
	that of new function make_pass_refactor_eh
	(struct gimple_opt_pass pass_lower_eh): replace declaration with that
	of new function make_pass_lower_eh
	(struct gimple_opt_pass pass_lower_eh_dispatch): replace declaration
	with that of new function make_pass_lower_eh_dispatch
	(struct gimple_opt_pass pass_lower_resx): replace declaration with
	that of new function make_pass_lower_resx
	(struct gimple_opt_pass pass_build_cfg): replace declaration with that
	of new function make_pass_build_cfg
	(struct gimple_opt_pass pass_early_tree_profile): replace declaration
	with that of new function make_pass_early_tree_profile
	(struct gimple_opt_pass pass_cleanup_eh): replace declaration with
	that of new function make_pass_cleanup_eh
	(struct gimple_opt_pass pass_sra): replace declaration with that of
	new function make_pass_sra
	(struct gimple_opt_pass pass_sra_early): replace declaration with that
	of new function make_pass_sra_early
	(struct gimple_opt_pass pass_early_ipa_sra): replace declaration with
	that of new function make_pass_early_ipa_sra
	(struct gimple_opt_pass pass_tail_recursion): replace declaration with
	that of new function make_pass_tail_recursion
	(struct gimple_opt_pass pass_tail_calls): replace declaration with
	that of new function make_pass_tail_calls
	(struct gimple_opt_pass pass_tree_loop): replace declaration with that
	of new function make_pass_tree_loop
	(struct gimple_opt_pass pass_tree_loop_init): replace declaration with
	that of new function make_pass_tree_loop_init
	(struct gimple_opt_pass pass_lim): replace declaration with that of
	new function make_pass_lim
	(struct gimple_opt_pass pass_tree_unswitch): replace declaration with
	that of new function make_pass_tree_unswitch
	(struct gimple_opt_pass pass_predcom): replace declaration with that
	of new function make_pass_predcom
	(struct gimple_opt_pass pass_iv_canon): replace declaration with that
	of new function make_pass_iv_canon
	(struct gimple_opt_pass pass_scev_cprop): replace declaration with
	that of new function make_pass_scev_cprop
	(struct gimple_opt_pass pass_empty_loop): replace declaration with
	that of new function make_pass_empty_loop
	(struct gimple_opt_pass pass_record_bounds): replace declaration with
	that of new function make_pass_record_bounds
	(struct gimple_opt_pass pass_graphite): replace declaration with that
	of new function make_pass_graphite
	(struct gimple_opt_pass pass_graphite_transforms): replace declaration
	with that of new function make_pass_graphite_transforms
	(struct gimple_opt_pass pass_if_conversion): replace declaration with
	that of new function make_pass_if_conversion
	(struct gimple_opt_pass pass_loop_distribution): replace declaration
	with that of new function make_pass_loop_distribution
	(struct gimple_opt_pass pass_vectorize): replace declaration with that
	of new function make_pass_vectorize
	(struct gimple_opt_pass pass_slp_vectorize): replace declaration with
	that of new function make_pass_slp_vectorize
	(struct gimple_opt_pass pass_complete_unroll): replace declaration
	with that of new function make_pass_complete_unroll
	(struct gimple_opt_pass pass_complete_unrolli): replace declaration
	with that of new function make_pass_complete_unrolli
	(struct gimple_opt_pass pass_parallelize_loops): replace declaration
	with that of new function make_pass_parallelize_loops
	(struct gimple_opt_pass pass_loop_prefetch): replace declaration with
	that of new function make_pass_loop_prefetch
	(struct gimple_opt_pass pass_iv_optimize): replace declaration with
	that of new function make_pass_iv_optimize
	(struct gimple_opt_pass pass_tree_loop_done): replace declaration with
	that of new function make_pass_tree_loop_done
	(struct gimple_opt_pass pass_ch): replace declaration with that of new
	function make_pass_ch
	(struct gimple_opt_pass pass_ccp): replace declaration with that of
	new function make_pass_ccp
	(struct gimple_opt_pass pass_phi_only_cprop): replace declaration with
	that of new function make_pass_phi_only_cprop
	(struct gimple_opt_pass pass_build_ssa): replace declaration with that
	of new function make_pass_build_ssa
	(struct gimple_opt_pass pass_build_alias): replace declaration with
	that of new function make_pass_build_alias
	(struct gimple_opt_pass pass_build_ealias): replace declaration with
	that of new function make_pass_build_ealias
	(struct gimple_opt_pass pass_dominator): replace declaration with that
	of new function make_pass_dominator
	(struct gimple_opt_pass pass_dce): replace declaration with that of
	new function make_pass_dce
	(struct gimple_opt_pass pass_dce_loop): replace declaration with that
	of new function make_pass_dce_loop
	(struct gimple_opt_pass pass_cd_dce): replace declaration with that of
	new function make_pass_cd_dce
	(struct gimple_opt_pass pass_call_cdce): replace declaration with that
	of new function make_pass_call_cdce
	(struct gimple_opt_pass pass_merge_phi): replace declaration with that
	of new function make_pass_merge_phi
	(struct gimple_opt_pass pass_split_crit_edges): replace declaration
	with that of new function make_pass_split_crit_edges
	(struct gimple_opt_pass pass_pre): replace declaration with that of
	new function make_pass_pre
	(struct gimple_opt_pass pass_profile): replace declaration with that
	of new function make_pass_profile
	(struct gimple_opt_pass pass_strip_predict_hints): replace declaration
	with that of new function make_pass_strip_predict_hints
	(struct gimple_opt_pass pass_lower_complex_O0): replace declaration
	with that of new function make_pass_lower_complex_O0
	(struct gimple_opt_pass pass_lower_complex): replace declaration with
	that of new function make_pass_lower_complex
	(struct gimple_opt_pass pass_lower_vector): replace declaration with
	that of new function make_pass_lower_vector
	(struct gimple_opt_pass pass_lower_vector_ssa): replace declaration
	with that of new function make_pass_lower_vector_ssa
	(struct gimple_opt_pass pass_lower_omp): replace declaration with that
	of new function make_pass_lower_omp
	(struct gimple_opt_pass pass_diagnose_omp_blocks): replace declaration
	with that of new function make_pass_diagnose_omp_blocks
	(struct gimple_opt_pass pass_expand_omp): replace declaration with
	that of new function make_pass_expand_omp
	(struct gimple_opt_pass pass_expand_omp_ssa): replace declaration with
	that of new function make_pass_expand_omp_ssa
	(struct gimple_opt_pass pass_object_sizes): replace declaration with
	that of new function make_pass_object_sizes
	(struct gimple_opt_pass pass_strlen): replace declaration with that of
	new function make_pass_strlen
	(struct gimple_opt_pass pass_fold_builtins): replace declaration with
	that of new function make_pass_fold_builtins
	(struct gimple_opt_pass pass_stdarg): replace declaration with that of
	new function make_pass_stdarg
	(struct gimple_opt_pass pass_early_warn_uninitialized): replace
	declaration with that of new function
	make_pass_early_warn_uninitialized
	(struct gimple_opt_pass pass_late_warn_uninitialized): replace
	declaration with that of new function
	make_pass_late_warn_uninitialized
	(struct gimple_opt_pass pass_cse_reciprocals): replace declaration
	with that of new function make_pass_cse_reciprocals
	(struct gimple_opt_pass pass_cse_sincos): replace declaration with
	that of new function make_pass_cse_sincos
	(struct gimple_opt_pass pass_optimize_bswap): replace declaration with
	that of new function make_pass_optimize_bswap
	(struct gimple_opt_pass pass_optimize_widening_mul): replace
	declaration with that of new function make_pass_optimize_widening_mul
	(struct gimple_opt_pass pass_warn_function_return): replace
	declaration with that of new function make_pass_warn_function_return
	(struct gimple_opt_pass pass_warn_function_noreturn): replace
	declaration with that of new function make_pass_warn_function_noreturn
	(struct gimple_opt_pass pass_cselim): replace declaration with that of
	new function make_pass_cselim
	(struct gimple_opt_pass pass_phiopt): replace declaration with that of
	new function make_pass_phiopt
	(struct gimple_opt_pass pass_forwprop): replace declaration with that
	of new function make_pass_forwprop
	(struct gimple_opt_pass pass_phiprop): replace declaration with that
	of new function make_pass_phiprop
	(struct gimple_opt_pass pass_tree_ifcombine): replace declaration with
	that of new function make_pass_tree_ifcombine
	(struct gimple_opt_pass pass_dse): replace declaration with that of
	new function make_pass_dse
	(struct gimple_opt_pass pass_nrv): replace declaration with that of
	new function make_pass_nrv
	(struct gimple_opt_pass pass_rename_ssa_copies): replace declaration
	with that of new function make_pass_rename_ssa_copies
	(struct gimple_opt_pass pass_sink_code): replace declaration with that
	of new function make_pass_sink_code
	(struct gimple_opt_pass pass_fre): replace declaration with that of
	new function make_pass_fre
	(struct gimple_opt_pass pass_check_data_deps): replace declaration
	with that of new function make_pass_check_data_deps
	(struct gimple_opt_pass pass_copy_prop): replace declaration with that
	of new function make_pass_copy_prop
	(struct gimple_opt_pass pass_vrp): replace declaration with that of
	new function make_pass_vrp
	(struct gimple_opt_pass pass_uncprop): replace declaration with that
	of new function make_pass_uncprop
	(struct gimple_opt_pass pass_return_slot): replace declaration with
	that of new function make_pass_return_slot
	(struct gimple_opt_pass pass_reassoc): replace declaration with that
	of new function make_pass_reassoc
	(struct gimple_opt_pass pass_rebuild_cgraph_edges): replace
	declaration with that of new function make_pass_rebuild_cgraph_edges
	(struct gimple_opt_pass pass_remove_cgraph_callee_edges): replace
	declaration with that of new function
	make_pass_remove_cgraph_callee_edges
	(struct gimple_opt_pass pass_build_cgraph_edges): replace declaration
	with that of new function make_pass_build_cgraph_edges
	(struct gimple_opt_pass pass_local_pure_const): replace declaration
	with that of new function make_pass_local_pure_const
	(struct gimple_opt_pass pass_tracer): replace declaration with that of
	new function make_pass_tracer
	(struct gimple_opt_pass pass_warn_unused_result): replace declaration
	with that of new function make_pass_warn_unused_result
	(struct gimple_opt_pass pass_diagnose_tm_blocks): replace declaration
	with that of new function make_pass_diagnose_tm_blocks
	(struct gimple_opt_pass pass_lower_tm): replace declaration with that
	of new function make_pass_lower_tm
	(struct gimple_opt_pass pass_tm_init): replace declaration with that
	of new function make_pass_tm_init
	(struct gimple_opt_pass pass_tm_mark): replace declaration with that
	of new function make_pass_tm_mark
	(struct gimple_opt_pass pass_tm_memopt): replace declaration with that
	of new function make_pass_tm_memopt
	(struct gimple_opt_pass pass_tm_edges): replace declaration with that
	of new function make_pass_tm_edges
	(struct gimple_opt_pass pass_split_functions): replace declaration
	with that of new function make_pass_split_functions
	(struct gimple_opt_pass pass_feedback_split_functions): replace
	declaration with that of new function
	make_pass_feedback_split_functions
	(struct gimple_opt_pass pass_strength_reduction): replace declaration
	with that of new function make_pass_strength_reduction
	(struct simple_ipa_opt_pass pass_ipa_lower_emutls): replace
	declaration with that of new function make_pass_ipa_lower_emutls
	(struct simple_ipa_opt_pass
	pass_ipa_function_and_variable_visibility): replace declaration with
	that of new function make_pass_ipa_function_and_variable_visibility
	(struct simple_ipa_opt_pass pass_ipa_tree_profile): replace
	declaration with that of new function make_pass_ipa_tree_profile
	(struct simple_ipa_opt_pass pass_early_local_passes): replace
	declaration with that of new function make_pass_early_local_passes
	(struct ipa_opt_pass_d pass_ipa_whole_program_visibility): replace
	declaration with that of new function
	make_pass_ipa_whole_program_visibility
	(struct ipa_opt_pass_d pass_ipa_lto_gimple_out): replace declaration
	with that of new function make_pass_ipa_lto_gimple_out
	(struct simple_ipa_opt_pass pass_ipa_increase_alignment): replace
	declaration with that of new function make_pass_ipa_increase_alignment
	(struct ipa_opt_pass_d pass_ipa_inline): replace declaration with that
	of new function make_pass_ipa_inline
	(struct simple_ipa_opt_pass pass_ipa_free_lang_data): replace
	declaration with that of new function make_pass_ipa_free_lang_data
	(struct simple_ipa_opt_pass pass_ipa_free_inline_summary): replace
	declaration with that of new function
	make_pass_ipa_free_inline_summary
	(struct ipa_opt_pass_d pass_ipa_cp): replace declaration with that of
	new function make_pass_ipa_cp
	(struct ipa_opt_pass_d pass_ipa_reference): replace declaration with
	that of new function make_pass_ipa_reference
	(struct ipa_opt_pass_d pass_ipa_pure_const): replace declaration with
	that of new function make_pass_ipa_pure_const
	(struct simple_ipa_opt_pass pass_ipa_pta): replace declaration with
	that of new function make_pass_ipa_pta
	(struct ipa_opt_pass_d pass_ipa_lto_wpa_fixup): replace declaration
	with that of new function make_pass_ipa_lto_wpa_fixup
	(struct ipa_opt_pass_d pass_ipa_lto_finish_out): replace declaration
	with that of new function make_pass_ipa_lto_finish_out
	(struct simple_ipa_opt_pass pass_ipa_tm): replace declaration with
	that of new function make_pass_ipa_tm
	(struct ipa_opt_pass_d pass_ipa_profile): replace declaration with
	that of new function make_pass_ipa_profile
	(struct ipa_opt_pass_d pass_ipa_cdtor_merge): replace declaration with
	that of new function make_pass_ipa_cdtor_merge
	(struct gimple_opt_pass pass_cleanup_cfg_post_optimizing): replace
	declaration with that of new function
	make_pass_cleanup_cfg_post_optimizing
	(struct gimple_opt_pass pass_init_datastructures): replace declaration
	with that of new function make_pass_init_datastructures
	(struct gimple_opt_pass pass_fixup_cfg): replace declaration with that
	of new function make_pass_fixup_cfg
	(struct rtl_opt_pass pass_expand): replace declaration with that of
	new function make_pass_expand
	(struct rtl_opt_pass pass_instantiate_virtual_regs): replace
	declaration with that of new function
	make_pass_instantiate_virtual_regs
	(struct rtl_opt_pass pass_rtl_fwprop): replace declaration with that
	of new function make_pass_rtl_fwprop
	(struct rtl_opt_pass pass_rtl_fwprop_addr): replace declaration with
	that of new function make_pass_rtl_fwprop_addr
	(struct rtl_opt_pass pass_jump): replace declaration with that of new
	function make_pass_jump
	(struct rtl_opt_pass pass_jump2): replace declaration with that of new
	function make_pass_jump2
	(struct rtl_opt_pass pass_lower_subreg): replace declaration with that
	of new function make_pass_lower_subreg
	(struct rtl_opt_pass pass_cse): replace declaration with that of new
	function make_pass_cse
	(struct rtl_opt_pass pass_fast_rtl_dce): replace declaration with that
	of new function make_pass_fast_rtl_dce
	(struct rtl_opt_pass pass_ud_rtl_dce): replace declaration with that
	of new function make_pass_ud_rtl_dce
	(struct rtl_opt_pass pass_rtl_dce): replace declaration with that of
	new function make_pass_rtl_dce
	(struct rtl_opt_pass pass_rtl_dse1): replace declaration with that of
	new function make_pass_rtl_dse1
	(struct rtl_opt_pass pass_rtl_dse2): replace declaration with that of
	new function make_pass_rtl_dse2
	(struct rtl_opt_pass pass_rtl_dse3): replace declaration with that of
	new function make_pass_rtl_dse3
	(struct rtl_opt_pass pass_rtl_cprop): replace declaration with that of
	new function make_pass_rtl_cprop
	(struct rtl_opt_pass pass_rtl_pre): replace declaration with that of
	new function make_pass_rtl_pre
	(struct rtl_opt_pass pass_rtl_hoist): replace declaration with that of
	new function make_pass_rtl_hoist
	(struct rtl_opt_pass pass_rtl_store_motion): replace declaration with
	that of new function make_pass_rtl_store_motion
	(struct rtl_opt_pass pass_cse_after_global_opts): replace declaration
	with that of new function make_pass_cse_after_global_opts
	(struct rtl_opt_pass pass_rtl_ifcvt): replace declaration with that of
	new function make_pass_rtl_ifcvt
	(struct rtl_opt_pass pass_into_cfg_layout_mode): replace declaration
	with that of new function make_pass_into_cfg_layout_mode
	(struct rtl_opt_pass pass_outof_cfg_layout_mode): replace declaration
	with that of new function make_pass_outof_cfg_layout_mode
	(struct rtl_opt_pass pass_loop2): replace declaration with that of new
	function make_pass_loop2
	(struct rtl_opt_pass pass_rtl_loop_init): replace declaration with
	that of new function make_pass_rtl_loop_init
	(struct rtl_opt_pass pass_rtl_move_loop_invariants): replace
	declaration with that of new function
	make_pass_rtl_move_loop_invariants
	(struct rtl_opt_pass pass_rtl_unswitch): replace declaration with that
	of new function make_pass_rtl_unswitch
	(struct rtl_opt_pass pass_rtl_unroll_and_peel_loops): replace
	declaration with that of new function
	make_pass_rtl_unroll_and_peel_loops
	(struct rtl_opt_pass pass_rtl_doloop): replace declaration with that
	of new function make_pass_rtl_doloop
	(struct rtl_opt_pass pass_rtl_loop_done): replace declaration with
	that of new function make_pass_rtl_loop_done
	(struct rtl_opt_pass pass_web): replace declaration with that of new
	function make_pass_web
	(struct rtl_opt_pass pass_cse2): replace declaration with that of new
	function make_pass_cse2
	(struct rtl_opt_pass pass_df_initialize_opt): replace declaration with
	that of new function make_pass_df_initialize_opt
	(struct rtl_opt_pass pass_df_initialize_no_opt): replace declaration
	with that of new function make_pass_df_initialize_no_opt
	(struct rtl_opt_pass pass_reginfo_init): replace declaration with that
	of new function make_pass_reginfo_init
	(struct rtl_opt_pass pass_inc_dec): replace declaration with that of
	new function make_pass_inc_dec
	(struct rtl_opt_pass pass_stack_ptr_mod): replace declaration with
	that of new function make_pass_stack_ptr_mod
	(struct rtl_opt_pass pass_initialize_regs): replace declaration with
	that of new function make_pass_initialize_regs
	(struct rtl_opt_pass pass_combine): replace declaration with that of
	new function make_pass_combine
	(struct rtl_opt_pass pass_if_after_combine): replace declaration with
	that of new function make_pass_if_after_combine
	(struct rtl_opt_pass pass_ree): replace declaration with that of new
	function make_pass_ree
	(struct rtl_opt_pass pass_partition_blocks): replace declaration with
	that of new function make_pass_partition_blocks
	(struct rtl_opt_pass pass_match_asm_constraints): replace declaration
	with that of new function make_pass_match_asm_constraints
	(struct rtl_opt_pass pass_regmove): replace declaration with that of
	new function make_pass_regmove
	(struct rtl_opt_pass pass_split_all_insns): replace declaration with
	that of new function make_pass_split_all_insns
	(struct rtl_opt_pass pass_fast_rtl_byte_dce): replace declaration with
	that of new function make_pass_fast_rtl_byte_dce
	(struct rtl_opt_pass pass_lower_subreg2): replace declaration with
	that of new function make_pass_lower_subreg2
	(struct rtl_opt_pass pass_mode_switching): replace declaration with
	that of new function make_pass_mode_switching
	(struct rtl_opt_pass pass_sms): replace declaration with that of new
	function make_pass_sms
	(struct rtl_opt_pass pass_sched): replace declaration with that of new
	function make_pass_sched
	(struct rtl_opt_pass pass_ira): replace declaration with that of new
	function make_pass_ira
	(struct rtl_opt_pass pass_reload): replace declaration with that of
	new function make_pass_reload
	(struct rtl_opt_pass pass_clean_state): replace declaration with that
	of new function make_pass_clean_state
	(struct rtl_opt_pass pass_branch_prob): replace declaration with that
	of new function make_pass_branch_prob
	(struct rtl_opt_pass pass_value_profile_transformations): replace
	declaration with that of new function
	make_pass_value_profile_transformations
	(struct rtl_opt_pass pass_postreload_cse): replace declaration with
	that of new function make_pass_postreload_cse
	(struct rtl_opt_pass pass_gcse2): replace declaration with that of new
	function make_pass_gcse2
	(struct rtl_opt_pass pass_split_after_reload): replace declaration
	with that of new function make_pass_split_after_reload
	(struct rtl_opt_pass pass_branch_target_load_optimize1): replace
	declaration with that of new function
	make_pass_branch_target_load_optimize1
	(struct rtl_opt_pass pass_thread_prologue_and_epilogue): replace
	declaration with that of new function
	make_pass_thread_prologue_and_epilogue
	(struct rtl_opt_pass pass_stack_adjustments): replace declaration with
	that of new function make_pass_stack_adjustments
	(struct rtl_opt_pass pass_peephole2): replace declaration with that of
	new function make_pass_peephole2
	(struct rtl_opt_pass pass_if_after_reload): replace declaration with
	that of new function make_pass_if_after_reload
	(struct rtl_opt_pass pass_regrename): replace declaration with that of
	new function make_pass_regrename
	(struct rtl_opt_pass pass_cprop_hardreg): replace declaration with
	that of new function make_pass_cprop_hardreg
	(struct rtl_opt_pass pass_reorder_blocks): replace declaration with
	that of new function make_pass_reorder_blocks
	(struct rtl_opt_pass pass_branch_target_load_optimize2): replace
	declaration with that of new function
	make_pass_branch_target_load_optimize2
	(struct rtl_opt_pass pass_leaf_regs): replace declaration with that of
	new function make_pass_leaf_regs
	(struct rtl_opt_pass pass_split_before_sched2): replace declaration
	with that of new function make_pass_split_before_sched2
	(struct rtl_opt_pass pass_compare_elim_after_reload): replace
	declaration with that of new function
	make_pass_compare_elim_after_reload
	(struct rtl_opt_pass pass_sched2): replace declaration with that of
	new function make_pass_sched2
	(struct rtl_opt_pass pass_stack_regs): replace declaration with that
	of new function make_pass_stack_regs
	(struct rtl_opt_pass pass_stack_regs_run): replace declaration with
	that of new function make_pass_stack_regs_run
	(struct rtl_opt_pass pass_df_finish): replace declaration with that of
	new function make_pass_df_finish
	(struct rtl_opt_pass pass_compute_alignments): replace declaration
	with that of new function make_pass_compute_alignments
	(struct rtl_opt_pass pass_duplicate_computed_gotos): replace
	declaration with that of new function
	make_pass_duplicate_computed_gotos
	(struct rtl_opt_pass pass_variable_tracking): replace declaration with
	that of new function make_pass_variable_tracking
	(struct rtl_opt_pass pass_free_cfg): replace declaration with that of
	new function make_pass_free_cfg
	(struct rtl_opt_pass pass_machine_reorg): replace declaration with
	that of new function make_pass_machine_reorg
	(struct rtl_opt_pass pass_cleanup_barriers): replace declaration with
	that of new function make_pass_cleanup_barriers
	(struct rtl_opt_pass pass_delay_slots): replace declaration with that
	of new function make_pass_delay_slots
	(struct rtl_opt_pass pass_split_for_shorten_branches): replace
	declaration with that of new function
	make_pass_split_for_shorten_branches
	(struct rtl_opt_pass pass_split_before_regstack): replace declaration
	with that of new function make_pass_split_before_regstack
	(struct rtl_opt_pass pass_convert_to_eh_region_ranges): replace
	declaration with that of new function
	make_pass_convert_to_eh_region_ranges
	(struct rtl_opt_pass pass_shorten_branches): replace declaration with
	that of new function make_pass_shorten_branches
	(struct rtl_opt_pass pass_set_nothrow_function_flags): replace
	declaration with that of new function
	make_pass_set_nothrow_function_flags
	(struct rtl_opt_pass pass_dwarf2_frame): replace declaration with that
	of new function make_pass_dwarf2_frame
	(struct rtl_opt_pass pass_final): replace declaration with that of new
	function make_pass_final
	(struct rtl_opt_pass pass_rtl_seqabstr): replace declaration with that
	of new function make_pass_rtl_seqabstr
	(struct gimple_opt_pass pass_release_ssa_names): replace declaration
	with that of new function make_pass_release_ssa_names
	(struct gimple_opt_pass pass_early_inline): replace declaration with
	that of new function make_pass_early_inline
	(struct gimple_opt_pass pass_inline_parameters): replace declaration
	with that of new function make_pass_inline_parameters
	(struct gimple_opt_pass pass_update_address_taken): replace
	declaration with that of new function make_pass_update_address_taken
	(struct gimple_opt_pass pass_convert_switch): replace declaration with
	that of new function make_pass_convert_switch
	* tree-profile.c (struct simple_ipa_opt_pass pass_ipa_tree_profile):
	convert from a global struct to a subclass of simple_ipa_opt_pass
	(make_pass_ipa_tree_profile): New function to create an instance of
	the new class pass_ipa_tree_profile
	* tree-sra.c (struct gimple_opt_pass pass_sra_early): convert from a
	global struct to a subclass of gimple_opt_pass
	(make_pass_sra_early): New function to create an instance of the new
	class pass_sra_early
	(struct gimple_opt_pass pass_sra): convert from a global struct to a
	subclass of gimple_opt_pass
	(make_pass_sra): New function to create an instance of the new class
	pass_sra
	(struct gimple_opt_pass pass_early_ipa_sra): convert from a global
	struct to a subclass of gimple_opt_pass
	(make_pass_early_ipa_sra): New function to create an instance of the
	new class pass_early_ipa_sra
	* tree-ssa-ccp.c (struct gimple_opt_pass pass_ccp): convert from a
	global struct to a subclass of gimple_opt_pass
	(make_pass_ccp): New function to create an instance of the new class
	pass_ccp
	(struct gimple_opt_pass pass_fold_builtins): convert from a global
	struct to a subclass of gimple_opt_pass
	(make_pass_fold_builtins): New function to create an instance of the
	new class pass_fold_builtins
	* tree-ssa-copy.c (struct gimple_opt_pass pass_copy_prop): convert
	from a global struct to a subclass of gimple_opt_pass
	(make_pass_copy_prop): New function to create an instance of the new
	class pass_copy_prop
	* tree-ssa-copyrename.c (struct gimple_opt_pass
	pass_rename_ssa_copies): convert from a global struct to a subclass of
	gimple_opt_pass
	(make_pass_rename_ssa_copies): New function to create an instance of
	the new class pass_rename_ssa_copies
	* tree-ssa-dce.c (struct gimple_opt_pass pass_dce): convert from a
	global struct to a subclass of gimple_opt_pass
	(make_pass_dce): New function to create an instance of the new class
	pass_dce
	(struct gimple_opt_pass pass_dce_loop): convert from a global struct
	to a subclass of gimple_opt_pass
	(make_pass_dce_loop): New function to create an instance of the new
	class pass_dce_loop
	(struct gimple_opt_pass pass_cd_dce): convert from a global struct to
	a subclass of gimple_opt_pass
	(make_pass_cd_dce): New function to create an instance of the new
	class pass_cd_dce
	* tree-ssa-dom.c (struct gimple_opt_pass pass_dominator): convert from
	a global struct to a subclass of gimple_opt_pass
	(make_pass_dominator): New function to create an instance of the new
	class pass_dominator
	(struct gimple_opt_pass pass_phi_only_cprop): convert from a global
	struct to a subclass of gimple_opt_pass
	(make_pass_phi_only_cprop): New function to create an instance of the
	new class pass_phi_only_cprop
	* tree-ssa-dse.c (struct gimple_opt_pass pass_dse): convert from a
	global struct to a subclass of gimple_opt_pass
	(make_pass_dse): New function to create an instance of the new class
	pass_dse
	* tree-ssa-forwprop.c (struct gimple_opt_pass pass_forwprop): convert
	from a global struct to a subclass of gimple_opt_pass
	(make_pass_forwprop): New function to create an instance of the new
	class pass_forwprop
	* tree-ssa-ifcombine.c (struct gimple_opt_pass pass_tree_ifcombine):
	convert from a global struct to a subclass of gimple_opt_pass
	(make_pass_tree_ifcombine): New function to create an instance of the
	new class pass_tree_ifcombine
	* tree-ssa-loop-ch.c (struct gimple_opt_pass pass_ch): convert from a
	global struct to a subclass of gimple_opt_pass
	(make_pass_ch): New function to create an instance of the new class
	pass_ch
	* tree-ssa-loop.c (struct gimple_opt_pass pass_tree_loop): convert
	from a global struct to a subclass of gimple_opt_pass
	(make_pass_tree_loop): New function to create an instance of the new
	class pass_tree_loop
	(struct gimple_opt_pass pass_tree_loop_init): convert from a global
	struct to a subclass of gimple_opt_pass
	(make_pass_tree_loop_init): New function to create an instance of the
	new class pass_tree_loop_init
	(struct gimple_opt_pass pass_lim): convert from a global struct to a
	subclass of gimple_opt_pass
	(make_pass_lim): New function to create an instance of the new class
	pass_lim
	(struct gimple_opt_pass pass_tree_unswitch): convert from a global
	struct to a subclass of gimple_opt_pass
	(make_pass_tree_unswitch): New function to create an instance of the
	new class pass_tree_unswitch
	(struct gimple_opt_pass pass_predcom): convert from a global struct to
	a subclass of gimple_opt_pass
	(make_pass_predcom): New function to create an instance of the new
	class pass_predcom
	(struct gimple_opt_pass pass_vectorize): convert from a global struct
	to a subclass of gimple_opt_pass
	(make_pass_vectorize): New function to create an instance of the new
	class pass_vectorize
	(struct gimple_opt_pass pass_graphite): convert from a global struct
	to a subclass of gimple_opt_pass
	(make_pass_graphite): New function to create an instance of the new
	class pass_graphite
	(struct gimple_opt_pass pass_graphite_transforms): convert from a
	global struct to a subclass of gimple_opt_pass
	(make_pass_graphite_transforms): New function to create an instance of
	the new class pass_graphite_transforms
	(struct gimple_opt_pass pass_check_data_deps): convert from a global
	struct to a subclass of gimple_opt_pass
	(make_pass_check_data_deps): New function to create an instance of the
	new class pass_check_data_deps
	(struct gimple_opt_pass pass_iv_canon): convert from a global struct
	to a subclass of gimple_opt_pass
	(make_pass_iv_canon): New function to create an instance of the new
	class pass_iv_canon
	(struct gimple_opt_pass pass_scev_cprop): convert from a global struct
	to a subclass of gimple_opt_pass
	(make_pass_scev_cprop): New function to create an instance of the new
	class pass_scev_cprop
	(struct gimple_opt_pass pass_record_bounds): convert from a global
	struct to a subclass of gimple_opt_pass
	(make_pass_record_bounds): New function to create an instance of the
	new class pass_record_bounds
	(struct gimple_opt_pass pass_complete_unroll): convert from a global
	struct to a subclass of gimple_opt_pass
	(make_pass_complete_unroll): New function to create an instance of the
	new class pass_complete_unroll
	(struct gimple_opt_pass pass_complete_unrolli): convert from a global
	struct to a subclass of gimple_opt_pass
	(make_pass_complete_unrolli): New function to create an instance of
	the new class pass_complete_unrolli
	(struct gimple_opt_pass pass_parallelize_loops): convert from a global
	struct to a subclass of gimple_opt_pass
	(make_pass_parallelize_loops): New function to create an instance of
	the new class pass_parallelize_loops
	(struct gimple_opt_pass pass_loop_prefetch): convert from a global
	struct to a subclass of gimple_opt_pass
	(make_pass_loop_prefetch): New function to create an instance of the
	new class pass_loop_prefetch
	(struct gimple_opt_pass pass_iv_optimize): convert from a global
	struct to a subclass of gimple_opt_pass
	(make_pass_iv_optimize): New function to create an instance of the new
	class pass_iv_optimize
	(struct gimple_opt_pass pass_tree_loop_done): convert from a global
	struct to a subclass of gimple_opt_pass
	(make_pass_tree_loop_done): New function to create an instance of the
	new class pass_tree_loop_done
	* tree-ssa-math-opts.c (struct gimple_opt_pass pass_cse_reciprocals):
	convert from a global struct to a subclass of gimple_opt_pass
	(make_pass_cse_reciprocals): New function to create an instance of the
	new class pass_cse_reciprocals
	(struct gimple_opt_pass pass_cse_sincos): convert from a global struct
	to a subclass of gimple_opt_pass
	(make_pass_cse_sincos): New function to create an instance of the new
	class pass_cse_sincos
	(struct gimple_opt_pass pass_optimize_bswap): convert from a global
	struct to a subclass of gimple_opt_pass
	(make_pass_optimize_bswap): New function to create an instance of the
	new class pass_optimize_bswap
	(struct gimple_opt_pass pass_optimize_widening_mul): convert from a
	global struct to a subclass of gimple_opt_pass
	(make_pass_optimize_widening_mul): New function to create an instance
	of the new class pass_optimize_widening_mul
	* tree-ssa-phiopt.c (struct gimple_opt_pass pass_phiopt): convert from
	a global struct to a subclass of gimple_opt_pass
	(make_pass_phiopt): New function to create an instance of the new
	class pass_phiopt
	(struct gimple_opt_pass pass_cselim): convert from a global struct to
	a subclass of gimple_opt_pass
	(make_pass_cselim): New function to create an instance of the new
	class pass_cselim
	* tree-ssa-phiprop.c (struct gimple_opt_pass pass_phiprop): convert
	from a global struct to a subclass of gimple_opt_pass
	(make_pass_phiprop): New function to create an instance of the new
	class pass_phiprop
	* tree-ssa-pre.c (struct gimple_opt_pass pass_pre): convert from a
	global struct to a subclass of gimple_opt_pass
	(make_pass_pre): New function to create an instance of the new class
	pass_pre
	(struct gimple_opt_pass pass_fre): convert from a global struct to a
	subclass of gimple_opt_pass
	(make_pass_fre): New function to create an instance of the new class
	pass_fre
	* tree-ssa-reassoc.c (struct gimple_opt_pass pass_reassoc): convert
	from a global struct to a subclass of gimple_opt_pass
	(make_pass_reassoc): New function to create an instance of the new
	class pass_reassoc
	* tree-ssa-sink.c (struct gimple_opt_pass pass_sink_code): convert
	from a global struct to a subclass of gimple_opt_pass
	(make_pass_sink_code): New function to create an instance of the new
	class pass_sink_code
	* tree-ssa-strlen.c (struct gimple_opt_pass pass_strlen): convert from
	a global struct to a subclass of gimple_opt_pass
	(make_pass_strlen): New function to create an instance of the new
	class pass_strlen
	* tree-ssa-structalias.c (struct gimple_opt_pass pass_build_alias):
	convert from a global struct to a subclass of gimple_opt_pass
	(make_pass_build_alias): New function to create an instance of the new
	class pass_build_alias
	(struct gimple_opt_pass pass_build_ealias): convert from a global
	struct to a subclass of gimple_opt_pass
	(make_pass_build_ealias): New function to create an instance of the
	new class pass_build_ealias
	(struct simple_ipa_opt_pass pass_ipa_pta): convert from a global
	struct to a subclass of simple_ipa_opt_pass
	(make_pass_ipa_pta): New function to create an instance of the new
	class pass_ipa_pta
	* tree-ssa-uncprop.c (struct gimple_opt_pass pass_uncprop): convert
	from a global struct to a subclass of gimple_opt_pass
	(make_pass_uncprop): New function to create an instance of the new
	class pass_uncprop
	* tree-ssa-uninit.c (struct gimple_opt_pass
	pass_late_warn_uninitialized): convert from a global struct to a
	subclass of gimple_opt_pass
	(make_pass_late_warn_uninitialized): New function to create an
	instance of the new class pass_late_warn_uninitialized
	* tree-ssa.c (struct gimple_opt_pass pass_init_datastructures):
	convert from a global struct to a subclass of gimple_opt_pass
	(make_pass_init_datastructures): New function to create an instance of
	the new class pass_init_datastructures
	(struct gimple_opt_pass pass_early_warn_uninitialized): convert from a
	global struct to a subclass of gimple_opt_pass
	(make_pass_early_warn_uninitialized): New function to create an
	instance of the new class pass_early_warn_uninitialized
	(struct gimple_opt_pass pass_update_address_taken): convert from a
	global struct to a subclass of gimple_opt_pass
	(make_pass_update_address_taken): New function to create an instance
	of the new class pass_update_address_taken
	* tree-ssanames.c (struct gimple_opt_pass pass_release_ssa_names):
	convert from a global struct to a subclass of gimple_opt_pass
	(make_pass_release_ssa_names): New function to create an instance of
	the new class pass_release_ssa_names
	* tree-stdarg.c (struct gimple_opt_pass pass_stdarg): convert from a
	global struct to a subclass of gimple_opt_pass
	(make_pass_stdarg): New function to create an instance of the new
	class pass_stdarg
	* tree-switch-conversion.c (struct gimple_opt_pass
	pass_convert_switch): convert from a global struct to a subclass of
	gimple_opt_pass
	(make_pass_convert_switch): New function to create an instance of the
	new class pass_convert_switch
	* tree-tailcall.c (struct gimple_opt_pass pass_tail_recursion):
	convert from a global struct to a subclass of gimple_opt_pass
	(make_pass_tail_recursion): New function to create an instance of the
	new class pass_tail_recursion
	(struct gimple_opt_pass pass_tail_calls): convert from a global struct
	to a subclass of gimple_opt_pass
	(make_pass_tail_calls): New function to create an instance of the new
	class pass_tail_calls
	* tree-vect-generic.c (struct gimple_opt_pass pass_lower_vector):
	convert from a global struct to a subclass of gimple_opt_pass
	(make_pass_lower_vector): New function to create an instance of the
	new class pass_lower_vector
	(struct gimple_opt_pass pass_lower_vector_ssa): convert from a global
	struct to a subclass of gimple_opt_pass
	(make_pass_lower_vector_ssa): New function to create an instance of
	the new class pass_lower_vector_ssa
	* tree-vectorizer.c (struct gimple_opt_pass pass_slp_vectorize):
	convert from a global struct to a subclass of gimple_opt_pass
	(make_pass_slp_vectorize): New function to create an instance of the
	new class pass_slp_vectorize
	(struct simple_ipa_opt_pass pass_ipa_increase_alignment): convert from
	a global struct to a subclass of simple_ipa_opt_pass
	(make_pass_ipa_increase_alignment): New function to create an instance
	of the new class pass_ipa_increase_alignment
	* tree-vrp.c (struct gimple_opt_pass pass_vrp): convert from a global
	struct to a subclass of gimple_opt_pass
	(make_pass_vrp): New function to create an instance of the new class
	pass_vrp
	* tree.c (struct simple_ipa_opt_pass pass_ipa_free_lang_data): convert
	from a global struct to a subclass of simple_ipa_opt_pass
	(make_pass_ipa_free_lang_data): New function to create an instance of
	the new class pass_ipa_free_lang_data
	* tsan.c (struct gimple_opt_pass pass_tsan): convert from a global
	struct to a subclass of gimple_opt_pass
	(make_pass_tsan): New function to create an instance of the new class
	pass_tsan
	(struct gimple_opt_pass pass_tsan_O0): convert from a global struct to
	a subclass of gimple_opt_pass
	(make_pass_tsan_O0): New function to create an instance of the new
	class pass_tsan_O0
	* var-tracking.c (struct rtl_opt_pass pass_variable_tracking): convert
	from a global struct to a subclass of rtl_opt_pass
	(make_pass_variable_tracking): New function to create an instance of
	the new class pass_variable_tracking
	* web.c (struct rtl_opt_pass pass_web): convert from a global struct
	to a subclass of rtl_opt_pass
	(make_pass_web): New function to create an instance of the new class
	pass_web
	* config/epiphany/epiphany.h (struct rtl_opt_pass
	pass_mode_switch_use): replace declaration with that of new function
	make_pass_mode_switch_use
	(struct rtl_opt_pass pass_resolve_sw_modes): replace declaration with
	that of new function make_pass_resolve_sw_modes
	* config/epiphany/mode-switch-use.c (struct rtl_opt_pass
	pass_mode_switch_use): convert from a global struct to a subclass of
	rtl_opt_pass
	(make_pass_mode_switch_use): New function to create an instance of the
	new class pass_mode_switch_use
	* config/epiphany/resolve-sw-modes.c (struct rtl_opt_pass
	pass_resolve_sw_modes): convert from a global struct to a subclass of
	rtl_opt_pass
	(make_pass_resolve_sw_modes): New function to create an instance of
	the new class pass_resolve_sw_modes
	* config/i386/i386.c (struct rtl_opt_pass pass_insert_vzeroupper):
	convert from a global struct to a subclass of rtl_opt_pass
	(make_pass_insert_vzeroupper): New function to create an instance of
	the new class pass_insert_vzeroupper
	* config/sparc/sparc.c (struct rtl_opt_pass pass_work_around_errata):
	convert from a global struct to a subclass of rtl_opt_pass
	(make_pass_work_around_errata): New function to create an instance of
	the new class pass_work_around_errata
	* testsuite/gcc.dg/plugin/one_time_plugin.c (struct gimple_opt_pass
	one_pass): convert from a global struct to a subclass of
	gimple_opt_pass
	(make_one_pass): New function to create an instance of the new class
	one_pass
	* testsuite/gcc.dg/plugin/selfassign.c (struct gimple_opt_pass
	pass_warn_self_assign): convert from a global struct to a subclass of
	gimple_opt_pass
	(make_pass_warn_self_assign): New function to create an instance of
	the new class pass_warn_self_assign
	* testsuite/g++.dg/plugin/dumb_plugin.c (struct gimple_opt_pass
	pass_dumb_plugin_example): convert from a global struct to a subclass
	of gimple_opt_pass
	(make_pass_dumb_plugin_example): New function to create an instance of
	the new class pass_dumb_plugin_example
	* testsuite/g++.dg/plugin/selfassign.c (struct gimple_opt_pass
	pass_warn_self_assign): convert from a global struct to a subclass of
	gimple_opt_pass
	(make_pass_warn_self_assign): New function to create an instance of
	the new class pass_warn_self_assign
---
 gcc/ChangeLog                                 | 1399 +++++++++++++++++++++++++
 gcc/asan.c                                    |   94 +-
 gcc/auto-inc-dec.c                            |   46 +-
 gcc/bb-reorder.c                              |  140 ++-
 gcc/bt-load.c                                 |   96 +-
 gcc/cfgcleanup.c                              |   92 +-
 gcc/cfgexpand.c                               |   49 +-
 gcc/cfgrtl.c                                  |  138 ++-
 gcc/cgraphbuild.c                             |  138 ++-
 gcc/combine-stack-adj.c                       |   48 +-
 gcc/combine.c                                 |   46 +-
 gcc/compare-elim.c                            |   50 +-
 gcc/config/epiphany/epiphany.h                |    4 +-
 gcc/config/epiphany/mode-switch-use.c         |   46 +-
 gcc/config/epiphany/resolve-sw-modes.c        |   47 +-
 gcc/config/i386/i386.c                        |   49 +-
 gcc/config/sparc/sparc.c                      |   48 +-
 gcc/cprop.c                                   |   47 +-
 gcc/cse.c                                     |  143 ++-
 gcc/dce.c                                     |   92 +-
 gcc/df-core.c                                 |  142 ++-
 gcc/dse.c                                     |   96 +-
 gcc/dwarf2cfi.c                               |   48 +-
 gcc/except.c                                  |   96 +-
 gcc/final.c                                   |  186 ++--
 gcc/function.c                                |  197 ++--
 gcc/fwprop.c                                  |   94 +-
 gcc/gcse.c                                    |   94 +-
 gcc/gimple-low.c                              |   46 +-
 gcc/gimple-ssa-strength-reduction.c           |   48 +-
 gcc/ifcvt.c                                   |  143 ++-
 gcc/init-regs.c                               |   48 +-
 gcc/ipa-cp.c                                  |   90 +-
 gcc/ipa-inline-analysis.c                     |   48 +-
 gcc/ipa-inline.c                              |  130 ++-
 gcc/ipa-pure-const.c                          |  127 ++-
 gcc/ipa-reference.c                           |   85 +-
 gcc/ipa-split.c                               |   94 +-
 gcc/ipa.c                                     |  341 +++---
 gcc/ira.c                                     |   92 +-
 gcc/jump.c                                    |   46 +-
 gcc/loop-init.c                               |  324 +++---
 gcc/lower-subreg.c                            |   93 +-
 gcc/lto-streamer-out.c                        |  162 ++-
 gcc/mode-switching.c                          |   47 +-
 gcc/modulo-sched.c                            |   50 +-
 gcc/omp-low.c                                 |  138 ++-
 gcc/passes.c                                  |  290 +++--
 gcc/postreload-gcse.c                         |   47 +-
 gcc/postreload.c                              |   47 +-
 gcc/predict.c                                 |   98 +-
 gcc/recog.c                                   |  297 ++++--
 gcc/ree.c                                     |   47 +-
 gcc/reg-stack.c                               |   92 +-
 gcc/regcprop.c                                |   47 +-
 gcc/reginfo.c                                 |   46 +-
 gcc/regmove.c                                 |   46 +-
 gcc/regrename.c                               |   47 +-
 gcc/reorg.c                                   |   92 +-
 gcc/sched-rgn.c                               |   98 +-
 gcc/stack-ptr-mod.c                           |   46 +-
 gcc/store-motion.c                            |   47 +-
 gcc/testsuite/g++.dg/plugin/dumb_plugin.c     |   46 +-
 gcc/testsuite/g++.dg/plugin/selfassign.c      |   46 +-
 gcc/testsuite/gcc.dg/plugin/one_time_plugin.c |   46 +-
 gcc/testsuite/gcc.dg/plugin/selfassign.c      |   46 +-
 gcc/tracer.c                                  |   47 +-
 gcc/trans-mem.c                               |  336 +++---
 gcc/tree-call-cdce.c                          |   46 +-
 gcc/tree-cfg.c                                |  242 +++--
 gcc/tree-cfgcleanup.c                         |   46 +-
 gcc/tree-complex.c                            |   94 +-
 gcc/tree-eh.c                                 |  231 ++--
 gcc/tree-emutls.c                             |   46 +-
 gcc/tree-if-conv.c                            |   47 +-
 gcc/tree-into-ssa.c                           |   49 +-
 gcc/tree-loop-distribution.c                  |   46 +-
 gcc/tree-mudflap.c                            |   95 +-
 gcc/tree-nomudflap.c                          |   92 +-
 gcc/tree-nrv.c                                |   92 +-
 gcc/tree-object-size.c                        |   46 +-
 gcc/tree-optimize.c                           |   94 +-
 gcc/tree-pass.h                               |  458 ++++----
 gcc/tree-profile.c                            |   46 +-
 gcc/tree-sra.c                                |  140 ++-
 gcc/tree-ssa-ccp.c                            |   95 +-
 gcc/tree-ssa-copy.c                           |   48 +-
 gcc/tree-ssa-copyrename.c                     |   46 +-
 gcc/tree-ssa-dce.c                            |  143 ++-
 gcc/tree-ssa-dom.c                            |   98 +-
 gcc/tree-ssa-dse.c                            |   46 +-
 gcc/tree-ssa-forwprop.c                       |   49 +-
 gcc/tree-ssa-ifcombine.c                      |   47 +-
 gcc/tree-ssa-loop-ch.c                        |   48 +-
 gcc/tree-ssa-loop.c                           |  870 +++++++++------
 gcc/tree-ssa-math-opts.c                      |  188 ++--
 gcc/tree-ssa-phiopt.c                         |   96 +-
 gcc/tree-ssa-phiprop.c                        |   47 +-
 gcc/tree-ssa-pre.c                            |   93 +-
 gcc/tree-ssa-reassoc.c                        |   48 +-
 gcc/tree-ssa-sink.c                           |   49 +-
 gcc/tree-ssa-strlen.c                         |   46 +-
 gcc/tree-ssa-structalias.c                    |  144 ++-
 gcc/tree-ssa-uncprop.c                        |   46 +-
 gcc/tree-ssa-uninit.c                         |   48 +-
 gcc/tree-ssa.c                                |  140 ++-
 gcc/tree-ssanames.c                           |   46 +-
 gcc/tree-stdarg.c                             |   46 +-
 gcc/tree-switch-conversion.c                  |   49 +-
 gcc/tree-tailcall.c                           |   92 +-
 gcc/tree-vect-generic.c                       |  100 +-
 gcc/tree-vectorizer.c                         |   96 +-
 gcc/tree-vrp.c                                |   51 +-
 gcc/tree.c                                    |   48 +-
 gcc/tsan.c                                    |   92 +-
 gcc/var-tracking.c                            |   49 +-
 gcc/web.c                                     |   46 +-
 117 files changed, 8365 insertions(+), 4566 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 84c3d9c..397f535 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,1404 @@
 2013-04-19  David Malcolm  <dmalcolm@redhat.com>
 
+	Patch autogenerated by refactor.py from
+	https://github.com/davidmalcolm/gcc-refactoring-scripts
+	revision 31647b9efa0e413f85ef0b284f2ae8a95870d5f5
+
+	* asan.c (struct gimple_opt_pass pass_asan): convert from a global
+	struct to a subclass of gimple_opt_pass
+	(make_pass_asan): New function to create an instance of the new class
+	pass_asan
+	(struct gimple_opt_pass pass_asan_O0): convert from a global struct to
+	a subclass of gimple_opt_pass
+	(make_pass_asan_O0): New function to create an instance of the new
+	class pass_asan_O0
+	* auto-inc-dec.c (struct rtl_opt_pass pass_inc_dec): convert from a
+	global struct to a subclass of rtl_opt_pass
+	(make_pass_inc_dec): New function to create an instance of the new
+	class pass_inc_dec
+	* bb-reorder.c (struct rtl_opt_pass pass_reorder_blocks): convert from
+	a global struct to a subclass of rtl_opt_pass
+	(make_pass_reorder_blocks): New function to create an instance of the
+	new class pass_reorder_blocks
+	(struct rtl_opt_pass pass_duplicate_computed_gotos): convert from a
+	global struct to a subclass of rtl_opt_pass
+	(make_pass_duplicate_computed_gotos): New function to create an
+	instance of the new class pass_duplicate_computed_gotos
+	(struct rtl_opt_pass pass_partition_blocks): convert from a global
+	struct to a subclass of rtl_opt_pass
+	(make_pass_partition_blocks): New function to create an instance of
+	the new class pass_partition_blocks
+	* bt-load.c (struct rtl_opt_pass pass_branch_target_load_optimize1):
+	convert from a global struct to a subclass of rtl_opt_pass
+	(make_pass_branch_target_load_optimize1): New function to create an
+	instance of the new class pass_branch_target_load_optimize1
+	(struct rtl_opt_pass pass_branch_target_load_optimize2): convert from
+	a global struct to a subclass of rtl_opt_pass
+	(make_pass_branch_target_load_optimize2): New function to create an
+	instance of the new class pass_branch_target_load_optimize2
+	* cfgcleanup.c (struct rtl_opt_pass pass_jump): convert from a global
+	struct to a subclass of rtl_opt_pass
+	(make_pass_jump): New function to create an instance of the new class
+	pass_jump
+	(struct rtl_opt_pass pass_jump2): convert from a global struct to a
+	subclass of rtl_opt_pass
+	(make_pass_jump2): New function to create an instance of the new class
+	pass_jump2
+	* cfgexpand.c (struct rtl_opt_pass pass_expand): convert from a global
+	struct to a subclass of rtl_opt_pass
+	(make_pass_expand): New function to create an instance of the new
+	class pass_expand
+	* cfgrtl.c (struct rtl_opt_pass pass_free_cfg): convert from a global
+	struct to a subclass of rtl_opt_pass
+	(make_pass_free_cfg): New function to create an instance of the new
+	class pass_free_cfg
+	(struct rtl_opt_pass pass_into_cfg_layout_mode): convert from a global
+	struct to a subclass of rtl_opt_pass
+	(make_pass_into_cfg_layout_mode): New function to create an instance
+	of the new class pass_into_cfg_layout_mode
+	(struct rtl_opt_pass pass_outof_cfg_layout_mode): convert from a
+	global struct to a subclass of rtl_opt_pass
+	(make_pass_outof_cfg_layout_mode): New function to create an instance
+	of the new class pass_outof_cfg_layout_mode
+	* cgraphbuild.c (struct gimple_opt_pass pass_build_cgraph_edges):
+	convert from a global struct to a subclass of gimple_opt_pass
+	(make_pass_build_cgraph_edges): New function to create an instance of
+	the new class pass_build_cgraph_edges
+	(struct gimple_opt_pass pass_rebuild_cgraph_edges): convert from a
+	global struct to a subclass of gimple_opt_pass
+	(make_pass_rebuild_cgraph_edges): New function to create an instance
+	of the new class pass_rebuild_cgraph_edges
+	(struct gimple_opt_pass pass_remove_cgraph_callee_edges): convert from
+	a global struct to a subclass of gimple_opt_pass
+	(make_pass_remove_cgraph_callee_edges): New function to create an
+	instance of the new class pass_remove_cgraph_callee_edges
+	* combine-stack-adj.c (struct rtl_opt_pass pass_stack_adjustments):
+	convert from a global struct to a subclass of rtl_opt_pass
+	(make_pass_stack_adjustments): New function to create an instance of
+	the new class pass_stack_adjustments
+	* combine.c (struct rtl_opt_pass pass_combine): convert from a global
+	struct to a subclass of rtl_opt_pass
+	(make_pass_combine): New function to create an instance of the new
+	class pass_combine
+	* compare-elim.c (struct rtl_opt_pass pass_compare_elim_after_reload):
+	convert from a global struct to a subclass of rtl_opt_pass
+	(make_pass_compare_elim_after_reload): New function to create an
+	instance of the new class pass_compare_elim_after_reload
+	* cprop.c (struct rtl_opt_pass pass_rtl_cprop): convert from a global
+	struct to a subclass of rtl_opt_pass
+	(make_pass_rtl_cprop): New function to create an instance of the new
+	class pass_rtl_cprop
+	* cse.c (struct rtl_opt_pass pass_cse): convert from a global struct
+	to a subclass of rtl_opt_pass
+	(make_pass_cse): New function to create an instance of the new class
+	pass_cse
+	(struct rtl_opt_pass pass_cse2): convert from a global struct to a
+	subclass of rtl_opt_pass
+	(make_pass_cse2): New function to create an instance of the new class
+	pass_cse2
+	(struct rtl_opt_pass pass_cse_after_global_opts): convert from a
+	global struct to a subclass of rtl_opt_pass
+	(make_pass_cse_after_global_opts): New function to create an instance
+	of the new class pass_cse_after_global_opts
+	* dce.c (struct rtl_opt_pass pass_ud_rtl_dce): convert from a global
+	struct to a subclass of rtl_opt_pass
+	(make_pass_ud_rtl_dce): New function to create an instance of the new
+	class pass_ud_rtl_dce
+	(struct rtl_opt_pass pass_fast_rtl_dce): convert from a global struct
+	to a subclass of rtl_opt_pass
+	(make_pass_fast_rtl_dce): New function to create an instance of the
+	new class pass_fast_rtl_dce
+	* df-core.c (struct rtl_opt_pass pass_df_initialize_opt): convert from
+	a global struct to a subclass of rtl_opt_pass
+	(make_pass_df_initialize_opt): New function to create an instance of
+	the new class pass_df_initialize_opt
+	(struct rtl_opt_pass pass_df_initialize_no_opt): convert from a global
+	struct to a subclass of rtl_opt_pass
+	(make_pass_df_initialize_no_opt): New function to create an instance
+	of the new class pass_df_initialize_no_opt
+	(struct rtl_opt_pass pass_df_finish): convert from a global struct to
+	a subclass of rtl_opt_pass
+	(make_pass_df_finish): New function to create an instance of the new
+	class pass_df_finish
+	* dse.c (struct rtl_opt_pass pass_rtl_dse1): convert from a global
+	struct to a subclass of rtl_opt_pass
+	(make_pass_rtl_dse1): New function to create an instance of the new
+	class pass_rtl_dse1
+	(struct rtl_opt_pass pass_rtl_dse2): convert from a global struct to a
+	subclass of rtl_opt_pass
+	(make_pass_rtl_dse2): New function to create an instance of the new
+	class pass_rtl_dse2
+	* dwarf2cfi.c (struct rtl_opt_pass pass_dwarf2_frame): convert from a
+	global struct to a subclass of rtl_opt_pass
+	(make_pass_dwarf2_frame): New function to create an instance of the
+	new class pass_dwarf2_frame
+	* except.c (struct rtl_opt_pass pass_set_nothrow_function_flags):
+	convert from a global struct to a subclass of rtl_opt_pass
+	(make_pass_set_nothrow_function_flags): New function to create an
+	instance of the new class pass_set_nothrow_function_flags
+	(struct rtl_opt_pass pass_convert_to_eh_region_ranges): convert from a
+	global struct to a subclass of rtl_opt_pass
+	(make_pass_convert_to_eh_region_ranges): New function to create an
+	instance of the new class pass_convert_to_eh_region_ranges
+	* final.c (struct rtl_opt_pass pass_compute_alignments): convert from
+	a global struct to a subclass of rtl_opt_pass
+	(make_pass_compute_alignments): New function to create an instance of
+	the new class pass_compute_alignments
+	(struct rtl_opt_pass pass_final): convert from a global struct to a
+	subclass of rtl_opt_pass
+	(make_pass_final): New function to create an instance of the new class
+	pass_final
+	(struct rtl_opt_pass pass_shorten_branches): convert from a global
+	struct to a subclass of rtl_opt_pass
+	(make_pass_shorten_branches): New function to create an instance of
+	the new class pass_shorten_branches
+	(struct rtl_opt_pass pass_clean_state): convert from a global struct
+	to a subclass of rtl_opt_pass
+	(make_pass_clean_state): New function to create an instance of the new
+	class pass_clean_state
+	* function.c (struct rtl_opt_pass pass_instantiate_virtual_regs):
+	convert from a global struct to a subclass of rtl_opt_pass
+	(make_pass_instantiate_virtual_regs): New function to create an
+	instance of the new class pass_instantiate_virtual_regs
+	(struct rtl_opt_pass pass_leaf_regs): convert from a global struct to
+	a subclass of rtl_opt_pass
+	(make_pass_leaf_regs): New function to create an instance of the new
+	class pass_leaf_regs
+	(struct rtl_opt_pass pass_thread_prologue_and_epilogue): convert from
+	a global struct to a subclass of rtl_opt_pass
+	(make_pass_thread_prologue_and_epilogue): New function to create an
+	instance of the new class pass_thread_prologue_and_epilogue
+	(struct rtl_opt_pass pass_match_asm_constraints): convert from a
+	global struct to a subclass of rtl_opt_pass
+	(make_pass_match_asm_constraints): New function to create an instance
+	of the new class pass_match_asm_constraints
+	* fwprop.c (struct rtl_opt_pass pass_rtl_fwprop): convert from a
+	global struct to a subclass of rtl_opt_pass
+	(make_pass_rtl_fwprop): New function to create an instance of the new
+	class pass_rtl_fwprop
+	(struct rtl_opt_pass pass_rtl_fwprop_addr): convert from a global
+	struct to a subclass of rtl_opt_pass
+	(make_pass_rtl_fwprop_addr): New function to create an instance of the
+	new class pass_rtl_fwprop_addr
+	* gcse.c (struct rtl_opt_pass pass_rtl_pre): convert from a global
+	struct to a subclass of rtl_opt_pass
+	(make_pass_rtl_pre): New function to create an instance of the new
+	class pass_rtl_pre
+	(struct rtl_opt_pass pass_rtl_hoist): convert from a global struct to
+	a subclass of rtl_opt_pass
+	(make_pass_rtl_hoist): New function to create an instance of the new
+	class pass_rtl_hoist
+	* gimple-low.c (struct gimple_opt_pass pass_lower_cf): convert from a
+	global struct to a subclass of gimple_opt_pass
+	(make_pass_lower_cf): New function to create an instance of the new
+	class pass_lower_cf
+	* gimple-ssa-strength-reduction.c (struct gimple_opt_pass
+	pass_strength_reduction): convert from a global struct to a subclass
+	of gimple_opt_pass
+	(make_pass_strength_reduction): New function to create an instance of
+	the new class pass_strength_reduction
+	* ifcvt.c (struct rtl_opt_pass pass_rtl_ifcvt): convert from a global
+	struct to a subclass of rtl_opt_pass
+	(make_pass_rtl_ifcvt): New function to create an instance of the new
+	class pass_rtl_ifcvt
+	(struct rtl_opt_pass pass_if_after_combine): convert from a global
+	struct to a subclass of rtl_opt_pass
+	(make_pass_if_after_combine): New function to create an instance of
+	the new class pass_if_after_combine
+	(struct rtl_opt_pass pass_if_after_reload): convert from a global
+	struct to a subclass of rtl_opt_pass
+	(make_pass_if_after_reload): New function to create an instance of the
+	new class pass_if_after_reload
+	* init-regs.c (struct rtl_opt_pass pass_initialize_regs): convert from
+	a global struct to a subclass of rtl_opt_pass
+	(make_pass_initialize_regs): New function to create an instance of the
+	new class pass_initialize_regs
+	* ipa-cp.c (struct ipa_opt_pass_d pass_ipa_cp): convert from a global
+	struct to a subclass of ipa_opt_pass_d
+	(make_pass_ipa_cp): New function to create an instance of the new
+	class pass_ipa_cp
+	* ipa-inline-analysis.c (struct gimple_opt_pass
+	pass_inline_parameters): convert from a global struct to a subclass of
+	gimple_opt_pass
+	(make_pass_inline_parameters): New function to create an instance of
+	the new class pass_inline_parameters
+	* ipa-inline.c (struct gimple_opt_pass pass_early_inline): convert
+	from a global struct to a subclass of gimple_opt_pass
+	(make_pass_early_inline): New function to create an instance of the
+	new class pass_early_inline
+	(struct ipa_opt_pass_d pass_ipa_inline): convert from a global struct
+	to a subclass of ipa_opt_pass_d
+	(make_pass_ipa_inline): New function to create an instance of the new
+	class pass_ipa_inline
+	* ipa-pure-const.c (struct gimple_opt_pass pass_local_pure_const):
+	convert from a global struct to a subclass of gimple_opt_pass
+	(make_pass_local_pure_const): New function to create an instance of
+	the new class pass_local_pure_const
+	(struct ipa_opt_pass_d pass_ipa_pure_const): convert from a global
+	struct to a subclass of ipa_opt_pass_d
+	(make_pass_ipa_pure_const): New function to create an instance of the
+	new class pass_ipa_pure_const
+	* ipa-reference.c (struct ipa_opt_pass_d pass_ipa_reference): convert
+	from a global struct to a subclass of ipa_opt_pass_d
+	(make_pass_ipa_reference): New function to create an instance of the
+	new class pass_ipa_reference
+	* ipa-split.c (struct gimple_opt_pass pass_split_functions): convert
+	from a global struct to a subclass of gimple_opt_pass
+	(make_pass_split_functions): New function to create an instance of the
+	new class pass_split_functions
+	(struct gimple_opt_pass pass_feedback_split_functions): convert from a
+	global struct to a subclass of gimple_opt_pass
+	(make_pass_feedback_split_functions): New function to create an
+	instance of the new class pass_feedback_split_functions
+	* ipa.c (struct simple_ipa_opt_pass
+	pass_ipa_function_and_variable_visibility): convert from a global
+	struct to a subclass of simple_ipa_opt_pass
+	(make_pass_ipa_function_and_variable_visibility): New function to
+	create an instance of the new class
+	pass_ipa_function_and_variable_visibility
+	(struct simple_ipa_opt_pass pass_ipa_free_inline_summary): convert
+	from a global struct to a subclass of simple_ipa_opt_pass
+	(make_pass_ipa_free_inline_summary): New function to create an
+	instance of the new class pass_ipa_free_inline_summary
+	(struct ipa_opt_pass_d pass_ipa_whole_program_visibility): convert
+	from a global struct to a subclass of ipa_opt_pass_d
+	(make_pass_ipa_whole_program_visibility): New function to create an
+	instance of the new class pass_ipa_whole_program_visibility
+	(struct ipa_opt_pass_d pass_ipa_profile): convert from a global struct
+	to a subclass of ipa_opt_pass_d
+	(make_pass_ipa_profile): New function to create an instance of the new
+	class pass_ipa_profile
+	(struct ipa_opt_pass_d pass_ipa_cdtor_merge): convert from a global
+	struct to a subclass of ipa_opt_pass_d
+	(make_pass_ipa_cdtor_merge): New function to create an instance of the
+	new class pass_ipa_cdtor_merge
+	* ira.c (struct rtl_opt_pass pass_ira): convert from a global struct
+	to a subclass of rtl_opt_pass
+	(make_pass_ira): New function to create an instance of the new class
+	pass_ira
+	(struct rtl_opt_pass pass_reload): convert from a global struct to a
+	subclass of rtl_opt_pass
+	(make_pass_reload): New function to create an instance of the new
+	class pass_reload
+	* jump.c (struct rtl_opt_pass pass_cleanup_barriers): convert from a
+	global struct to a subclass of rtl_opt_pass
+	(make_pass_cleanup_barriers): New function to create an instance of
+	the new class pass_cleanup_barriers
+	* loop-init.c (struct rtl_opt_pass pass_loop2): convert from a global
+	struct to a subclass of rtl_opt_pass
+	(make_pass_loop2): New function to create an instance of the new class
+	pass_loop2
+	(struct rtl_opt_pass pass_rtl_loop_init): convert from a global struct
+	to a subclass of rtl_opt_pass
+	(make_pass_rtl_loop_init): New function to create an instance of the
+	new class pass_rtl_loop_init
+	(struct rtl_opt_pass pass_rtl_loop_done): convert from a global struct
+	to a subclass of rtl_opt_pass
+	(make_pass_rtl_loop_done): New function to create an instance of the
+	new class pass_rtl_loop_done
+	(struct rtl_opt_pass pass_rtl_move_loop_invariants): convert from a
+	global struct to a subclass of rtl_opt_pass
+	(make_pass_rtl_move_loop_invariants): New function to create an
+	instance of the new class pass_rtl_move_loop_invariants
+	(struct rtl_opt_pass pass_rtl_unswitch): convert from a global struct
+	to a subclass of rtl_opt_pass
+	(make_pass_rtl_unswitch): New function to create an instance of the
+	new class pass_rtl_unswitch
+	(struct rtl_opt_pass pass_rtl_unroll_and_peel_loops): convert from a
+	global struct to a subclass of rtl_opt_pass
+	(make_pass_rtl_unroll_and_peel_loops): New function to create an
+	instance of the new class pass_rtl_unroll_and_peel_loops
+	(struct rtl_opt_pass pass_rtl_doloop): convert from a global struct to
+	a subclass of rtl_opt_pass
+	(make_pass_rtl_doloop): New function to create an instance of the new
+	class pass_rtl_doloop
+	* lower-subreg.c (struct rtl_opt_pass pass_lower_subreg): convert from
+	a global struct to a subclass of rtl_opt_pass
+	(make_pass_lower_subreg): New function to create an instance of the
+	new class pass_lower_subreg
+	(struct rtl_opt_pass pass_lower_subreg2): convert from a global struct
+	to a subclass of rtl_opt_pass
+	(make_pass_lower_subreg2): New function to create an instance of the
+	new class pass_lower_subreg2
+	* lto-streamer-out.c (struct ipa_opt_pass_d pass_ipa_lto_gimple_out):
+	convert from a global struct to a subclass of ipa_opt_pass_d
+	(make_pass_ipa_lto_gimple_out): New function to create an instance of
+	the new class pass_ipa_lto_gimple_out
+	(struct ipa_opt_pass_d pass_ipa_lto_finish_out): convert from a global
+	struct to a subclass of ipa_opt_pass_d
+	(make_pass_ipa_lto_finish_out): New function to create an instance of
+	the new class pass_ipa_lto_finish_out
+	* mode-switching.c (struct rtl_opt_pass pass_mode_switching): convert
+	from a global struct to a subclass of rtl_opt_pass
+	(make_pass_mode_switching): New function to create an instance of the
+	new class pass_mode_switching
+	* modulo-sched.c (struct rtl_opt_pass pass_sms): convert from a global
+	struct to a subclass of rtl_opt_pass
+	(make_pass_sms): New function to create an instance of the new class
+	pass_sms
+	* omp-low.c (struct gimple_opt_pass pass_expand_omp): convert from a
+	global struct to a subclass of gimple_opt_pass
+	(make_pass_expand_omp): New function to create an instance of the new
+	class pass_expand_omp
+	(struct gimple_opt_pass pass_lower_omp): convert from a global struct
+	to a subclass of gimple_opt_pass
+	(make_pass_lower_omp): New function to create an instance of the new
+	class pass_lower_omp
+	(struct gimple_opt_pass pass_diagnose_omp_blocks): convert from a
+	global struct to a subclass of gimple_opt_pass
+	(make_pass_diagnose_omp_blocks): New function to create an instance of
+	the new class pass_diagnose_omp_blocks
+	* passes.c (struct simple_ipa_opt_pass pass_early_local_passes):
+	convert from a global struct to a subclass of simple_ipa_opt_pass
+	(make_pass_early_local_passes): New function to create an instance of
+	the new class pass_early_local_passes
+	(struct gimple_opt_pass pass_all_early_optimizations): convert from a
+	global struct to a subclass of gimple_opt_pass
+	(make_pass_all_early_optimizations): New function to create an
+	instance of the new class pass_all_early_optimizations
+	(struct gimple_opt_pass pass_all_optimizations): convert from a global
+	struct to a subclass of gimple_opt_pass
+	(make_pass_all_optimizations): New function to create an instance of
+	the new class pass_all_optimizations
+	(struct gimple_opt_pass pass_all_optimizations_g): convert from a
+	global struct to a subclass of gimple_opt_pass
+	(make_pass_all_optimizations_g): New function to create an instance of
+	the new class pass_all_optimizations_g
+	(struct rtl_opt_pass pass_rest_of_compilation): convert from a global
+	struct to a subclass of rtl_opt_pass
+	(make_pass_rest_of_compilation): New function to create an instance of
+	the new class pass_rest_of_compilation
+	(struct rtl_opt_pass pass_postreload): convert from a global struct to
+	a subclass of rtl_opt_pass
+	(make_pass_postreload): New function to create an instance of the new
+	class pass_postreload
+	* postreload-gcse.c (struct rtl_opt_pass pass_gcse2): convert from a
+	global struct to a subclass of rtl_opt_pass
+	(make_pass_gcse2): New function to create an instance of the new class
+	pass_gcse2
+	* postreload.c (struct rtl_opt_pass pass_postreload_cse): convert from
+	a global struct to a subclass of rtl_opt_pass
+	(make_pass_postreload_cse): New function to create an instance of the
+	new class pass_postreload_cse
+	* predict.c (struct gimple_opt_pass pass_profile): convert from a
+	global struct to a subclass of gimple_opt_pass
+	(make_pass_profile): New function to create an instance of the new
+	class pass_profile
+	(struct gimple_opt_pass pass_strip_predict_hints): convert from a
+	global struct to a subclass of gimple_opt_pass
+	(make_pass_strip_predict_hints): New function to create an instance of
+	the new class pass_strip_predict_hints
+	* recog.c (struct rtl_opt_pass pass_peephole2): convert from a global
+	struct to a subclass of rtl_opt_pass
+	(make_pass_peephole2): New function to create an instance of the new
+	class pass_peephole2
+	(struct rtl_opt_pass pass_split_all_insns): convert from a global
+	struct to a subclass of rtl_opt_pass
+	(make_pass_split_all_insns): New function to create an instance of the
+	new class pass_split_all_insns
+	(struct rtl_opt_pass pass_split_after_reload): convert from a global
+	struct to a subclass of rtl_opt_pass
+	(make_pass_split_after_reload): New function to create an instance of
+	the new class pass_split_after_reload
+	(struct rtl_opt_pass pass_split_before_regstack): convert from a
+	global struct to a subclass of rtl_opt_pass
+	(make_pass_split_before_regstack): New function to create an instance
+	of the new class pass_split_before_regstack
+	(struct rtl_opt_pass pass_split_before_sched2): convert from a global
+	struct to a subclass of rtl_opt_pass
+	(make_pass_split_before_sched2): New function to create an instance of
+	the new class pass_split_before_sched2
+	(struct rtl_opt_pass pass_split_for_shorten_branches): convert from a
+	global struct to a subclass of rtl_opt_pass
+	(make_pass_split_for_shorten_branches): New function to create an
+	instance of the new class pass_split_for_shorten_branches
+	* ree.c (struct rtl_opt_pass pass_ree): convert from a global struct
+	to a subclass of rtl_opt_pass
+	(make_pass_ree): New function to create an instance of the new class
+	pass_ree
+	* reg-stack.c (struct rtl_opt_pass pass_stack_regs): convert from a
+	global struct to a subclass of rtl_opt_pass
+	(make_pass_stack_regs): New function to create an instance of the new
+	class pass_stack_regs
+	(struct rtl_opt_pass pass_stack_regs_run): convert from a global
+	struct to a subclass of rtl_opt_pass
+	(make_pass_stack_regs_run): New function to create an instance of the
+	new class pass_stack_regs_run
+	* regcprop.c (struct rtl_opt_pass pass_cprop_hardreg): convert from a
+	global struct to a subclass of rtl_opt_pass
+	(make_pass_cprop_hardreg): New function to create an instance of the
+	new class pass_cprop_hardreg
+	* reginfo.c (struct rtl_opt_pass pass_reginfo_init): convert from a
+	global struct to a subclass of rtl_opt_pass
+	(make_pass_reginfo_init): New function to create an instance of the
+	new class pass_reginfo_init
+	* regmove.c (struct rtl_opt_pass pass_regmove): convert from a global
+	struct to a subclass of rtl_opt_pass
+	(make_pass_regmove): New function to create an instance of the new
+	class pass_regmove
+	* regrename.c (struct rtl_opt_pass pass_regrename): convert from a
+	global struct to a subclass of rtl_opt_pass
+	(make_pass_regrename): New function to create an instance of the new
+	class pass_regrename
+	* reorg.c (struct rtl_opt_pass pass_delay_slots): convert from a
+	global struct to a subclass of rtl_opt_pass
+	(make_pass_delay_slots): New function to create an instance of the new
+	class pass_delay_slots
+	(struct rtl_opt_pass pass_machine_reorg): convert from a global struct
+	to a subclass of rtl_opt_pass
+	(make_pass_machine_reorg): New function to create an instance of the
+	new class pass_machine_reorg
+	* sched-rgn.c (struct rtl_opt_pass pass_sched): convert from a global
+	struct to a subclass of rtl_opt_pass
+	(make_pass_sched): New function to create an instance of the new class
+	pass_sched
+	(struct rtl_opt_pass pass_sched2): convert from a global struct to a
+	subclass of rtl_opt_pass
+	(make_pass_sched2): New function to create an instance of the new
+	class pass_sched2
+	* stack-ptr-mod.c (struct rtl_opt_pass pass_stack_ptr_mod): convert
+	from a global struct to a subclass of rtl_opt_pass
+	(make_pass_stack_ptr_mod): New function to create an instance of the
+	new class pass_stack_ptr_mod
+	* store-motion.c (struct rtl_opt_pass pass_rtl_store_motion): convert
+	from a global struct to a subclass of rtl_opt_pass
+	(make_pass_rtl_store_motion): New function to create an instance of
+	the new class pass_rtl_store_motion
+	* tracer.c (struct gimple_opt_pass pass_tracer): convert from a global
+	struct to a subclass of gimple_opt_pass
+	(make_pass_tracer): New function to create an instance of the new
+	class pass_tracer
+	* trans-mem.c (struct gimple_opt_pass pass_diagnose_tm_blocks):
+	convert from a global struct to a subclass of gimple_opt_pass
+	(make_pass_diagnose_tm_blocks): New function to create an instance of
+	the new class pass_diagnose_tm_blocks
+	(struct gimple_opt_pass pass_lower_tm): convert from a global struct
+	to a subclass of gimple_opt_pass
+	(make_pass_lower_tm): New function to create an instance of the new
+	class pass_lower_tm
+	(struct gimple_opt_pass pass_tm_init): convert from a global struct to
+	a subclass of gimple_opt_pass
+	(make_pass_tm_init): New function to create an instance of the new
+	class pass_tm_init
+	(struct gimple_opt_pass pass_tm_mark): convert from a global struct to
+	a subclass of gimple_opt_pass
+	(make_pass_tm_mark): New function to create an instance of the new
+	class pass_tm_mark
+	(struct gimple_opt_pass pass_tm_edges): convert from a global struct
+	to a subclass of gimple_opt_pass
+	(make_pass_tm_edges): New function to create an instance of the new
+	class pass_tm_edges
+	(struct gimple_opt_pass pass_tm_memopt): convert from a global struct
+	to a subclass of gimple_opt_pass
+	(make_pass_tm_memopt): New function to create an instance of the new
+	class pass_tm_memopt
+	(struct simple_ipa_opt_pass pass_ipa_tm): convert from a global struct
+	to a subclass of simple_ipa_opt_pass
+	(make_pass_ipa_tm): New function to create an instance of the new
+	class pass_ipa_tm
+	* tree-call-cdce.c (struct gimple_opt_pass pass_call_cdce): convert
+	from a global struct to a subclass of gimple_opt_pass
+	(make_pass_call_cdce): New function to create an instance of the new
+	class pass_call_cdce
+	* tree-cfg.c (struct gimple_opt_pass pass_build_cfg): convert from a
+	global struct to a subclass of gimple_opt_pass
+	(make_pass_build_cfg): New function to create an instance of the new
+	class pass_build_cfg
+	(struct gimple_opt_pass pass_split_crit_edges): convert from a global
+	struct to a subclass of gimple_opt_pass
+	(make_pass_split_crit_edges): New function to create an instance of
+	the new class pass_split_crit_edges
+	(struct gimple_opt_pass pass_warn_function_return): convert from a
+	global struct to a subclass of gimple_opt_pass
+	(make_pass_warn_function_return): New function to create an instance
+	of the new class pass_warn_function_return
+	(struct gimple_opt_pass pass_warn_function_noreturn): convert from a
+	global struct to a subclass of gimple_opt_pass
+	(make_pass_warn_function_noreturn): New function to create an instance
+	of the new class pass_warn_function_noreturn
+	(struct gimple_opt_pass pass_warn_unused_result): convert from a
+	global struct to a subclass of gimple_opt_pass
+	(make_pass_warn_unused_result): New function to create an instance of
+	the new class pass_warn_unused_result
+	* tree-cfgcleanup.c (struct gimple_opt_pass pass_merge_phi): convert
+	from a global struct to a subclass of gimple_opt_pass
+	(make_pass_merge_phi): New function to create an instance of the new
+	class pass_merge_phi
+	* tree-complex.c (struct gimple_opt_pass pass_lower_complex): convert
+	from a global struct to a subclass of gimple_opt_pass
+	(make_pass_lower_complex): New function to create an instance of the
+	new class pass_lower_complex
+	(struct gimple_opt_pass pass_lower_complex_O0): convert from a global
+	struct to a subclass of gimple_opt_pass
+	(make_pass_lower_complex_O0): New function to create an instance of
+	the new class pass_lower_complex_O0
+	* tree-eh.c (struct gimple_opt_pass pass_lower_eh): convert from a
+	global struct to a subclass of gimple_opt_pass
+	(make_pass_lower_eh): New function to create an instance of the new
+	class pass_lower_eh
+	(struct gimple_opt_pass pass_refactor_eh): convert from a global
+	struct to a subclass of gimple_opt_pass
+	(make_pass_refactor_eh): New function to create an instance of the new
+	class pass_refactor_eh
+	(struct gimple_opt_pass pass_lower_resx): convert from a global struct
+	to a subclass of gimple_opt_pass
+	(make_pass_lower_resx): New function to create an instance of the new
+	class pass_lower_resx
+	(struct gimple_opt_pass pass_lower_eh_dispatch): convert from a global
+	struct to a subclass of gimple_opt_pass
+	(make_pass_lower_eh_dispatch): New function to create an instance of
+	the new class pass_lower_eh_dispatch
+	(struct gimple_opt_pass pass_cleanup_eh): convert from a global struct
+	to a subclass of gimple_opt_pass
+	(make_pass_cleanup_eh): New function to create an instance of the new
+	class pass_cleanup_eh
+	* tree-emutls.c (struct simple_ipa_opt_pass pass_ipa_lower_emutls):
+	convert from a global struct to a subclass of simple_ipa_opt_pass
+	(make_pass_ipa_lower_emutls): New function to create an instance of
+	the new class pass_ipa_lower_emutls
+	* tree-if-conv.c (struct gimple_opt_pass pass_if_conversion): convert
+	from a global struct to a subclass of gimple_opt_pass
+	(make_pass_if_conversion): New function to create an instance of the
+	new class pass_if_conversion
+	* tree-into-ssa.c (struct gimple_opt_pass pass_build_ssa): convert
+	from a global struct to a subclass of gimple_opt_pass
+	(make_pass_build_ssa): New function to create an instance of the new
+	class pass_build_ssa
+	* tree-loop-distribution.c (struct gimple_opt_pass
+	pass_loop_distribution): convert from a global struct to a subclass of
+	gimple_opt_pass
+	(make_pass_loop_distribution): New function to create an instance of
+	the new class pass_loop_distribution
+	* tree-mudflap.c (struct gimple_opt_pass pass_mudflap_1): convert from
+	a global struct to a subclass of gimple_opt_pass
+	(make_pass_mudflap_1): New function to create an instance of the new
+	class pass_mudflap_1
+	(struct gimple_opt_pass pass_mudflap_2): convert from a global struct
+	to a subclass of gimple_opt_pass
+	(make_pass_mudflap_2): New function to create an instance of the new
+	class pass_mudflap_2
+	* tree-nomudflap.c (struct gimple_opt_pass pass_mudflap_1): convert
+	from a global struct to a subclass of gimple_opt_pass
+	(make_pass_mudflap_1): New function to create an instance of the new
+	class pass_mudflap_1
+	(struct gimple_opt_pass pass_mudflap_2): convert from a global struct
+	to a subclass of gimple_opt_pass
+	(make_pass_mudflap_2): New function to create an instance of the new
+	class pass_mudflap_2
+	* tree-nrv.c (struct gimple_opt_pass pass_nrv): convert from a global
+	struct to a subclass of gimple_opt_pass
+	(make_pass_nrv): New function to create an instance of the new class
+	pass_nrv
+	(struct gimple_opt_pass pass_return_slot): convert from a global
+	struct to a subclass of gimple_opt_pass
+	(make_pass_return_slot): New function to create an instance of the new
+	class pass_return_slot
+	* tree-object-size.c (struct gimple_opt_pass pass_object_sizes):
+	convert from a global struct to a subclass of gimple_opt_pass
+	(make_pass_object_sizes): New function to create an instance of the
+	new class pass_object_sizes
+	* tree-optimize.c (struct gimple_opt_pass
+	pass_cleanup_cfg_post_optimizing): convert from a global struct to a
+	subclass of gimple_opt_pass
+	(make_pass_cleanup_cfg_post_optimizing): New function to create an
+	instance of the new class pass_cleanup_cfg_post_optimizing
+	(struct gimple_opt_pass pass_fixup_cfg): convert from a global struct
+	to a subclass of gimple_opt_pass
+	(make_pass_fixup_cfg): New function to create an instance of the new
+	class pass_fixup_cfg
+	* tree-pass.h (struct gimple_opt_pass pass_mudflap_1): replace
+	declaration with that of new function make_pass_mudflap_1
+	(struct gimple_opt_pass pass_mudflap_2): replace declaration with that
+	of new function make_pass_mudflap_2
+	(struct gimple_opt_pass pass_asan): replace declaration with that of
+	new function make_pass_asan
+	(struct gimple_opt_pass pass_asan_O0): replace declaration with that
+	of new function make_pass_asan_O0
+	(struct gimple_opt_pass pass_tsan): replace declaration with that of
+	new function make_pass_tsan
+	(struct gimple_opt_pass pass_tsan_O0): replace declaration with that
+	of new function make_pass_tsan_O0
+	(struct gimple_opt_pass pass_lower_cf): replace declaration with that
+	of new function make_pass_lower_cf
+	(struct gimple_opt_pass pass_refactor_eh): replace declaration with
+	that of new function make_pass_refactor_eh
+	(struct gimple_opt_pass pass_lower_eh): replace declaration with that
+	of new function make_pass_lower_eh
+	(struct gimple_opt_pass pass_lower_eh_dispatch): replace declaration
+	with that of new function make_pass_lower_eh_dispatch
+	(struct gimple_opt_pass pass_lower_resx): replace declaration with
+	that of new function make_pass_lower_resx
+	(struct gimple_opt_pass pass_build_cfg): replace declaration with that
+	of new function make_pass_build_cfg
+	(struct gimple_opt_pass pass_early_tree_profile): replace declaration
+	with that of new function make_pass_early_tree_profile
+	(struct gimple_opt_pass pass_cleanup_eh): replace declaration with
+	that of new function make_pass_cleanup_eh
+	(struct gimple_opt_pass pass_sra): replace declaration with that of
+	new function make_pass_sra
+	(struct gimple_opt_pass pass_sra_early): replace declaration with that
+	of new function make_pass_sra_early
+	(struct gimple_opt_pass pass_early_ipa_sra): replace declaration with
+	that of new function make_pass_early_ipa_sra
+	(struct gimple_opt_pass pass_tail_recursion): replace declaration with
+	that of new function make_pass_tail_recursion
+	(struct gimple_opt_pass pass_tail_calls): replace declaration with
+	that of new function make_pass_tail_calls
+	(struct gimple_opt_pass pass_tree_loop): replace declaration with that
+	of new function make_pass_tree_loop
+	(struct gimple_opt_pass pass_tree_loop_init): replace declaration with
+	that of new function make_pass_tree_loop_init
+	(struct gimple_opt_pass pass_lim): replace declaration with that of
+	new function make_pass_lim
+	(struct gimple_opt_pass pass_tree_unswitch): replace declaration with
+	that of new function make_pass_tree_unswitch
+	(struct gimple_opt_pass pass_predcom): replace declaration with that
+	of new function make_pass_predcom
+	(struct gimple_opt_pass pass_iv_canon): replace declaration with that
+	of new function make_pass_iv_canon
+	(struct gimple_opt_pass pass_scev_cprop): replace declaration with
+	that of new function make_pass_scev_cprop
+	(struct gimple_opt_pass pass_empty_loop): replace declaration with
+	that of new function make_pass_empty_loop
+	(struct gimple_opt_pass pass_record_bounds): replace declaration with
+	that of new function make_pass_record_bounds
+	(struct gimple_opt_pass pass_graphite): replace declaration with that
+	of new function make_pass_graphite
+	(struct gimple_opt_pass pass_graphite_transforms): replace declaration
+	with that of new function make_pass_graphite_transforms
+	(struct gimple_opt_pass pass_if_conversion): replace declaration with
+	that of new function make_pass_if_conversion
+	(struct gimple_opt_pass pass_loop_distribution): replace declaration
+	with that of new function make_pass_loop_distribution
+	(struct gimple_opt_pass pass_vectorize): replace declaration with that
+	of new function make_pass_vectorize
+	(struct gimple_opt_pass pass_slp_vectorize): replace declaration with
+	that of new function make_pass_slp_vectorize
+	(struct gimple_opt_pass pass_complete_unroll): replace declaration
+	with that of new function make_pass_complete_unroll
+	(struct gimple_opt_pass pass_complete_unrolli): replace declaration
+	with that of new function make_pass_complete_unrolli
+	(struct gimple_opt_pass pass_parallelize_loops): replace declaration
+	with that of new function make_pass_parallelize_loops
+	(struct gimple_opt_pass pass_loop_prefetch): replace declaration with
+	that of new function make_pass_loop_prefetch
+	(struct gimple_opt_pass pass_iv_optimize): replace declaration with
+	that of new function make_pass_iv_optimize
+	(struct gimple_opt_pass pass_tree_loop_done): replace declaration with
+	that of new function make_pass_tree_loop_done
+	(struct gimple_opt_pass pass_ch): replace declaration with that of new
+	function make_pass_ch
+	(struct gimple_opt_pass pass_ccp): replace declaration with that of
+	new function make_pass_ccp
+	(struct gimple_opt_pass pass_phi_only_cprop): replace declaration with
+	that of new function make_pass_phi_only_cprop
+	(struct gimple_opt_pass pass_build_ssa): replace declaration with that
+	of new function make_pass_build_ssa
+	(struct gimple_opt_pass pass_build_alias): replace declaration with
+	that of new function make_pass_build_alias
+	(struct gimple_opt_pass pass_build_ealias): replace declaration with
+	that of new function make_pass_build_ealias
+	(struct gimple_opt_pass pass_dominator): replace declaration with that
+	of new function make_pass_dominator
+	(struct gimple_opt_pass pass_dce): replace declaration with that of
+	new function make_pass_dce
+	(struct gimple_opt_pass pass_dce_loop): replace declaration with that
+	of new function make_pass_dce_loop
+	(struct gimple_opt_pass pass_cd_dce): replace declaration with that of
+	new function make_pass_cd_dce
+	(struct gimple_opt_pass pass_call_cdce): replace declaration with that
+	of new function make_pass_call_cdce
+	(struct gimple_opt_pass pass_merge_phi): replace declaration with that
+	of new function make_pass_merge_phi
+	(struct gimple_opt_pass pass_split_crit_edges): replace declaration
+	with that of new function make_pass_split_crit_edges
+	(struct gimple_opt_pass pass_pre): replace declaration with that of
+	new function make_pass_pre
+	(struct gimple_opt_pass pass_profile): replace declaration with that
+	of new function make_pass_profile
+	(struct gimple_opt_pass pass_strip_predict_hints): replace declaration
+	with that of new function make_pass_strip_predict_hints
+	(struct gimple_opt_pass pass_lower_complex_O0): replace declaration
+	with that of new function make_pass_lower_complex_O0
+	(struct gimple_opt_pass pass_lower_complex): replace declaration with
+	that of new function make_pass_lower_complex
+	(struct gimple_opt_pass pass_lower_vector): replace declaration with
+	that of new function make_pass_lower_vector
+	(struct gimple_opt_pass pass_lower_vector_ssa): replace declaration
+	with that of new function make_pass_lower_vector_ssa
+	(struct gimple_opt_pass pass_lower_omp): replace declaration with that
+	of new function make_pass_lower_omp
+	(struct gimple_opt_pass pass_diagnose_omp_blocks): replace declaration
+	with that of new function make_pass_diagnose_omp_blocks
+	(struct gimple_opt_pass pass_expand_omp): replace declaration with
+	that of new function make_pass_expand_omp
+	(struct gimple_opt_pass pass_expand_omp_ssa): replace declaration with
+	that of new function make_pass_expand_omp_ssa
+	(struct gimple_opt_pass pass_object_sizes): replace declaration with
+	that of new function make_pass_object_sizes
+	(struct gimple_opt_pass pass_strlen): replace declaration with that of
+	new function make_pass_strlen
+	(struct gimple_opt_pass pass_fold_builtins): replace declaration with
+	that of new function make_pass_fold_builtins
+	(struct gimple_opt_pass pass_stdarg): replace declaration with that of
+	new function make_pass_stdarg
+	(struct gimple_opt_pass pass_early_warn_uninitialized): replace
+	declaration with that of new function
+	make_pass_early_warn_uninitialized
+	(struct gimple_opt_pass pass_late_warn_uninitialized): replace
+	declaration with that of new function
+	make_pass_late_warn_uninitialized
+	(struct gimple_opt_pass pass_cse_reciprocals): replace declaration
+	with that of new function make_pass_cse_reciprocals
+	(struct gimple_opt_pass pass_cse_sincos): replace declaration with
+	that of new function make_pass_cse_sincos
+	(struct gimple_opt_pass pass_optimize_bswap): replace declaration with
+	that of new function make_pass_optimize_bswap
+	(struct gimple_opt_pass pass_optimize_widening_mul): replace
+	declaration with that of new function make_pass_optimize_widening_mul
+	(struct gimple_opt_pass pass_warn_function_return): replace
+	declaration with that of new function make_pass_warn_function_return
+	(struct gimple_opt_pass pass_warn_function_noreturn): replace
+	declaration with that of new function make_pass_warn_function_noreturn
+	(struct gimple_opt_pass pass_cselim): replace declaration with that of
+	new function make_pass_cselim
+	(struct gimple_opt_pass pass_phiopt): replace declaration with that of
+	new function make_pass_phiopt
+	(struct gimple_opt_pass pass_forwprop): replace declaration with that
+	of new function make_pass_forwprop
+	(struct gimple_opt_pass pass_phiprop): replace declaration with that
+	of new function make_pass_phiprop
+	(struct gimple_opt_pass pass_tree_ifcombine): replace declaration with
+	that of new function make_pass_tree_ifcombine
+	(struct gimple_opt_pass pass_dse): replace declaration with that of
+	new function make_pass_dse
+	(struct gimple_opt_pass pass_nrv): replace declaration with that of
+	new function make_pass_nrv
+	(struct gimple_opt_pass pass_rename_ssa_copies): replace declaration
+	with that of new function make_pass_rename_ssa_copies
+	(struct gimple_opt_pass pass_sink_code): replace declaration with that
+	of new function make_pass_sink_code
+	(struct gimple_opt_pass pass_fre): replace declaration with that of
+	new function make_pass_fre
+	(struct gimple_opt_pass pass_check_data_deps): replace declaration
+	with that of new function make_pass_check_data_deps
+	(struct gimple_opt_pass pass_copy_prop): replace declaration with that
+	of new function make_pass_copy_prop
+	(struct gimple_opt_pass pass_vrp): replace declaration with that of
+	new function make_pass_vrp
+	(struct gimple_opt_pass pass_uncprop): replace declaration with that
+	of new function make_pass_uncprop
+	(struct gimple_opt_pass pass_return_slot): replace declaration with
+	that of new function make_pass_return_slot
+	(struct gimple_opt_pass pass_reassoc): replace declaration with that
+	of new function make_pass_reassoc
+	(struct gimple_opt_pass pass_rebuild_cgraph_edges): replace
+	declaration with that of new function make_pass_rebuild_cgraph_edges
+	(struct gimple_opt_pass pass_remove_cgraph_callee_edges): replace
+	declaration with that of new function
+	make_pass_remove_cgraph_callee_edges
+	(struct gimple_opt_pass pass_build_cgraph_edges): replace declaration
+	with that of new function make_pass_build_cgraph_edges
+	(struct gimple_opt_pass pass_local_pure_const): replace declaration
+	with that of new function make_pass_local_pure_const
+	(struct gimple_opt_pass pass_tracer): replace declaration with that of
+	new function make_pass_tracer
+	(struct gimple_opt_pass pass_warn_unused_result): replace declaration
+	with that of new function make_pass_warn_unused_result
+	(struct gimple_opt_pass pass_diagnose_tm_blocks): replace declaration
+	with that of new function make_pass_diagnose_tm_blocks
+	(struct gimple_opt_pass pass_lower_tm): replace declaration with that
+	of new function make_pass_lower_tm
+	(struct gimple_opt_pass pass_tm_init): replace declaration with that
+	of new function make_pass_tm_init
+	(struct gimple_opt_pass pass_tm_mark): replace declaration with that
+	of new function make_pass_tm_mark
+	(struct gimple_opt_pass pass_tm_memopt): replace declaration with that
+	of new function make_pass_tm_memopt
+	(struct gimple_opt_pass pass_tm_edges): replace declaration with that
+	of new function make_pass_tm_edges
+	(struct gimple_opt_pass pass_split_functions): replace declaration
+	with that of new function make_pass_split_functions
+	(struct gimple_opt_pass pass_feedback_split_functions): replace
+	declaration with that of new function
+	make_pass_feedback_split_functions
+	(struct gimple_opt_pass pass_strength_reduction): replace declaration
+	with that of new function make_pass_strength_reduction
+	(struct simple_ipa_opt_pass pass_ipa_lower_emutls): replace
+	declaration with that of new function make_pass_ipa_lower_emutls
+	(struct simple_ipa_opt_pass
+	pass_ipa_function_and_variable_visibility): replace declaration with
+	that of new function make_pass_ipa_function_and_variable_visibility
+	(struct simple_ipa_opt_pass pass_ipa_tree_profile): replace
+	declaration with that of new function make_pass_ipa_tree_profile
+	(struct simple_ipa_opt_pass pass_early_local_passes): replace
+	declaration with that of new function make_pass_early_local_passes
+	(struct ipa_opt_pass_d pass_ipa_whole_program_visibility): replace
+	declaration with that of new function
+	make_pass_ipa_whole_program_visibility
+	(struct ipa_opt_pass_d pass_ipa_lto_gimple_out): replace declaration
+	with that of new function make_pass_ipa_lto_gimple_out
+	(struct simple_ipa_opt_pass pass_ipa_increase_alignment): replace
+	declaration with that of new function make_pass_ipa_increase_alignment
+	(struct ipa_opt_pass_d pass_ipa_inline): replace declaration with that
+	of new function make_pass_ipa_inline
+	(struct simple_ipa_opt_pass pass_ipa_free_lang_data): replace
+	declaration with that of new function make_pass_ipa_free_lang_data
+	(struct simple_ipa_opt_pass pass_ipa_free_inline_summary): replace
+	declaration with that of new function
+	make_pass_ipa_free_inline_summary
+	(struct ipa_opt_pass_d pass_ipa_cp): replace declaration with that of
+	new function make_pass_ipa_cp
+	(struct ipa_opt_pass_d pass_ipa_reference): replace declaration with
+	that of new function make_pass_ipa_reference
+	(struct ipa_opt_pass_d pass_ipa_pure_const): replace declaration with
+	that of new function make_pass_ipa_pure_const
+	(struct simple_ipa_opt_pass pass_ipa_pta): replace declaration with
+	that of new function make_pass_ipa_pta
+	(struct ipa_opt_pass_d pass_ipa_lto_wpa_fixup): replace declaration
+	with that of new function make_pass_ipa_lto_wpa_fixup
+	(struct ipa_opt_pass_d pass_ipa_lto_finish_out): replace declaration
+	with that of new function make_pass_ipa_lto_finish_out
+	(struct simple_ipa_opt_pass pass_ipa_tm): replace declaration with
+	that of new function make_pass_ipa_tm
+	(struct ipa_opt_pass_d pass_ipa_profile): replace declaration with
+	that of new function make_pass_ipa_profile
+	(struct ipa_opt_pass_d pass_ipa_cdtor_merge): replace declaration with
+	that of new function make_pass_ipa_cdtor_merge
+	(struct gimple_opt_pass pass_cleanup_cfg_post_optimizing): replace
+	declaration with that of new function
+	make_pass_cleanup_cfg_post_optimizing
+	(struct gimple_opt_pass pass_init_datastructures): replace declaration
+	with that of new function make_pass_init_datastructures
+	(struct gimple_opt_pass pass_fixup_cfg): replace declaration with that
+	of new function make_pass_fixup_cfg
+	(struct rtl_opt_pass pass_expand): replace declaration with that of
+	new function make_pass_expand
+	(struct rtl_opt_pass pass_instantiate_virtual_regs): replace
+	declaration with that of new function
+	make_pass_instantiate_virtual_regs
+	(struct rtl_opt_pass pass_rtl_fwprop): replace declaration with that
+	of new function make_pass_rtl_fwprop
+	(struct rtl_opt_pass pass_rtl_fwprop_addr): replace declaration with
+	that of new function make_pass_rtl_fwprop_addr
+	(struct rtl_opt_pass pass_jump): replace declaration with that of new
+	function make_pass_jump
+	(struct rtl_opt_pass pass_jump2): replace declaration with that of new
+	function make_pass_jump2
+	(struct rtl_opt_pass pass_lower_subreg): replace declaration with that
+	of new function make_pass_lower_subreg
+	(struct rtl_opt_pass pass_cse): replace declaration with that of new
+	function make_pass_cse
+	(struct rtl_opt_pass pass_fast_rtl_dce): replace declaration with that
+	of new function make_pass_fast_rtl_dce
+	(struct rtl_opt_pass pass_ud_rtl_dce): replace declaration with that
+	of new function make_pass_ud_rtl_dce
+	(struct rtl_opt_pass pass_rtl_dce): replace declaration with that of
+	new function make_pass_rtl_dce
+	(struct rtl_opt_pass pass_rtl_dse1): replace declaration with that of
+	new function make_pass_rtl_dse1
+	(struct rtl_opt_pass pass_rtl_dse2): replace declaration with that of
+	new function make_pass_rtl_dse2
+	(struct rtl_opt_pass pass_rtl_dse3): replace declaration with that of
+	new function make_pass_rtl_dse3
+	(struct rtl_opt_pass pass_rtl_cprop): replace declaration with that of
+	new function make_pass_rtl_cprop
+	(struct rtl_opt_pass pass_rtl_pre): replace declaration with that of
+	new function make_pass_rtl_pre
+	(struct rtl_opt_pass pass_rtl_hoist): replace declaration with that of
+	new function make_pass_rtl_hoist
+	(struct rtl_opt_pass pass_rtl_store_motion): replace declaration with
+	that of new function make_pass_rtl_store_motion
+	(struct rtl_opt_pass pass_cse_after_global_opts): replace declaration
+	with that of new function make_pass_cse_after_global_opts
+	(struct rtl_opt_pass pass_rtl_ifcvt): replace declaration with that of
+	new function make_pass_rtl_ifcvt
+	(struct rtl_opt_pass pass_into_cfg_layout_mode): replace declaration
+	with that of new function make_pass_into_cfg_layout_mode
+	(struct rtl_opt_pass pass_outof_cfg_layout_mode): replace declaration
+	with that of new function make_pass_outof_cfg_layout_mode
+	(struct rtl_opt_pass pass_loop2): replace declaration with that of new
+	function make_pass_loop2
+	(struct rtl_opt_pass pass_rtl_loop_init): replace declaration with
+	that of new function make_pass_rtl_loop_init
+	(struct rtl_opt_pass pass_rtl_move_loop_invariants): replace
+	declaration with that of new function
+	make_pass_rtl_move_loop_invariants
+	(struct rtl_opt_pass pass_rtl_unswitch): replace declaration with that
+	of new function make_pass_rtl_unswitch
+	(struct rtl_opt_pass pass_rtl_unroll_and_peel_loops): replace
+	declaration with that of new function
+	make_pass_rtl_unroll_and_peel_loops
+	(struct rtl_opt_pass pass_rtl_doloop): replace declaration with that
+	of new function make_pass_rtl_doloop
+	(struct rtl_opt_pass pass_rtl_loop_done): replace declaration with
+	that of new function make_pass_rtl_loop_done
+	(struct rtl_opt_pass pass_web): replace declaration with that of new
+	function make_pass_web
+	(struct rtl_opt_pass pass_cse2): replace declaration with that of new
+	function make_pass_cse2
+	(struct rtl_opt_pass pass_df_initialize_opt): replace declaration with
+	that of new function make_pass_df_initialize_opt
+	(struct rtl_opt_pass pass_df_initialize_no_opt): replace declaration
+	with that of new function make_pass_df_initialize_no_opt
+	(struct rtl_opt_pass pass_reginfo_init): replace declaration with that
+	of new function make_pass_reginfo_init
+	(struct rtl_opt_pass pass_inc_dec): replace declaration with that of
+	new function make_pass_inc_dec
+	(struct rtl_opt_pass pass_stack_ptr_mod): replace declaration with
+	that of new function make_pass_stack_ptr_mod
+	(struct rtl_opt_pass pass_initialize_regs): replace declaration with
+	that of new function make_pass_initialize_regs
+	(struct rtl_opt_pass pass_combine): replace declaration with that of
+	new function make_pass_combine
+	(struct rtl_opt_pass pass_if_after_combine): replace declaration with
+	that of new function make_pass_if_after_combine
+	(struct rtl_opt_pass pass_ree): replace declaration with that of new
+	function make_pass_ree
+	(struct rtl_opt_pass pass_partition_blocks): replace declaration with
+	that of new function make_pass_partition_blocks
+	(struct rtl_opt_pass pass_match_asm_constraints): replace declaration
+	with that of new function make_pass_match_asm_constraints
+	(struct rtl_opt_pass pass_regmove): replace declaration with that of
+	new function make_pass_regmove
+	(struct rtl_opt_pass pass_split_all_insns): replace declaration with
+	that of new function make_pass_split_all_insns
+	(struct rtl_opt_pass pass_fast_rtl_byte_dce): replace declaration with
+	that of new function make_pass_fast_rtl_byte_dce
+	(struct rtl_opt_pass pass_lower_subreg2): replace declaration with
+	that of new function make_pass_lower_subreg2
+	(struct rtl_opt_pass pass_mode_switching): replace declaration with
+	that of new function make_pass_mode_switching
+	(struct rtl_opt_pass pass_sms): replace declaration with that of new
+	function make_pass_sms
+	(struct rtl_opt_pass pass_sched): replace declaration with that of new
+	function make_pass_sched
+	(struct rtl_opt_pass pass_ira): replace declaration with that of new
+	function make_pass_ira
+	(struct rtl_opt_pass pass_reload): replace declaration with that of
+	new function make_pass_reload
+	(struct rtl_opt_pass pass_clean_state): replace declaration with that
+	of new function make_pass_clean_state
+	(struct rtl_opt_pass pass_branch_prob): replace declaration with that
+	of new function make_pass_branch_prob
+	(struct rtl_opt_pass pass_value_profile_transformations): replace
+	declaration with that of new function
+	make_pass_value_profile_transformations
+	(struct rtl_opt_pass pass_postreload_cse): replace declaration with
+	that of new function make_pass_postreload_cse
+	(struct rtl_opt_pass pass_gcse2): replace declaration with that of new
+	function make_pass_gcse2
+	(struct rtl_opt_pass pass_split_after_reload): replace declaration
+	with that of new function make_pass_split_after_reload
+	(struct rtl_opt_pass pass_branch_target_load_optimize1): replace
+	declaration with that of new function
+	make_pass_branch_target_load_optimize1
+	(struct rtl_opt_pass pass_thread_prologue_and_epilogue): replace
+	declaration with that of new function
+	make_pass_thread_prologue_and_epilogue
+	(struct rtl_opt_pass pass_stack_adjustments): replace declaration with
+	that of new function make_pass_stack_adjustments
+	(struct rtl_opt_pass pass_peephole2): replace declaration with that of
+	new function make_pass_peephole2
+	(struct rtl_opt_pass pass_if_after_reload): replace declaration with
+	that of new function make_pass_if_after_reload
+	(struct rtl_opt_pass pass_regrename): replace declaration with that of
+	new function make_pass_regrename
+	(struct rtl_opt_pass pass_cprop_hardreg): replace declaration with
+	that of new function make_pass_cprop_hardreg
+	(struct rtl_opt_pass pass_reorder_blocks): replace declaration with
+	that of new function make_pass_reorder_blocks
+	(struct rtl_opt_pass pass_branch_target_load_optimize2): replace
+	declaration with that of new function
+	make_pass_branch_target_load_optimize2
+	(struct rtl_opt_pass pass_leaf_regs): replace declaration with that of
+	new function make_pass_leaf_regs
+	(struct rtl_opt_pass pass_split_before_sched2): replace declaration
+	with that of new function make_pass_split_before_sched2
+	(struct rtl_opt_pass pass_compare_elim_after_reload): replace
+	declaration with that of new function
+	make_pass_compare_elim_after_reload
+	(struct rtl_opt_pass pass_sched2): replace declaration with that of
+	new function make_pass_sched2
+	(struct rtl_opt_pass pass_stack_regs): replace declaration with that
+	of new function make_pass_stack_regs
+	(struct rtl_opt_pass pass_stack_regs_run): replace declaration with
+	that of new function make_pass_stack_regs_run
+	(struct rtl_opt_pass pass_df_finish): replace declaration with that of
+	new function make_pass_df_finish
+	(struct rtl_opt_pass pass_compute_alignments): replace declaration
+	with that of new function make_pass_compute_alignments
+	(struct rtl_opt_pass pass_duplicate_computed_gotos): replace
+	declaration with that of new function
+	make_pass_duplicate_computed_gotos
+	(struct rtl_opt_pass pass_variable_tracking): replace declaration with
+	that of new function make_pass_variable_tracking
+	(struct rtl_opt_pass pass_free_cfg): replace declaration with that of
+	new function make_pass_free_cfg
+	(struct rtl_opt_pass pass_machine_reorg): replace declaration with
+	that of new function make_pass_machine_reorg
+	(struct rtl_opt_pass pass_cleanup_barriers): replace declaration with
+	that of new function make_pass_cleanup_barriers
+	(struct rtl_opt_pass pass_delay_slots): replace declaration with that
+	of new function make_pass_delay_slots
+	(struct rtl_opt_pass pass_split_for_shorten_branches): replace
+	declaration with that of new function
+	make_pass_split_for_shorten_branches
+	(struct rtl_opt_pass pass_split_before_regstack): replace declaration
+	with that of new function make_pass_split_before_regstack
+	(struct rtl_opt_pass pass_convert_to_eh_region_ranges): replace
+	declaration with that of new function
+	make_pass_convert_to_eh_region_ranges
+	(struct rtl_opt_pass pass_shorten_branches): replace declaration with
+	that of new function make_pass_shorten_branches
+	(struct rtl_opt_pass pass_set_nothrow_function_flags): replace
+	declaration with that of new function
+	make_pass_set_nothrow_function_flags
+	(struct rtl_opt_pass pass_dwarf2_frame): replace declaration with that
+	of new function make_pass_dwarf2_frame
+	(struct rtl_opt_pass pass_final): replace declaration with that of new
+	function make_pass_final
+	(struct rtl_opt_pass pass_rtl_seqabstr): replace declaration with that
+	of new function make_pass_rtl_seqabstr
+	(struct gimple_opt_pass pass_release_ssa_names): replace declaration
+	with that of new function make_pass_release_ssa_names
+	(struct gimple_opt_pass pass_early_inline): replace declaration with
+	that of new function make_pass_early_inline
+	(struct gimple_opt_pass pass_inline_parameters): replace declaration
+	with that of new function make_pass_inline_parameters
+	(struct gimple_opt_pass pass_update_address_taken): replace
+	declaration with that of new function make_pass_update_address_taken
+	(struct gimple_opt_pass pass_convert_switch): replace declaration with
+	that of new function make_pass_convert_switch
+	* tree-profile.c (struct simple_ipa_opt_pass pass_ipa_tree_profile):
+	convert from a global struct to a subclass of simple_ipa_opt_pass
+	(make_pass_ipa_tree_profile): New function to create an instance of
+	the new class pass_ipa_tree_profile
+	* tree-sra.c (struct gimple_opt_pass pass_sra_early): convert from a
+	global struct to a subclass of gimple_opt_pass
+	(make_pass_sra_early): New function to create an instance of the new
+	class pass_sra_early
+	(struct gimple_opt_pass pass_sra): convert from a global struct to a
+	subclass of gimple_opt_pass
+	(make_pass_sra): New function to create an instance of the new class
+	pass_sra
+	(struct gimple_opt_pass pass_early_ipa_sra): convert from a global
+	struct to a subclass of gimple_opt_pass
+	(make_pass_early_ipa_sra): New function to create an instance of the
+	new class pass_early_ipa_sra
+	* tree-ssa-ccp.c (struct gimple_opt_pass pass_ccp): convert from a
+	global struct to a subclass of gimple_opt_pass
+	(make_pass_ccp): New function to create an instance of the new class
+	pass_ccp
+	(struct gimple_opt_pass pass_fold_builtins): convert from a global
+	struct to a subclass of gimple_opt_pass
+	(make_pass_fold_builtins): New function to create an instance of the
+	new class pass_fold_builtins
+	* tree-ssa-copy.c (struct gimple_opt_pass pass_copy_prop): convert
+	from a global struct to a subclass of gimple_opt_pass
+	(make_pass_copy_prop): New function to create an instance of the new
+	class pass_copy_prop
+	* tree-ssa-copyrename.c (struct gimple_opt_pass
+	pass_rename_ssa_copies): convert from a global struct to a subclass of
+	gimple_opt_pass
+	(make_pass_rename_ssa_copies): New function to create an instance of
+	the new class pass_rename_ssa_copies
+	* tree-ssa-dce.c (struct gimple_opt_pass pass_dce): convert from a
+	global struct to a subclass of gimple_opt_pass
+	(make_pass_dce): New function to create an instance of the new class
+	pass_dce
+	(struct gimple_opt_pass pass_dce_loop): convert from a global struct
+	to a subclass of gimple_opt_pass
+	(make_pass_dce_loop): New function to create an instance of the new
+	class pass_dce_loop
+	(struct gimple_opt_pass pass_cd_dce): convert from a global struct to
+	a subclass of gimple_opt_pass
+	(make_pass_cd_dce): New function to create an instance of the new
+	class pass_cd_dce
+	* tree-ssa-dom.c (struct gimple_opt_pass pass_dominator): convert from
+	a global struct to a subclass of gimple_opt_pass
+	(make_pass_dominator): New function to create an instance of the new
+	class pass_dominator
+	(struct gimple_opt_pass pass_phi_only_cprop): convert from a global
+	struct to a subclass of gimple_opt_pass
+	(make_pass_phi_only_cprop): New function to create an instance of the
+	new class pass_phi_only_cprop
+	* tree-ssa-dse.c (struct gimple_opt_pass pass_dse): convert from a
+	global struct to a subclass of gimple_opt_pass
+	(make_pass_dse): New function to create an instance of the new class
+	pass_dse
+	* tree-ssa-forwprop.c (struct gimple_opt_pass pass_forwprop): convert
+	from a global struct to a subclass of gimple_opt_pass
+	(make_pass_forwprop): New function to create an instance of the new
+	class pass_forwprop
+	* tree-ssa-ifcombine.c (struct gimple_opt_pass pass_tree_ifcombine):
+	convert from a global struct to a subclass of gimple_opt_pass
+	(make_pass_tree_ifcombine): New function to create an instance of the
+	new class pass_tree_ifcombine
+	* tree-ssa-loop-ch.c (struct gimple_opt_pass pass_ch): convert from a
+	global struct to a subclass of gimple_opt_pass
+	(make_pass_ch): New function to create an instance of the new class
+	pass_ch
+	* tree-ssa-loop.c (struct gimple_opt_pass pass_tree_loop): convert
+	from a global struct to a subclass of gimple_opt_pass
+	(make_pass_tree_loop): New function to create an instance of the new
+	class pass_tree_loop
+	(struct gimple_opt_pass pass_tree_loop_init): convert from a global
+	struct to a subclass of gimple_opt_pass
+	(make_pass_tree_loop_init): New function to create an instance of the
+	new class pass_tree_loop_init
+	(struct gimple_opt_pass pass_lim): convert from a global struct to a
+	subclass of gimple_opt_pass
+	(make_pass_lim): New function to create an instance of the new class
+	pass_lim
+	(struct gimple_opt_pass pass_tree_unswitch): convert from a global
+	struct to a subclass of gimple_opt_pass
+	(make_pass_tree_unswitch): New function to create an instance of the
+	new class pass_tree_unswitch
+	(struct gimple_opt_pass pass_predcom): convert from a global struct to
+	a subclass of gimple_opt_pass
+	(make_pass_predcom): New function to create an instance of the new
+	class pass_predcom
+	(struct gimple_opt_pass pass_vectorize): convert from a global struct
+	to a subclass of gimple_opt_pass
+	(make_pass_vectorize): New function to create an instance of the new
+	class pass_vectorize
+	(struct gimple_opt_pass pass_graphite): convert from a global struct
+	to a subclass of gimple_opt_pass
+	(make_pass_graphite): New function to create an instance of the new
+	class pass_graphite
+	(struct gimple_opt_pass pass_graphite_transforms): convert from a
+	global struct to a subclass of gimple_opt_pass
+	(make_pass_graphite_transforms): New function to create an instance of
+	the new class pass_graphite_transforms
+	(struct gimple_opt_pass pass_check_data_deps): convert from a global
+	struct to a subclass of gimple_opt_pass
+	(make_pass_check_data_deps): New function to create an instance of the
+	new class pass_check_data_deps
+	(struct gimple_opt_pass pass_iv_canon): convert from a global struct
+	to a subclass of gimple_opt_pass
+	(make_pass_iv_canon): New function to create an instance of the new
+	class pass_iv_canon
+	(struct gimple_opt_pass pass_scev_cprop): convert from a global struct
+	to a subclass of gimple_opt_pass
+	(make_pass_scev_cprop): New function to create an instance of the new
+	class pass_scev_cprop
+	(struct gimple_opt_pass pass_record_bounds): convert from a global
+	struct to a subclass of gimple_opt_pass
+	(make_pass_record_bounds): New function to create an instance of the
+	new class pass_record_bounds
+	(struct gimple_opt_pass pass_complete_unroll): convert from a global
+	struct to a subclass of gimple_opt_pass
+	(make_pass_complete_unroll): New function to create an instance of the
+	new class pass_complete_unroll
+	(struct gimple_opt_pass pass_complete_unrolli): convert from a global
+	struct to a subclass of gimple_opt_pass
+	(make_pass_complete_unrolli): New function to create an instance of
+	the new class pass_complete_unrolli
+	(struct gimple_opt_pass pass_parallelize_loops): convert from a global
+	struct to a subclass of gimple_opt_pass
+	(make_pass_parallelize_loops): New function to create an instance of
+	the new class pass_parallelize_loops
+	(struct gimple_opt_pass pass_loop_prefetch): convert from a global
+	struct to a subclass of gimple_opt_pass
+	(make_pass_loop_prefetch): New function to create an instance of the
+	new class pass_loop_prefetch
+	(struct gimple_opt_pass pass_iv_optimize): convert from a global
+	struct to a subclass of gimple_opt_pass
+	(make_pass_iv_optimize): New function to create an instance of the new
+	class pass_iv_optimize
+	(struct gimple_opt_pass pass_tree_loop_done): convert from a global
+	struct to a subclass of gimple_opt_pass
+	(make_pass_tree_loop_done): New function to create an instance of the
+	new class pass_tree_loop_done
+	* tree-ssa-math-opts.c (struct gimple_opt_pass pass_cse_reciprocals):
+	convert from a global struct to a subclass of gimple_opt_pass
+	(make_pass_cse_reciprocals): New function to create an instance of the
+	new class pass_cse_reciprocals
+	(struct gimple_opt_pass pass_cse_sincos): convert from a global struct
+	to a subclass of gimple_opt_pass
+	(make_pass_cse_sincos): New function to create an instance of the new
+	class pass_cse_sincos
+	(struct gimple_opt_pass pass_optimize_bswap): convert from a global
+	struct to a subclass of gimple_opt_pass
+	(make_pass_optimize_bswap): New function to create an instance of the
+	new class pass_optimize_bswap
+	(struct gimple_opt_pass pass_optimize_widening_mul): convert from a
+	global struct to a subclass of gimple_opt_pass
+	(make_pass_optimize_widening_mul): New function to create an instance
+	of the new class pass_optimize_widening_mul
+	* tree-ssa-phiopt.c (struct gimple_opt_pass pass_phiopt): convert from
+	a global struct to a subclass of gimple_opt_pass
+	(make_pass_phiopt): New function to create an instance of the new
+	class pass_phiopt
+	(struct gimple_opt_pass pass_cselim): convert from a global struct to
+	a subclass of gimple_opt_pass
+	(make_pass_cselim): New function to create an instance of the new
+	class pass_cselim
+	* tree-ssa-phiprop.c (struct gimple_opt_pass pass_phiprop): convert
+	from a global struct to a subclass of gimple_opt_pass
+	(make_pass_phiprop): New function to create an instance of the new
+	class pass_phiprop
+	* tree-ssa-pre.c (struct gimple_opt_pass pass_pre): convert from a
+	global struct to a subclass of gimple_opt_pass
+	(make_pass_pre): New function to create an instance of the new class
+	pass_pre
+	(struct gimple_opt_pass pass_fre): convert from a global struct to a
+	subclass of gimple_opt_pass
+	(make_pass_fre): New function to create an instance of the new class
+	pass_fre
+	* tree-ssa-reassoc.c (struct gimple_opt_pass pass_reassoc): convert
+	from a global struct to a subclass of gimple_opt_pass
+	(make_pass_reassoc): New function to create an instance of the new
+	class pass_reassoc
+	* tree-ssa-sink.c (struct gimple_opt_pass pass_sink_code): convert
+	from a global struct to a subclass of gimple_opt_pass
+	(make_pass_sink_code): New function to create an instance of the new
+	class pass_sink_code
+	* tree-ssa-strlen.c (struct gimple_opt_pass pass_strlen): convert from
+	a global struct to a subclass of gimple_opt_pass
+	(make_pass_strlen): New function to create an instance of the new
+	class pass_strlen
+	* tree-ssa-structalias.c (struct gimple_opt_pass pass_build_alias):
+	convert from a global struct to a subclass of gimple_opt_pass
+	(make_pass_build_alias): New function to create an instance of the new
+	class pass_build_alias
+	(struct gimple_opt_pass pass_build_ealias): convert from a global
+	struct to a subclass of gimple_opt_pass
+	(make_pass_build_ealias): New function to create an instance of the
+	new class pass_build_ealias
+	(struct simple_ipa_opt_pass pass_ipa_pta): convert from a global
+	struct to a subclass of simple_ipa_opt_pass
+	(make_pass_ipa_pta): New function to create an instance of the new
+	class pass_ipa_pta
+	* tree-ssa-uncprop.c (struct gimple_opt_pass pass_uncprop): convert
+	from a global struct to a subclass of gimple_opt_pass
+	(make_pass_uncprop): New function to create an instance of the new
+	class pass_uncprop
+	* tree-ssa-uninit.c (struct gimple_opt_pass
+	pass_late_warn_uninitialized): convert from a global struct to a
+	subclass of gimple_opt_pass
+	(make_pass_late_warn_uninitialized): New function to create an
+	instance of the new class pass_late_warn_uninitialized
+	* tree-ssa.c (struct gimple_opt_pass pass_init_datastructures):
+	convert from a global struct to a subclass of gimple_opt_pass
+	(make_pass_init_datastructures): New function to create an instance of
+	the new class pass_init_datastructures
+	(struct gimple_opt_pass pass_early_warn_uninitialized): convert from a
+	global struct to a subclass of gimple_opt_pass
+	(make_pass_early_warn_uninitialized): New function to create an
+	instance of the new class pass_early_warn_uninitialized
+	(struct gimple_opt_pass pass_update_address_taken): convert from a
+	global struct to a subclass of gimple_opt_pass
+	(make_pass_update_address_taken): New function to create an instance
+	of the new class pass_update_address_taken
+	* tree-ssanames.c (struct gimple_opt_pass pass_release_ssa_names):
+	convert from a global struct to a subclass of gimple_opt_pass
+	(make_pass_release_ssa_names): New function to create an instance of
+	the new class pass_release_ssa_names
+	* tree-stdarg.c (struct gimple_opt_pass pass_stdarg): convert from a
+	global struct to a subclass of gimple_opt_pass
+	(make_pass_stdarg): New function to create an instance of the new
+	class pass_stdarg
+	* tree-switch-conversion.c (struct gimple_opt_pass
+	pass_convert_switch): convert from a global struct to a subclass of
+	gimple_opt_pass
+	(make_pass_convert_switch): New function to create an instance of the
+	new class pass_convert_switch
+	* tree-tailcall.c (struct gimple_opt_pass pass_tail_recursion):
+	convert from a global struct to a subclass of gimple_opt_pass
+	(make_pass_tail_recursion): New function to create an instance of the
+	new class pass_tail_recursion
+	(struct gimple_opt_pass pass_tail_calls): convert from a global struct
+	to a subclass of gimple_opt_pass
+	(make_pass_tail_calls): New function to create an instance of the new
+	class pass_tail_calls
+	* tree-vect-generic.c (struct gimple_opt_pass pass_lower_vector):
+	convert from a global struct to a subclass of gimple_opt_pass
+	(make_pass_lower_vector): New function to create an instance of the
+	new class pass_lower_vector
+	(struct gimple_opt_pass pass_lower_vector_ssa): convert from a global
+	struct to a subclass of gimple_opt_pass
+	(make_pass_lower_vector_ssa): New function to create an instance of
+	the new class pass_lower_vector_ssa
+	* tree-vectorizer.c (struct gimple_opt_pass pass_slp_vectorize):
+	convert from a global struct to a subclass of gimple_opt_pass
+	(make_pass_slp_vectorize): New function to create an instance of the
+	new class pass_slp_vectorize
+	(struct simple_ipa_opt_pass pass_ipa_increase_alignment): convert from
+	a global struct to a subclass of simple_ipa_opt_pass
+	(make_pass_ipa_increase_alignment): New function to create an instance
+	of the new class pass_ipa_increase_alignment
+	* tree-vrp.c (struct gimple_opt_pass pass_vrp): convert from a global
+	struct to a subclass of gimple_opt_pass
+	(make_pass_vrp): New function to create an instance of the new class
+	pass_vrp
+	* tree.c (struct simple_ipa_opt_pass pass_ipa_free_lang_data): convert
+	from a global struct to a subclass of simple_ipa_opt_pass
+	(make_pass_ipa_free_lang_data): New function to create an instance of
+	the new class pass_ipa_free_lang_data
+	* tsan.c (struct gimple_opt_pass pass_tsan): convert from a global
+	struct to a subclass of gimple_opt_pass
+	(make_pass_tsan): New function to create an instance of the new class
+	pass_tsan
+	(struct gimple_opt_pass pass_tsan_O0): convert from a global struct to
+	a subclass of gimple_opt_pass
+	(make_pass_tsan_O0): New function to create an instance of the new
+	class pass_tsan_O0
+	* var-tracking.c (struct rtl_opt_pass pass_variable_tracking): convert
+	from a global struct to a subclass of rtl_opt_pass
+	(make_pass_variable_tracking): New function to create an instance of
+	the new class pass_variable_tracking
+	* web.c (struct rtl_opt_pass pass_web): convert from a global struct
+	to a subclass of rtl_opt_pass
+	(make_pass_web): New function to create an instance of the new class
+	pass_web
+	* config/epiphany/epiphany.h (struct rtl_opt_pass
+	pass_mode_switch_use): replace declaration with that of new function
+	make_pass_mode_switch_use
+	(struct rtl_opt_pass pass_resolve_sw_modes): replace declaration with
+	that of new function make_pass_resolve_sw_modes
+	* config/epiphany/mode-switch-use.c (struct rtl_opt_pass
+	pass_mode_switch_use): convert from a global struct to a subclass of
+	rtl_opt_pass
+	(make_pass_mode_switch_use): New function to create an instance of the
+	new class pass_mode_switch_use
+	* config/epiphany/resolve-sw-modes.c (struct rtl_opt_pass
+	pass_resolve_sw_modes): convert from a global struct to a subclass of
+	rtl_opt_pass
+	(make_pass_resolve_sw_modes): New function to create an instance of
+	the new class pass_resolve_sw_modes
+	* config/i386/i386.c (struct rtl_opt_pass pass_insert_vzeroupper):
+	convert from a global struct to a subclass of rtl_opt_pass
+	(make_pass_insert_vzeroupper): New function to create an instance of
+	the new class pass_insert_vzeroupper
+	* config/sparc/sparc.c (struct rtl_opt_pass pass_work_around_errata):
+	convert from a global struct to a subclass of rtl_opt_pass
+	(make_pass_work_around_errata): New function to create an instance of
+	the new class pass_work_around_errata
+	* testsuite/gcc.dg/plugin/one_time_plugin.c (struct gimple_opt_pass
+	one_pass): convert from a global struct to a subclass of
+	gimple_opt_pass
+	(make_one_pass): New function to create an instance of the new class
+	one_pass
+	* testsuite/gcc.dg/plugin/selfassign.c (struct gimple_opt_pass
+	pass_warn_self_assign): convert from a global struct to a subclass of
+	gimple_opt_pass
+	(make_pass_warn_self_assign): New function to create an instance of
+	the new class pass_warn_self_assign
+	* testsuite/g++.dg/plugin/dumb_plugin.c (struct gimple_opt_pass
+	pass_dumb_plugin_example): convert from a global struct to a subclass
+	of gimple_opt_pass
+	(make_pass_dumb_plugin_example): New function to create an instance of
+	the new class pass_dumb_plugin_example
+	* testsuite/g++.dg/plugin/selfassign.c (struct gimple_opt_pass
+	pass_warn_self_assign): convert from a global struct to a subclass of
+	gimple_opt_pass
+	(make_pass_warn_self_assign): New function to create an instance of
+	the new class pass_warn_self_assign
+
+2013-04-19  David Malcolm  <dmalcolm@redhat.com>
+
 	* passes.def: New file
 
 	* passes.c (init_optimization_passes): Move the construction of the
diff --git a/gcc/asan.c b/gcc/asan.c
index b8acaf7..b76acf4 100644
--- a/gcc/asan.c
+++ b/gcc/asan.c
@@ -2248,26 +2248,35 @@ gate_asan (void)
 				DECL_ATTRIBUTES (current_function_decl));
 }
 
-struct gimple_opt_pass pass_asan =
+class pass_asan : public gimple_opt_pass
 {
- {
-  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  */
- }
-};
+public:
+  pass_asan(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "asan",
+		      OPTGROUP_NONE,
+		      TV_NONE,
+		      pass_properties(required(PROP_ssa | PROP_cfg | PROP_gimple_leh),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_verify_flow | TODO_verify_stmts | TODO_update_ssa)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_asan (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return asan_instrument (); }
+
+}; // class pass_asan
+
+gimple_opt_pass *
+make_pass_asan (context &ctxt)
+{
+  return new pass_asan (ctxt);
+}
 
 static bool
 gate_asan_O0 (void)
@@ -2275,25 +2284,34 @@ gate_asan_O0 (void)
   return !optimize && gate_asan ();
 }
 
-struct gimple_opt_pass pass_asan_O0 =
+class pass_asan_O0 : public gimple_opt_pass
 {
- {
-  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  */
- }
-};
+public:
+  pass_asan_O0(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "asan0",
+		      OPTGROUP_NONE,
+		      TV_NONE,
+		      pass_properties(required(PROP_ssa | PROP_cfg | PROP_gimple_leh),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_verify_flow | TODO_verify_stmts | TODO_update_ssa)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_asan_O0 (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return asan_instrument (); }
+
+}; // class pass_asan_O0
+
+gimple_opt_pass *
+make_pass_asan_O0 (context &ctxt)
+{
+  return new pass_asan_O0 (ctxt);
+}
 
 #include "gt-asan.h"
diff --git a/gcc/auto-inc-dec.c b/gcc/auto-inc-dec.c
index 6119bb6..f942f49 100644
--- a/gcc/auto-inc-dec.c
+++ b/gcc/auto-inc-dec.c
@@ -1506,22 +1506,32 @@ gate_auto_inc_dec (void)
 }
 
 
-struct rtl_opt_pass pass_inc_dec =
+class pass_inc_dec : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_inc_dec(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "auto_inc_dec",
+		   OPTGROUP_NONE,
+		   TV_AUTO_INC_DEC,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_df_finish)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_auto_inc_dec (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return rest_of_handle_auto_inc_dec (); }
+
+}; // class pass_inc_dec
+
+rtl_opt_pass *
+make_pass_inc_dec (context &ctxt)
+{
+  return new pass_inc_dec (ctxt);
+}
diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c
index abb2e39..16cd3f6 100644
--- a/gcc/bb-reorder.c
+++ b/gcc/bb-reorder.c
@@ -2221,25 +2221,35 @@ rest_of_handle_reorder_blocks (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_reorder_blocks =
+class pass_reorder_blocks : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_reorder_blocks(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "bbro",
+		   OPTGROUP_NONE,
+		   TV_REORDER_BLOCKS,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_verify_rtl_sharing)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_handle_reorder_blocks (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return rest_of_handle_reorder_blocks (); }
+
+}; // class pass_reorder_blocks
+
+rtl_opt_pass *
+make_pass_reorder_blocks (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
@@ -2364,25 +2374,35 @@ done:
   return 0;
 }
 
-struct rtl_opt_pass pass_duplicate_computed_gotos =
+class pass_duplicate_computed_gotos : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_duplicate_computed_gotos(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "compgotos",
+		   OPTGROUP_NONE,
+		   TV_REORDER_BLOCKS,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_verify_rtl_sharing)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_duplicate_computed_gotos (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return duplicate_computed_gotos (); }
+
+}; // class pass_duplicate_computed_gotos
+
+rtl_opt_pass *
+make_pass_duplicate_computed_gotos (context &ctxt)
+{
+  return new pass_duplicate_computed_gotos (ctxt);
+}
 
 static bool
 gate_handle_partition_blocks (void)
@@ -2568,22 +2588,34 @@ partition_hot_cold_basic_blocks (void)
   return TODO_verify_flow | TODO_verify_rtl_sharing;
 }
 
-struct rtl_opt_pass pass_partition_blocks =
+class pass_partition_blocks : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_partition_blocks(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "bbpart",
+		   OPTGROUP_NONE,
+		   TV_REORDER_BLOCKS,
+		   pass_properties(required(PROP_cfglayout),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_handle_partition_blocks (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () {
+    return partition_hot_cold_basic_blocks ();
+  }
+
+}; // class pass_partition_blocks
+
+rtl_opt_pass *
+make_pass_partition_blocks (context &ctxt)
+{
+  return new pass_partition_blocks (ctxt);
+}
diff --git a/gcc/bt-load.c b/gcc/bt-load.c
index 9ca1bd9..f02344c 100644
--- a/gcc/bt-load.c
+++ b/gcc/bt-load.c
@@ -1504,25 +1504,37 @@ rest_of_handle_branch_target_load_optimize1 (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_branch_target_load_optimize1 =
+class pass_branch_target_load_optimize1 : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_branch_target_load_optimize1(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "btl1",
+		   OPTGROUP_NONE,
+		   TV_NONE,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_verify_rtl_sharing)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_handle_branch_target_load_optimize1 (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () {
+    return rest_of_handle_branch_target_load_optimize1 ();
+  }
+
+}; // class pass_branch_target_load_optimize1
+
+rtl_opt_pass *
+make_pass_branch_target_load_optimize1 (context &ctxt)
+{
+  return new pass_branch_target_load_optimize1 (ctxt);
+}
 
 static bool
 gate_handle_branch_target_load_optimize2 (void)
@@ -1553,22 +1565,34 @@ rest_of_handle_branch_target_load_optimize2 (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_branch_target_load_optimize2 =
+class pass_branch_target_load_optimize2 : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_branch_target_load_optimize2(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "btl2",
+		   OPTGROUP_NONE,
+		   TV_NONE,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_handle_branch_target_load_optimize2 (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () {
+    return rest_of_handle_branch_target_load_optimize2 ();
+  }
+
+}; // class pass_branch_target_load_optimize2
+
+rtl_opt_pass *
+make_pass_branch_target_load_optimize2 (context &ctxt)
+{
+  return new pass_branch_target_load_optimize2 (ctxt);
+}
diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c
index 7764c6c..2a32963 100644
--- a/gcc/cfgcleanup.c
+++ b/gcc/cfgcleanup.c
@@ -3040,25 +3040,35 @@ execute_jump (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_jump =
+class pass_jump : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_jump(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "jump",
+		   OPTGROUP_NONE,
+		   TV_JUMP,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_verify_rtl_sharing)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return execute_jump (); }
+
+}; // class pass_jump
+
+rtl_opt_pass *
+make_pass_jump (context &ctxt)
+{
+  return new pass_jump (ctxt);
+}
 
 static unsigned int
 execute_jump2 (void)
@@ -3067,22 +3077,32 @@ execute_jump2 (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_jump2 =
+class pass_jump2 : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_jump2(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "jump2",
+		   OPTGROUP_NONE,
+		   TV_JUMP,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_verify_rtl_sharing)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return execute_jump2 (); }
+
+}; // class pass_jump2
+
+rtl_opt_pass *
+make_pass_jump2 (context &ctxt)
+{
+  return new pass_jump2 (ctxt);
+}
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index a651d8c..6d162d6 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -4845,25 +4845,32 @@ gimple_expand_cfg (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_expand =
+class pass_expand : public rtl_opt_pass
 {
- {
-  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
-    | 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 */
- }
-};
+public:
+  pass_expand(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "expand",
+		   OPTGROUP_NONE,
+		   TV_EXPAND,
+		   pass_properties(required(PROP_ssa | PROP_gimple_leh | PROP_cfg | PROP_gimple_lcx | PROP_gimple_lvec),
+				   provided(PROP_rtl),
+				   destroyed(PROP_ssa | PROP_trees)),
+		   pass_todo_flags(start(TODO_verify_ssa | TODO_verify_flow | TODO_verify_stmts),
+				   finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return gimple_expand_cfg (); }
+
+}; // class pass_expand
+
+rtl_opt_pass *
+make_pass_expand (context &ctxt)
+{
+  return new pass_expand (ctxt);
+}
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c
index 9b12d28..6160a27 100644
--- a/gcc/cfgrtl.c
+++ b/gcc/cfgrtl.c
@@ -455,25 +455,35 @@ rest_of_pass_free_cfg (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_free_cfg =
+class pass_free_cfg : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_free_cfg(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "*free_cfg",
+		   OPTGROUP_NONE,
+		   TV_NONE,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(PROP_cfg)),
+		   pass_todo_flags(start(0),
+				   finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return rest_of_pass_free_cfg (); }
+
+}; // class pass_free_cfg
+
+rtl_opt_pass *
+make_pass_free_cfg (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
@@ -3036,45 +3046,65 @@ outof_cfg_layout_mode (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_into_cfg_layout_mode =
+class pass_into_cfg_layout_mode : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_into_cfg_layout_mode(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "into_cfglayout",
+		   OPTGROUP_NONE,
+		   TV_CFG,
+		   pass_properties(required(0),
+				   provided(PROP_cfglayout),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return into_cfg_layout_mode (); }
+
+}; // class pass_into_cfg_layout_mode
+
+rtl_opt_pass *
+make_pass_into_cfg_layout_mode (context &ctxt)
+{
+  return new pass_into_cfg_layout_mode (ctxt);
+}
 
-struct rtl_opt_pass pass_outof_cfg_layout_mode =
+class pass_outof_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_outof_cfg_layout_mode(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "outof_cfglayout",
+		   OPTGROUP_NONE,
+		   TV_CFG,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(PROP_cfglayout)),
+		   pass_todo_flags(start(0),
+				   finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return outof_cfg_layout_mode (); }
+
+}; // class pass_outof_cfg_layout_mode
+
+rtl_opt_pass *
+make_pass_outof_cfg_layout_mode (context &ctxt)
+{
+  return new pass_outof_cfg_layout_mode (ctxt);
+}
 
 
 /* Link the basic blocks in the correct order, compacting the basic
diff --git a/gcc/cgraphbuild.c b/gcc/cgraphbuild.c
index a74a4c0..da3c6b1 100644
--- a/gcc/cgraphbuild.c
+++ b/gcc/cgraphbuild.c
@@ -364,25 +364,35 @@ build_cgraph_edges (void)
   return 0;
 }
 
-struct gimple_opt_pass pass_build_cgraph_edges =
+class pass_build_cgraph_edges : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_build_cgraph_edges(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "*build_cgraph_edges",
+		      OPTGROUP_NONE,
+		      TV_NONE,
+		      pass_properties(required(PROP_cfg),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return build_cgraph_edges (); }
+
+}; // class pass_build_cgraph_edges
+
+gimple_opt_pass *
+make_pass_build_cgraph_edges (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.
@@ -482,25 +492,35 @@ cgraph_rebuild_references (void)
   record_eh_tables (node, cfun);
 }
 
-struct gimple_opt_pass pass_rebuild_cgraph_edges =
+class pass_rebuild_cgraph_edges : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_rebuild_cgraph_edges(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "*rebuild_cgraph_edges",
+		      OPTGROUP_NONE,
+		      TV_CGRAPH,
+		      pass_properties(required(PROP_cfg),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return rebuild_cgraph_edges (); }
+
+}; // class pass_rebuild_cgraph_edges
+
+gimple_opt_pass *
+make_pass_rebuild_cgraph_edges (context &ctxt)
+{
+  return new pass_rebuild_cgraph_edges (ctxt);
+}
 
 
 static unsigned int
@@ -510,22 +530,32 @@ remove_cgraph_callee_edges (void)
   return 0;
 }
 
-struct gimple_opt_pass pass_remove_cgraph_callee_edges =
+class pass_remove_cgraph_callee_edges : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_remove_cgraph_callee_edges(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "*remove_cgraph_callee_edges",
+		      OPTGROUP_NONE,
+		      TV_NONE,
+		      pass_properties(required(0),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return remove_cgraph_callee_edges (); }
+
+}; // class pass_remove_cgraph_callee_edges
+
+gimple_opt_pass *
+make_pass_remove_cgraph_callee_edges (context &ctxt)
+{
+  return new pass_remove_cgraph_callee_edges (ctxt);
+}
diff --git a/gcc/combine-stack-adj.c b/gcc/combine-stack-adj.c
index 7392b92..88fdd1a 100644
--- a/gcc/combine-stack-adj.c
+++ b/gcc/combine-stack-adj.c
@@ -643,22 +643,34 @@ rest_of_handle_stack_adjustments (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_stack_adjustments =
+class pass_stack_adjustments : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_stack_adjustments(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "csa",
+		   OPTGROUP_NONE,
+		   TV_COMBINE_STACK_ADJUST,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_df_finish | TODO_verify_rtl_sharing)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_handle_stack_adjustments (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () {
+    return rest_of_handle_stack_adjustments ();
+  }
+
+}; // class pass_stack_adjustments
+
+rtl_opt_pass *
+make_pass_stack_adjustments (context &ctxt)
+{
+  return new pass_stack_adjustments (ctxt);
+}
diff --git a/gcc/combine.c b/gcc/combine.c
index 6d58b19..21c0fef 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -13802,22 +13802,32 @@ rest_of_handle_combine (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_combine =
+class pass_combine : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_combine(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "combine",
+		   OPTGROUP_NONE,
+		   TV_COMBINE,
+		   pass_properties(required(PROP_cfglayout),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_df_finish | TODO_verify_rtl_sharing)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_handle_combine (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return rest_of_handle_combine (); }
+
+}; // class pass_combine
+
+rtl_opt_pass *
+make_pass_combine (context &ctxt)
+{
+  return new pass_combine (ctxt);
+}
diff --git a/gcc/compare-elim.c b/gcc/compare-elim.c
index 367cd8e..7fe0728 100644
--- a/gcc/compare-elim.c
+++ b/gcc/compare-elim.c
@@ -651,24 +651,34 @@ gate_compare_elim_after_reload (void)
   return flag_compare_elim_after_reload;
 }
 
-struct rtl_opt_pass pass_compare_elim_after_reload =
+class pass_compare_elim_after_reload : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_compare_elim_after_reload(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "cmpelim",
+		   OPTGROUP_NONE,
+		   TV_NONE,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_df_finish | TODO_df_verify | TODO_verify_rtl_sharing)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_compare_elim_after_reload (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () {
+    return execute_compare_elim_after_reload ();
+  }
+
+}; // class pass_compare_elim_after_reload
+
+rtl_opt_pass *
+make_pass_compare_elim_after_reload (context &ctxt)
+{
+  return new pass_compare_elim_after_reload (ctxt);
+}
diff --git a/gcc/config/epiphany/epiphany.h b/gcc/config/epiphany/epiphany.h
index 1e5c305..e776b7d 100644
--- a/gcc/config/epiphany/epiphany.h
+++ b/gcc/config/epiphany/epiphany.h
@@ -926,8 +926,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 (context &ctxt);
+extern rtl_opt_pass *make_pass_resolve_sw_modes (context &ctxt);
 
 /* This will need to be adjusted when FP_CONTRACT_ON is properly
    implemented.  */
diff --git a/gcc/config/epiphany/mode-switch-use.c b/gcc/config/epiphany/mode-switch-use.c
index 6652963..3de7028 100644
--- a/gcc/config/epiphany/mode-switch-use.c
+++ b/gcc/config/epiphany/mode-switch-use.c
@@ -71,22 +71,32 @@ insert_uses (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_mode_switch_use =
+class pass_mode_switch_use : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_mode_switch_use(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "mode_switch_use",
+		   OPTGROUP_NONE,
+		   TV_NONE,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return insert_uses (); }
+
+}; // class pass_mode_switch_use
+
+rtl_opt_pass *
+make_pass_mode_switch_use (context &ctxt)
+{
+  return new pass_mode_switch_use (ctxt);
+}
diff --git a/gcc/config/epiphany/resolve-sw-modes.c b/gcc/config/epiphany/resolve-sw-modes.c
index 729a0ff..cfe881c 100644
--- a/gcc/config/epiphany/resolve-sw-modes.c
+++ b/gcc/config/epiphany/resolve-sw-modes.c
@@ -161,23 +161,32 @@ resolve_sw_modes (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_resolve_sw_modes =
+class pass_resolve_sw_modes : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_resolve_sw_modes(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "resolve_sw_modes",
+		   OPTGROUP_NONE,
+		   TV_MODE_SWITCH,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_df_finish | TODO_verify_rtl_sharing | 0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_resolve_sw_modes (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return resolve_sw_modes (); }
+
+}; // class pass_resolve_sw_modes
+
+rtl_opt_pass *
+make_pass_resolve_sw_modes (context &ctxt)
+{
+  return new pass_resolve_sw_modes (ctxt);
+}
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index c365e2c..1beed80 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -2516,26 +2516,37 @@ rest_of_handle_insert_vzeroupper (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_insert_vzeroupper =
+class pass_insert_vzeroupper : public rtl_opt_pass
+{
+public:
+  pass_insert_vzeroupper(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "vzeroupper",
+		   OPTGROUP_NONE,
+		   TV_NONE,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_df_finish | TODO_verify_rtl_sharing | 0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_insert_vzeroupper (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () {
+    return rest_of_handle_insert_vzeroupper ();
+  }
+
+}; // class pass_insert_vzeroupper
+
+rtl_opt_pass *
+make_pass_insert_vzeroupper (context &ctxt)
 {
- {
-  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 */
- }
-};
+  return new pass_insert_vzeroupper (ctxt);
+}
 
 /* Return true if a red-zone is in use.  */
 
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index 1dc4e36..98d0236 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -906,25 +906,35 @@ 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 */
- }
-};
+class pass_work_around_errata : public rtl_opt_pass
+{
+public:
+  pass_work_around_errata(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "errata",
+		   OPTGROUP_NONE,
+		   TV_MACH_DEP,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_verify_rtl_sharing)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return sparc_gate_work_around_errata (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return sparc_do_work_around_errata (); }
+
+}; // class pass_work_around_errata
+
+rtl_opt_pass *
+make_pass_work_around_errata (context &ctxt)
+{
+  return new pass_work_around_errata (ctxt);
+}
 
 struct register_pass_info insert_pass_work_around_errata =
 {
diff --git a/gcc/cprop.c b/gcc/cprop.c
index 6a6b5f1..1727482 100644
--- a/gcc/cprop.c
+++ b/gcc/cprop.c
@@ -1913,23 +1913,32 @@ execute_rtl_cprop (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_rtl_cprop =
+class pass_rtl_cprop : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_rtl_cprop(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "cprop",
+		   OPTGROUP_NONE,
+		   TV_CPROP,
+		   pass_properties(required(PROP_cfglayout),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_df_finish | TODO_verify_rtl_sharing | TODO_verify_flow)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_rtl_cprop (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return execute_rtl_cprop (); }
+
+}; // class pass_rtl_cprop
+
+rtl_opt_pass *
+make_pass_rtl_cprop (context &ctxt)
+{
+  return new pass_rtl_cprop (ctxt);
+}
diff --git a/gcc/cse.c b/gcc/cse.c
index f2c8f63..db19b81 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -7449,26 +7449,35 @@ rest_of_handle_cse (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_cse =
+class pass_cse : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_cse(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "cse1",
+		   OPTGROUP_NONE,
+		   TV_CSE,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_df_finish | TODO_verify_rtl_sharing | TODO_verify_flow)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_handle_cse (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return rest_of_handle_cse (); }
+
+}; // class pass_cse
+
+rtl_opt_pass *
+make_pass_cse (context &ctxt)
+{
+  return new pass_cse (ctxt);
+}
 
 
 static bool
@@ -7511,26 +7520,35 @@ rest_of_handle_cse2 (void)
 }
 
 
-struct rtl_opt_pass pass_cse2 =
+class pass_cse2 : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_cse2(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "cse2",
+		   OPTGROUP_NONE,
+		   TV_CSE2,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_df_finish | TODO_verify_rtl_sharing | TODO_verify_flow)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_handle_cse2 (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return rest_of_handle_cse2 (); }
+
+}; // class pass_cse2
+
+rtl_opt_pass *
+make_pass_cse2 (context &ctxt)
+{
+  return new pass_cse2 (ctxt);
+}
 
 static bool
 gate_handle_cse_after_global_opts (void)
@@ -7571,23 +7589,34 @@ rest_of_handle_cse_after_global_opts (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_cse_after_global_opts =
+class pass_cse_after_global_opts : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_cse_after_global_opts(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "cse_local",
+		   OPTGROUP_NONE,
+		   TV_CSE,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_df_finish | TODO_verify_rtl_sharing | TODO_verify_flow)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_handle_cse_after_global_opts (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () {
+    return rest_of_handle_cse_after_global_opts ();
+  }
+
+}; // class pass_cse_after_global_opts
+
+rtl_opt_pass *
+make_pass_cse_after_global_opts (context &ctxt)
+{
+  return new pass_cse_after_global_opts (ctxt);
+}
diff --git a/gcc/dce.c b/gcc/dce.c
index 64ed81e..62d36a1 100644
--- a/gcc/dce.c
+++ b/gcc/dce.c
@@ -786,25 +786,35 @@ gate_ud_dce (void)
     && dbg_cnt (dce_ud);
 }
 
-struct rtl_opt_pass pass_ud_rtl_dce =
+class pass_ud_rtl_dce : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_ud_rtl_dce(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "ud_dce",
+		   OPTGROUP_NONE,
+		   TV_DCE,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_df_finish | TODO_verify_rtl_sharing)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_ud_dce (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return rest_of_handle_ud_dce (); }
+
+}; // class pass_ud_rtl_dce
+
+rtl_opt_pass *
+make_pass_ud_rtl_dce (context &ctxt)
+{
+  return new pass_ud_rtl_dce (ctxt);
+}
 
 
 /* -------------------------------------------------------------------------
@@ -1201,22 +1211,32 @@ gate_fast_dce (void)
     && dbg_cnt (dce_fast);
 }
 
-struct rtl_opt_pass pass_fast_rtl_dce =
+class pass_fast_rtl_dce : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_fast_rtl_dce(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "rtl_dce",
+		   OPTGROUP_NONE,
+		   TV_DCE,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_df_finish | TODO_verify_rtl_sharing)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_fast_dce (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return rest_of_handle_fast_dce (); }
+
+}; // class pass_fast_rtl_dce
+
+rtl_opt_pass *
+make_pass_fast_rtl_dce (context &ctxt)
+{
+  return new pass_fast_rtl_dce (ctxt);
+}
diff --git a/gcc/df-core.c b/gcc/df-core.c
index e602290..b3cfa2f 100644
--- a/gcc/df-core.c
+++ b/gcc/df-core.c
@@ -746,25 +746,35 @@ 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 */
- }
-};
+class pass_df_initialize_opt : public rtl_opt_pass
+{
+public:
+  pass_df_initialize_opt(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "dfinit",
+		   OPTGROUP_NONE,
+		   TV_DF_SCAN,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_opt (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return rest_of_handle_df_initialize (); }
+
+}; // class pass_df_initialize_opt
+
+rtl_opt_pass *
+make_pass_df_initialize_opt (context &ctxt)
+{
+  return new pass_df_initialize_opt (ctxt);
+}
 
 
 static bool
@@ -774,25 +784,35 @@ gate_no_opt (void)
 }
 
 
-struct rtl_opt_pass pass_df_initialize_no_opt =
+class pass_df_initialize_no_opt : public rtl_opt_pass
+{
+public:
+  pass_df_initialize_no_opt(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "no-opt dfinit",
+		   OPTGROUP_NONE,
+		   TV_DF_SCAN,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_no_opt (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return rest_of_handle_df_initialize (); }
+
+}; // class pass_df_initialize_no_opt
+
+rtl_opt_pass *
+make_pass_df_initialize_no_opt (context &ctxt)
 {
- {
-  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 */
- }
-};
+  return new pass_df_initialize_no_opt (ctxt);
+}
 
 
 /* Free all the dataflow info and the DF structure.  This should be
@@ -822,25 +842,35 @@ 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 */
- }
-};
+class pass_df_finish : public rtl_opt_pass
+{
+public:
+  pass_df_finish(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "dfinish",
+		   OPTGROUP_NONE,
+		   TV_NONE,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return rest_of_handle_df_finish (); }
+
+}; // class pass_df_finish
+
+rtl_opt_pass *
+make_pass_df_finish (context &ctxt)
+{
+  return new pass_df_finish (ctxt);
+}
 
 
 
diff --git a/gcc/dse.c b/gcc/dse.c
index d643cb0..efc228f 100644
--- a/gcc/dse.c
+++ b/gcc/dse.c
@@ -3729,42 +3729,62 @@ 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 */
- }
-};
+class pass_rtl_dse1 : public rtl_opt_pass
+{
+public:
+  pass_rtl_dse1(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "dse1",
+		   OPTGROUP_NONE,
+		   TV_DSE1,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_df_finish | TODO_verify_rtl_sharing)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_dse1 (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return rest_of_handle_dse (); }
+
+}; // class pass_rtl_dse1
+
+rtl_opt_pass *
+make_pass_rtl_dse1 (context &ctxt)
+{
+  return new pass_rtl_dse1 (ctxt);
+}
 
-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_dse2 : public rtl_opt_pass
+{
+public:
+  pass_rtl_dse2(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "dse2",
+		   OPTGROUP_NONE,
+		   TV_DSE2,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_df_finish | TODO_verify_rtl_sharing)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_dse2 (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return rest_of_handle_dse (); }
+
+}; // class pass_rtl_dse2
+
+rtl_opt_pass *
+make_pass_rtl_dse2 (context &ctxt)
+{
+  return new pass_rtl_dse2 (ctxt);
+}
diff --git a/gcc/dwarf2cfi.c b/gcc/dwarf2cfi.c
index 9f0a594..c84d5c5 100644
--- a/gcc/dwarf2cfi.c
+++ b/gcc/dwarf2cfi.c
@@ -3365,24 +3365,34 @@ 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 */
- }
-};
+class pass_dwarf2_frame : public rtl_opt_pass
+{
+public:
+  pass_dwarf2_frame(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "dwarf2",
+		   OPTGROUP_NONE,
+		   TV_FINAL,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_dwarf2_frame (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return execute_dwarf2_frame (); }
+
+}; // class pass_dwarf2_frame
+
+rtl_opt_pass *
+make_pass_dwarf2_frame (context &ctxt)
+{
+  return new pass_dwarf2_frame (ctxt);
+}
 
 #include "gt-dwarf2cfi.h"
diff --git a/gcc/except.c b/gcc/except.c
index 4e85f73..f94008f 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -1949,25 +1949,35 @@ 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 */
- }
-};
+class pass_set_nothrow_function_flags : public rtl_opt_pass
+{
+public:
+  pass_set_nothrow_function_flags(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "nothrow",
+		   OPTGROUP_NONE,
+		   TV_NONE,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return set_nothrow_function_flags (); }
+
+}; // class pass_set_nothrow_function_flags
+
+rtl_opt_pass *
+make_pass_set_nothrow_function_flags (context &ctxt)
+{
+  return new pass_set_nothrow_function_flags (ctxt);
+}
 
 
 /* Various hooks for unwind library.  */
@@ -2596,25 +2606,35 @@ 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 */
- }
-};
+class pass_convert_to_eh_region_ranges : public rtl_opt_pass
+{
+public:
+  pass_convert_to_eh_region_ranges(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "eh_ranges",
+		   OPTGROUP_NONE,
+		   TV_NONE,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_convert_to_eh_region_ranges (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return convert_to_eh_region_ranges (); }
+
+}; // class pass_convert_to_eh_region_ranges
+
+rtl_opt_pass *
+make_pass_convert_to_eh_region_ranges (context &ctxt)
+{
+  return new pass_convert_to_eh_region_ranges (ctxt);
+}
 
 static void
 push_uleb128 (vec<uchar, va_gc> **data_area, unsigned int value)
diff --git a/gcc/final.c b/gcc/final.c
index f6974f4..4309ccb 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -795,25 +795,35 @@ compute_alignments (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_compute_alignments =
+class pass_compute_alignments : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_compute_alignments(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "alignments",
+		   OPTGROUP_NONE,
+		   TV_NONE,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_verify_rtl_sharing)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return compute_alignments (); }
+
+}; // class pass_compute_alignments
+
+rtl_opt_pass *
+make_pass_compute_alignments (context &ctxt)
+{
+  return new pass_compute_alignments (ctxt);
+}
 
 
 /* Make a pass over all insns and compute their actual lengths by shortening
@@ -4379,25 +4389,35 @@ rest_of_handle_final (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_final =
+class pass_final : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_final(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "final",
+		   OPTGROUP_NONE,
+		   TV_FINAL,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return rest_of_handle_final (); }
+
+}; // class pass_final
+
+rtl_opt_pass *
+make_pass_final (context &ctxt)
+{
+  return new pass_final (ctxt);
+}
 
 
 static unsigned int
@@ -4408,25 +4428,37 @@ rest_of_handle_shorten_branches (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_shorten_branches =
+class pass_shorten_branches : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_shorten_branches(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "shorten",
+		   OPTGROUP_NONE,
+		   TV_SHORTEN_BRANCH,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () {
+    return rest_of_handle_shorten_branches ();
+  }
+
+}; // class pass_shorten_branches
+
+rtl_opt_pass *
+make_pass_shorten_branches (context &ctxt)
+{
+  return new pass_shorten_branches (ctxt);
+}
 
 
 static unsigned int
@@ -4555,22 +4587,32 @@ rest_of_clean_state (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_clean_state =
+class pass_clean_state : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_clean_state(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "*clean_state",
+		   OPTGROUP_NONE,
+		   TV_FINAL,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(PROP_rtl)),
+		   pass_todo_flags(start(0),
+				   finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return rest_of_clean_state (); }
+
+}; // class pass_clean_state
+
+rtl_opt_pass *
+make_pass_clean_state (context &ctxt)
+{
+  return new pass_clean_state (ctxt);
+}
diff --git a/gcc/function.c b/gcc/function.c
index 36c874f..5d022b2 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -1948,25 +1948,35 @@ 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 */
- }
-};
+class pass_instantiate_virtual_regs : public rtl_opt_pass
+{
+public:
+  pass_instantiate_virtual_regs(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "vregs",
+		   OPTGROUP_NONE,
+		   TV_NONE,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return instantiate_virtual_regs (); }
+
+}; // class pass_instantiate_virtual_regs
+
+rtl_opt_pass *
+make_pass_instantiate_virtual_regs (context &ctxt)
+{
+  return new pass_instantiate_virtual_regs (ctxt);
+}
 
 
 /* Return 1 if EXP is an aggregate type (or a value with aggregate type).
@@ -6944,25 +6954,37 @@ 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 */
- }
-};
+class pass_leaf_regs : public rtl_opt_pass
+{
+public:
+  pass_leaf_regs(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "*leaf_regs",
+		   OPTGROUP_NONE,
+		   TV_NONE,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () {
+    return rest_of_handle_check_leaf_regs ();
+  }
+
+}; // class pass_leaf_regs
+
+rtl_opt_pass *
+make_pass_leaf_regs (context &ctxt)
+{
+  return new pass_leaf_regs (ctxt);
+}
 
 static unsigned int
 rest_of_handle_thread_prologue_and_epilogue (void)
@@ -6983,26 +7005,37 @@ 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 */
- }
-};
+class pass_thread_prologue_and_epilogue : public rtl_opt_pass
+{
+public:
+  pass_thread_prologue_and_epilogue(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "pro_and_epilogue",
+		   OPTGROUP_NONE,
+		   TV_THREAD_PROLOGUE_AND_EPILOGUE,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(TODO_verify_flow),
+				   finish(TODO_df_verify | TODO_df_finish | TODO_verify_rtl_sharing)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () {
+    return rest_of_handle_thread_prologue_and_epilogue ();
+  }
+
+}; // class pass_thread_prologue_and_epilogue
+
+rtl_opt_pass *
+make_pass_thread_prologue_and_epilogue (context &ctxt)
+{
+  return new pass_thread_prologue_and_epilogue (ctxt);
+}
 
 
 /* This mini-pass fixes fall-out from SSA in asm statements that have
@@ -7184,25 +7217,35 @@ 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 */
- }
-};
+class pass_match_asm_constraints : public rtl_opt_pass
+{
+public:
+  pass_match_asm_constraints(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "asmcons",
+		   OPTGROUP_NONE,
+		   TV_NONE,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return rest_of_match_asm_constraints (); }
+
+}; // class pass_match_asm_constraints
+
+rtl_opt_pass *
+make_pass_match_asm_constraints (context &ctxt)
+{
+  return new pass_match_asm_constraints (ctxt);
+}
 
 
 #include "gt-function.h"
diff --git a/gcc/fwprop.c b/gcc/fwprop.c
index 17cc62a..bf4be58 100644
--- a/gcc/fwprop.c
+++ b/gcc/fwprop.c
@@ -1485,27 +1485,35 @@ fwprop (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_rtl_fwprop =
+class pass_rtl_fwprop : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_rtl_fwprop(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "fwprop1",
+		   OPTGROUP_NONE,
+		   TV_FWPROP,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_df_finish | TODO_verify_flow | TODO_verify_rtl_sharing)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_fwprop (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return fwprop (); }
+
+}; // class pass_rtl_fwprop
+
+rtl_opt_pass *
+make_pass_rtl_fwprop (context &ctxt)
+{
+  return new pass_rtl_fwprop (ctxt);
+}
 
 static unsigned int
 fwprop_addr (void)
@@ -1535,22 +1543,32 @@ fwprop_addr (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_rtl_fwprop_addr =
+class pass_rtl_fwprop_addr : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_rtl_fwprop_addr(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "fwprop2",
+		   OPTGROUP_NONE,
+		   TV_FWPROP,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_df_finish | TODO_verify_rtl_sharing)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_fwprop (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return fwprop_addr (); }
+
+}; // class pass_rtl_fwprop_addr
+
+rtl_opt_pass *
+make_pass_rtl_fwprop_addr (context &ctxt)
+{
+  return new pass_rtl_fwprop_addr (ctxt);
+}
diff --git a/gcc/gcse.c b/gcc/gcse.c
index e1daf18..42c2fba 100644
--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -4131,46 +4131,64 @@ execute_rtl_hoist (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_rtl_pre =
+class pass_rtl_pre : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_rtl_pre(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "rtl pre",
+		   OPTGROUP_NONE,
+		   TV_PRE,
+		   pass_properties(required(PROP_cfglayout),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_df_finish | TODO_verify_rtl_sharing | TODO_verify_flow)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_rtl_pre (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return execute_rtl_pre (); }
+
+}; // class pass_rtl_pre
+
+rtl_opt_pass *
+make_pass_rtl_pre (context &ctxt)
+{
+  return new pass_rtl_pre (ctxt);
+}
 
-struct rtl_opt_pass pass_rtl_hoist =
+class pass_rtl_hoist : public rtl_opt_pass
 {
- {
-  RTL_PASS,
-  "hoist",                              /* name */
-  OPTGROUP_NONE,                        /* optinfo_flags */
-  gate_rtl_hoist,                       /* gate */
-  execute_rtl_hoist,  			/* execute */
-  NULL,                                 /* sub */
-  NULL,                                 /* next */
-  0,                                    /* static_pass_number */
-  TV_HOIST,                             /* tv_id */
-  PROP_cfglayout,                       /* properties_required */
-  0,                                    /* properties_provided */
-  0,                                    /* properties_destroyed */
-  0,                                    /* todo_flags_start */
-  TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_verify_flow                      /* todo_flags_finish */
- }
-};
+public:
+  pass_rtl_hoist(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "hoist",
+		   OPTGROUP_NONE,
+		   TV_HOIST,
+		   pass_properties(required(PROP_cfglayout),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_df_finish | TODO_verify_rtl_sharing | TODO_verify_flow)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_rtl_hoist (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return execute_rtl_hoist (); }
+
+}; // class pass_rtl_hoist
+
+rtl_opt_pass *
+make_pass_rtl_hoist (context &ctxt)
+{
+  return new pass_rtl_hoist (ctxt);
+}
 
 #include "gt-gcse.h"
diff --git a/gcc/gimple-low.c b/gcc/gimple-low.c
index b06d194..17bf830 100644
--- a/gcc/gimple-low.c
+++ b/gcc/gimple-low.c
@@ -177,25 +177,35 @@ lower_function_body (void)
   return 0;
 }
 
-struct gimple_opt_pass pass_lower_cf =
+class pass_lower_cf : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_lower_cf(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "lower",
+		      OPTGROUP_NONE,
+		      TV_NONE,
+		      pass_properties(required(PROP_gimple_any),
+				      provided(PROP_gimple_lcf),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return lower_function_body (); }
+
+}; // class pass_lower_cf
+
+gimple_opt_pass *
+make_pass_lower_cf (context &ctxt)
+{
+  return new pass_lower_cf (ctxt);
+}
 
 
 
diff --git a/gcc/gimple-ssa-strength-reduction.c b/gcc/gimple-ssa-strength-reduction.c
index 57b343a..da8d4fa 100644
--- a/gcc/gimple-ssa-strength-reduction.c
+++ b/gcc/gimple-ssa-strength-reduction.c
@@ -2688,22 +2688,32 @@ 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 */
- }
-};
+class pass_strength_reduction : public gimple_opt_pass
+{
+public:
+  pass_strength_reduction(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "slsr",
+		      OPTGROUP_NONE,
+		      TV_GIMPLE_SLSR,
+		      pass_properties(required(PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_verify_ssa)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_strength_reduction (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return execute_strength_reduction (); }
+
+}; // class pass_strength_reduction
+
+gimple_opt_pass *
+make_pass_strength_reduction (context &ctxt)
+{
+  return new pass_strength_reduction (ctxt);
+}
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c
index 4057577..d253964 100644
--- a/gcc/ifcvt.c
+++ b/gcc/ifcvt.c
@@ -4462,26 +4462,35 @@ rest_of_handle_if_conversion (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_rtl_ifcvt =
+class pass_rtl_ifcvt : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_rtl_ifcvt(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "ce1",
+		   OPTGROUP_NONE,
+		   TV_IFCVT,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_df_finish | TODO_verify_rtl_sharing | 0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_handle_if_conversion (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return rest_of_handle_if_conversion (); }
+
+}; // class pass_rtl_ifcvt
+
+rtl_opt_pass *
+make_pass_rtl_ifcvt (context &ctxt)
+{
+  return new pass_rtl_ifcvt (ctxt);
+}
 
 static bool
 gate_handle_if_after_combine (void)
@@ -4500,25 +4509,37 @@ rest_of_handle_if_after_combine (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_if_after_combine =
+class pass_if_after_combine : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_if_after_combine(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "ce2",
+		   OPTGROUP_NONE,
+		   TV_IFCVT,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_df_finish | TODO_verify_rtl_sharing)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_handle_if_after_combine (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () {
+    return rest_of_handle_if_after_combine ();
+  }
+
+}; // class pass_if_after_combine
+
+rtl_opt_pass *
+make_pass_if_after_combine (context &ctxt)
+{
+  return new pass_if_after_combine (ctxt);
+}
 
 
 static bool
@@ -4536,22 +4557,34 @@ rest_of_handle_if_after_reload (void)
 }
 
 
-struct rtl_opt_pass pass_if_after_reload =
+class pass_if_after_reload : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_if_after_reload(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "ce3",
+		   OPTGROUP_NONE,
+		   TV_IFCVT2,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_df_finish | TODO_verify_rtl_sharing)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_handle_if_after_reload (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () {
+    return rest_of_handle_if_after_reload ();
+  }
+
+}; // class pass_if_after_reload
+
+rtl_opt_pass *
+make_pass_if_after_reload (context &ctxt)
+{
+  return new pass_if_after_reload (ctxt);
+}
diff --git a/gcc/init-regs.c b/gcc/init-regs.c
index 270d39b..6363944 100644
--- a/gcc/init-regs.c
+++ b/gcc/init-regs.c
@@ -138,22 +138,34 @@ rest_of_handle_initialize_regs (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_initialize_regs =
+class pass_initialize_regs : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_initialize_regs(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "init-regs",
+		   OPTGROUP_NONE,
+		   TV_NONE,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_df_finish)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_initialize_regs (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () {
+    return rest_of_handle_initialize_regs ();
+  }
+
+}; // class pass_initialize_regs
+
+rtl_opt_pass *
+make_pass_initialize_regs (context &ctxt)
+{
+  return new pass_initialize_regs (ctxt);
+}
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
index 48521cf..49be835 100644
--- a/gcc/ipa-cp.c
+++ b/gcc/ipa-cp.c
@@ -3629,32 +3629,64 @@ 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 */
-};
+class pass_ipa_cp : public ipa_opt_pass_d
+{
+public:
+  pass_ipa_cp(context &ctxt)
+    : ipa_opt_pass_d(ctxt,
+		     "cp",
+		     OPTGROUP_NONE,
+		     TV_IPA_CONSTANT_PROP,
+		     pass_properties(required(0),
+				     provided(0),
+				     destroyed(0)),
+		     pass_todo_flags(start(0),
+				     finish(TODO_dump_symtab | TODO_remove_functions)),
+		     0) /* function_transform_todo_flags_start */
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return cgraph_gate_cp (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return ipcp_driver (); }
+
+  /* ipa_opt_pass_d methods: */
+  bool has_generate_summary () { return true; }
+  void impl_generate_summary () { ipcp_generate_summary (); }
+
+  bool has_write_summary () { return true; }
+  void impl_write_summary () { ipcp_write_summary (); }
+
+  bool has_read_summary () { return true; }
+  void impl_read_summary () { ipcp_read_summary (); }
+
+  bool has_write_optimization_summary () { return true; }
+  void impl_write_optimization_summary () {
+    ipa_prop_write_all_agg_replacement ();
+  }
+
+  bool has_read_optimization_summary () { return true; }
+  void impl_read_optimization_summary () {
+    ipa_prop_read_all_agg_replacement ();
+  }
+
+  bool has_stmt_fixup () { return false; }
+  void impl_stmt_fixup (struct cgraph_node *, gimple *) { }
+
+  bool has_function_transform () { return true; }
+  unsigned int impl_function_transform (struct cgraph_node *node) {
+    return ipcp_transform_function (node);
+  }
+
+  bool has_variable_transform () { return false; }
+  void impl_variable_transform (struct varpool_node *) { }
+
+}; // class pass_ipa_cp
+
+ipa_opt_pass_d *
+make_pass_ipa_cp (context &ctxt)
+{
+  return new pass_ipa_cp (ctxt);
+}
diff --git a/gcc/ipa-inline-analysis.c b/gcc/ipa-inline-analysis.c
index 138433c..7d09f56 100644
--- a/gcc/ipa-inline-analysis.c
+++ b/gcc/ipa-inline-analysis.c
@@ -2713,25 +2713,37 @@ 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 */
+class pass_inline_parameters : public gimple_opt_pass
+{
+public:
+  pass_inline_parameters(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "inline_param",
+		      OPTGROUP_INLINE,
+		      TV_INLINE_PARAMETERS,
+		      pass_properties(required(0),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () {
+    return compute_inline_parameters_for_current ();
   }
-};
+
+}; // class pass_inline_parameters
+
+gimple_opt_pass *
+make_pass_inline_parameters (context &ctxt)
+{
+  return new pass_inline_parameters (ctxt);
+}
 
 
 /* Estimate benefit devirtualizing indirect edge IE, provided KNOWN_VALS and
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c
index 964d1f9..8b65867 100644
--- a/gcc/ipa-inline.c
+++ b/gcc/ipa-inline.c
@@ -2073,25 +2073,35 @@ early_inliner (void)
   return todo;
 }
 
-struct gimple_opt_pass pass_early_inline =
+class pass_early_inline : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_early_inline(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "einline",
+		      OPTGROUP_INLINE,
+		      TV_EARLY_INLINING,
+		      pass_properties(required(PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return early_inliner (); }
+
+}; // class pass_early_inline
+
+gimple_opt_pass *
+make_pass_early_inline (context &ctxt)
+{
+  return new pass_early_inline (ctxt);
+}
 
 
 /* When to run IPA inlining.  Inlining of always-inline functions
@@ -2106,32 +2116,60 @@ gate_ipa_inline (void)
   return optimize || flag_lto || flag_wpa;
 }
 
-struct ipa_opt_pass_d pass_ipa_inline =
+class pass_ipa_inline : public ipa_opt_pass_d
 {
- {
-  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 */
-};
+public:
+  pass_ipa_inline(context &ctxt)
+    : ipa_opt_pass_d(ctxt,
+		     "inline",
+		     OPTGROUP_INLINE,
+		     TV_IPA_INLINING,
+		     pass_properties(required(0),
+				     provided(0),
+				     destroyed(0)),
+		     pass_todo_flags(start(TODO_remove_functions),
+				     finish(TODO_dump_symtab | TODO_remove_functions)),
+		     0) /* function_transform_todo_flags_start */
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_ipa_inline (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return ipa_inline (); }
+
+  /* ipa_opt_pass_d methods: */
+  bool has_generate_summary () { return true; }
+  void impl_generate_summary () { inline_generate_summary (); }
+
+  bool has_write_summary () { return true; }
+  void impl_write_summary () { inline_write_summary (); }
+
+  bool has_read_summary () { return true; }
+  void impl_read_summary () { inline_read_summary (); }
+
+  bool has_write_optimization_summary () { return false; }
+  void impl_write_optimization_summary () { }
+
+  bool has_read_optimization_summary () { return false; }
+  void impl_read_optimization_summary () { }
+
+  bool has_stmt_fixup () { return false; }
+  void impl_stmt_fixup (struct cgraph_node *, gimple *) { }
+
+  bool has_function_transform () { return true; }
+  unsigned int impl_function_transform (struct cgraph_node *node) {
+    return inline_transform (node);
+  }
+
+  bool has_variable_transform () { return false; }
+  void impl_variable_transform (struct varpool_node *) { }
+
+}; // class pass_ipa_inline
+
+ipa_opt_pass_d *
+make_pass_ipa_inline (context &ctxt)
+{
+  return new pass_ipa_inline (ctxt);
+}
diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c
index 94c7315..822d4eb 100644
--- a/gcc/ipa-pure-const.c
+++ b/gcc/ipa-pure-const.c
@@ -1495,34 +1495,61 @@ gate_pure_const (void)
 	  && !seen_error ());
 }
 
-struct ipa_opt_pass_d pass_ipa_pure_const =
+class pass_ipa_pure_const : public ipa_opt_pass_d
 {
- {
-  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 */
- },
- 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 */
-};
+public:
+  pass_ipa_pure_const(context &ctxt)
+    : ipa_opt_pass_d(ctxt,
+		     "pure-const",
+		     OPTGROUP_NONE,
+		     TV_IPA_PURE_CONST,
+		     pass_properties(required(0),
+				     provided(0),
+				     destroyed(0)),
+		     pass_todo_flags(start(0),
+				     finish(0)),
+		     0) /* function_transform_todo_flags_start */
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_pure_const (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return propagate (); }
+
+  /* ipa_opt_pass_d methods: */
+  bool has_generate_summary () { return true; }
+  void impl_generate_summary () { generate_summary (); }
+
+  bool has_write_summary () { return true; }
+  void impl_write_summary () { pure_const_write_summary (); }
+
+  bool has_read_summary () { return true; }
+  void impl_read_summary () { pure_const_read_summary (); }
+
+  bool has_write_optimization_summary () { return false; }
+  void impl_write_optimization_summary () { }
+
+  bool has_read_optimization_summary () { return false; }
+  void impl_read_optimization_summary () { }
+
+  bool has_stmt_fixup () { return false; }
+  void impl_stmt_fixup (struct cgraph_node *, gimple *) { }
+
+  bool has_function_transform () { return false; }
+  unsigned int impl_function_transform (struct cgraph_node *) { return 0; }
+
+  bool has_variable_transform () { return false; }
+  void impl_variable_transform (struct varpool_node *) { }
+
+}; // class pass_ipa_pure_const
+
+ipa_opt_pass_d *
+make_pass_ipa_pure_const (context &ctxt)
+{
+  return new pass_ipa_pure_const (ctxt);
+}
 
 /* Return true if function should be skipped for local pure const analysis.  */
 
@@ -1661,22 +1688,32 @@ local_pure_const (void)
     return 0;
 }
 
-struct gimple_opt_pass pass_local_pure_const =
+class pass_local_pure_const : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_local_pure_const(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "local-pure-const",
+		      OPTGROUP_NONE,
+		      TV_IPA_PURE_CONST,
+		      pass_properties(required(0),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_pure_const (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return local_pure_const (); }
+
+}; // class pass_local_pure_const
+
+gimple_opt_pass *
+make_pass_local_pure_const (context &ctxt)
+{
+  return new pass_local_pure_const (ctxt);
+}
diff --git a/gcc/ipa-reference.c b/gcc/ipa-reference.c
index f3c483f..22fb85f 100644
--- a/gcc/ipa-reference.c
+++ b/gcc/ipa-reference.c
@@ -1155,31 +1155,62 @@ gate_reference (void)
 	  && !seen_error ());
 }
 
-struct ipa_opt_pass_d pass_ipa_reference =
+class pass_ipa_reference : public ipa_opt_pass_d
 {
- {
-  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 */
-};
+public:
+  pass_ipa_reference(context &ctxt)
+    : ipa_opt_pass_d(ctxt,
+		     "static-var",
+		     OPTGROUP_NONE,
+		     TV_IPA_REFERENCE,
+		     pass_properties(required(0),
+				     provided(0),
+				     destroyed(0)),
+		     pass_todo_flags(start(0),
+				     finish(0)),
+		     0) /* function_transform_todo_flags_start */
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_reference (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return propagate (); }
+
+  /* ipa_opt_pass_d methods: */
+  bool has_generate_summary () { return false; }
+  void impl_generate_summary () { }
+
+  bool has_write_summary () { return false; }
+  void impl_write_summary () { }
+
+  bool has_read_summary () { return false; }
+  void impl_read_summary () { }
+
+  bool has_write_optimization_summary () { return true; }
+  void impl_write_optimization_summary () {
+    ipa_reference_write_optimization_summary ();
+  }
+
+  bool has_read_optimization_summary () { return true; }
+  void impl_read_optimization_summary () {
+    ipa_reference_read_optimization_summary ();
+  }
+
+  bool has_stmt_fixup () { return false; }
+  void impl_stmt_fixup (struct cgraph_node *, gimple *) { }
+
+  bool has_function_transform () { return false; }
+  unsigned int impl_function_transform (struct cgraph_node *) { return 0; }
+
+  bool has_variable_transform () { return false; }
+  void impl_variable_transform (struct varpool_node *) { }
+
+}; // class pass_ipa_reference
+
+ipa_opt_pass_d *
+make_pass_ipa_reference (context &ctxt)
+{
+  return new pass_ipa_reference (ctxt);
+}
diff --git a/gcc/ipa-split.c b/gcc/ipa-split.c
index e7d469d..7682c83 100644
--- a/gcc/ipa-split.c
+++ b/gcc/ipa-split.c
@@ -1593,25 +1593,35 @@ gate_split_functions (void)
 	  && !profile_arc_flag && !flag_branch_probabilities);
 }
 
-struct gimple_opt_pass pass_split_functions =
+class pass_split_functions : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_split_functions(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "fnsplit",
+		      OPTGROUP_NONE,
+		      TV_IPA_FNSPLIT,
+		      pass_properties(required(PROP_cfg),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_verify_all)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_split_functions (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return execute_split_functions (); }
+
+}; // class pass_split_functions
+
+gimple_opt_pass *
+make_pass_split_functions (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
@@ -1635,22 +1645,34 @@ execute_feedback_split_functions (void)
   return retval;
 }
 
-struct gimple_opt_pass pass_feedback_split_functions =
+class pass_feedback_split_functions : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_feedback_split_functions(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "feedback_fnsplit",
+		      OPTGROUP_NONE,
+		      TV_IPA_FNSPLIT,
+		      pass_properties(required(PROP_cfg),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_verify_all)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_feedback_split_functions (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () {
+    return execute_feedback_split_functions ();
+  }
+
+}; // class pass_feedback_split_functions
+
+gimple_opt_pass *
+make_pass_feedback_split_functions (context &ctxt)
+{
+  return new pass_feedback_split_functions (ctxt);
+}
diff --git a/gcc/ipa.c b/gcc/ipa.c
index cb7b6b5..c88e7e0 100644
--- a/gcc/ipa.c
+++ b/gcc/ipa.c
@@ -898,25 +898,37 @@ 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 =
+class pass_ipa_function_and_variable_visibility : public simple_ipa_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_ipa_function_and_variable_visibility(context &ctxt)
+    : simple_ipa_opt_pass(ctxt,
+			  "visibility",
+			  OPTGROUP_NONE,
+			  TV_CGRAPHOPT,
+			  pass_properties(required(0),
+					  provided(0),
+					  destroyed(0)),
+			  pass_todo_flags(start(0),
+					  finish(TODO_remove_functions | TODO_dump_symtab)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () {
+    return local_function_and_variable_visibility ();
+  }
+
+}; // class pass_ipa_function_and_variable_visibility
+
+simple_ipa_opt_pass *
+make_pass_ipa_function_and_variable_visibility (context &ctxt)
+{
+  return new pass_ipa_function_and_variable_visibility (ctxt);
+}
 
 /* Free inline summary.  */
 
@@ -927,25 +939,35 @@ free_inline_summary (void)
   return 0;
 }
 
-struct simple_ipa_opt_pass pass_ipa_free_inline_summary =
+class pass_ipa_free_inline_summary : public simple_ipa_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_ipa_free_inline_summary(context &ctxt)
+    : simple_ipa_opt_pass(ctxt,
+			  "*free_inline_summary",
+			  OPTGROUP_NONE,
+			  TV_IPA_FREE_INLINE_SUMMARY,
+			  pass_properties(required(0),
+					  provided(0),
+					  destroyed(0)),
+			  pass_todo_flags(start(0),
+					  finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return free_inline_summary (); }
+
+}; // class pass_ipa_free_inline_summary
+
+simple_ipa_opt_pass *
+make_pass_ipa_free_inline_summary (context &ctxt)
+{
+  return new pass_ipa_free_inline_summary (ctxt);
+}
 
 /* Do not re-run on ltrans stage.  */
 
@@ -966,34 +988,65 @@ whole_program_function_and_variable_visibility (void)
   return 0;
 }
 
-struct ipa_opt_pass_d pass_ipa_whole_program_visibility =
+class pass_ipa_whole_program_visibility : public ipa_opt_pass_d
 {
- {
-  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 */
-};
+public:
+  pass_ipa_whole_program_visibility(context &ctxt)
+    : ipa_opt_pass_d(ctxt,
+		     "whole-program",
+		     OPTGROUP_NONE,
+		     TV_CGRAPHOPT,
+		     pass_properties(required(0),
+				     provided(0),
+				     destroyed(0)),
+		     pass_todo_flags(start(0),
+				     finish(TODO_remove_functions | TODO_dump_symtab)),
+		     0) /* function_transform_todo_flags_start */
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () {
+    return gate_whole_program_function_and_variable_visibility ();
+  }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () {
+    return whole_program_function_and_variable_visibility ();
+  }
+
+  /* ipa_opt_pass_d methods: */
+  bool has_generate_summary () { return false; }
+  void impl_generate_summary () { }
+
+  bool has_write_summary () { return false; }
+  void impl_write_summary () { }
+
+  bool has_read_summary () { return false; }
+  void impl_read_summary () { }
+
+  bool has_write_optimization_summary () { return false; }
+  void impl_write_optimization_summary () { }
+
+  bool has_read_optimization_summary () { return false; }
+  void impl_read_optimization_summary () { }
+
+  bool has_stmt_fixup () { return false; }
+  void impl_stmt_fixup (struct cgraph_node *, gimple *) { }
+
+  bool has_function_transform () { return false; }
+  unsigned int impl_function_transform (struct cgraph_node *) { return 0; }
+
+  bool has_variable_transform () { return false; }
+  void impl_variable_transform (struct varpool_node *) { }
+
+}; // class pass_ipa_whole_program_visibility
+
+ipa_opt_pass_d *
+make_pass_ipa_whole_program_visibility (context &ctxt)
+{
+  return new pass_ipa_whole_program_visibility (ctxt);
+}
 
 /* Entry in the histogram.  */
 
@@ -1313,34 +1366,61 @@ gate_ipa_profile (void)
   return flag_ipa_profile;
 }
 
-struct ipa_opt_pass_d pass_ipa_profile =
+class pass_ipa_profile : public ipa_opt_pass_d
 {
- {
-  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 */
-};
+public:
+  pass_ipa_profile(context &ctxt)
+    : ipa_opt_pass_d(ctxt,
+		     "profile_estimate",
+		     OPTGROUP_NONE,
+		     TV_IPA_PROFILE,
+		     pass_properties(required(0),
+				     provided(0),
+				     destroyed(0)),
+		     pass_todo_flags(start(0),
+				     finish(0)),
+		     0) /* function_transform_todo_flags_start */
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_ipa_profile (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return ipa_profile (); }
+
+  /* ipa_opt_pass_d methods: */
+  bool has_generate_summary () { return true; }
+  void impl_generate_summary () { ipa_profile_generate_summary (); }
+
+  bool has_write_summary () { return true; }
+  void impl_write_summary () { ipa_profile_write_summary (); }
+
+  bool has_read_summary () { return true; }
+  void impl_read_summary () { ipa_profile_read_summary (); }
+
+  bool has_write_optimization_summary () { return false; }
+  void impl_write_optimization_summary () { }
+
+  bool has_read_optimization_summary () { return false; }
+  void impl_read_optimization_summary () { }
+
+  bool has_stmt_fixup () { return false; }
+  void impl_stmt_fixup (struct cgraph_node *, gimple *) { }
+
+  bool has_function_transform () { return false; }
+  unsigned int impl_function_transform (struct cgraph_node *) { return 0; }
+
+  bool has_variable_transform () { return false; }
+  void impl_variable_transform (struct varpool_node *) { }
+
+}; // class pass_ipa_profile
+
+ipa_opt_pass_d *
+make_pass_ipa_profile (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
@@ -1624,31 +1704,58 @@ gate_ipa_cdtor_merge (void)
   return !targetm.have_ctors_dtors || (optimize && in_lto_p);
 }
 
-struct ipa_opt_pass_d pass_ipa_cdtor_merge =
+class pass_ipa_cdtor_merge : public ipa_opt_pass_d
 {
- {
-  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 */
-};
+public:
+  pass_ipa_cdtor_merge(context &ctxt)
+    : ipa_opt_pass_d(ctxt,
+		     "cdtor",
+		     OPTGROUP_NONE,
+		     TV_CGRAPHOPT,
+		     pass_properties(required(0),
+				     provided(0),
+				     destroyed(0)),
+		     pass_todo_flags(start(0),
+				     finish(0)),
+		     0) /* function_transform_todo_flags_start */
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_ipa_cdtor_merge (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return ipa_cdtor_merge (); }
+
+  /* ipa_opt_pass_d methods: */
+  bool has_generate_summary () { return false; }
+  void impl_generate_summary () { }
+
+  bool has_write_summary () { return false; }
+  void impl_write_summary () { }
+
+  bool has_read_summary () { return false; }
+  void impl_read_summary () { }
+
+  bool has_write_optimization_summary () { return false; }
+  void impl_write_optimization_summary () { }
+
+  bool has_read_optimization_summary () { return false; }
+  void impl_read_optimization_summary () { }
+
+  bool has_stmt_fixup () { return false; }
+  void impl_stmt_fixup (struct cgraph_node *, gimple *) { }
+
+  bool has_function_transform () { return false; }
+  unsigned int impl_function_transform (struct cgraph_node *) { return 0; }
+
+  bool has_variable_transform () { return false; }
+  void impl_variable_transform (struct varpool_node *) { }
+
+}; // class pass_ipa_cdtor_merge
+
+ipa_opt_pass_d *
+make_pass_ipa_cdtor_merge (context &ctxt)
+{
+  return new pass_ipa_cdtor_merge (ctxt);
+}
diff --git a/gcc/ira.c b/gcc/ira.c
index cfa287f..d086084 100644
--- a/gcc/ira.c
+++ b/gcc/ira.c
@@ -4705,25 +4705,35 @@ rest_of_handle_ira (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_ira =
+class pass_ira : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_ira(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "ira",
+		   OPTGROUP_NONE,
+		   TV_IRA,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_do_not_ggc_collect)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return rest_of_handle_ira (); }
+
+}; // class pass_ira
+
+rtl_opt_pass *
+make_pass_ira (context &ctxt)
+{
+  return new pass_ira (ctxt);
+}
 
 static unsigned int
 rest_of_handle_reload (void)
@@ -4732,22 +4742,32 @@ rest_of_handle_reload (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_reload =
+class pass_reload : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_reload(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "reload",
+		   OPTGROUP_NONE,
+		   TV_RELOAD,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return rest_of_handle_reload (); }
+
+}; // class pass_reload
+
+rtl_opt_pass *
+make_pass_reload (context &ctxt)
+{
+  return new pass_reload (ctxt);
+}
diff --git a/gcc/jump.c b/gcc/jump.c
index 9a171f4..b602415 100644
--- a/gcc/jump.c
+++ b/gcc/jump.c
@@ -139,25 +139,35 @@ cleanup_barriers (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_cleanup_barriers =
+class pass_cleanup_barriers : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_cleanup_barriers(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "barriers",
+		   OPTGROUP_NONE,
+		   TV_NONE,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return cleanup_barriers (); }
+
+}; // class pass_cleanup_barriers
+
+rtl_opt_pass *
+make_pass_cleanup_barriers (context &ctxt)
+{
+  return new pass_cleanup_barriers (ctxt);
+}
 
 
 /* Initialize LABEL_NUSES and JUMP_LABEL fields, add REG_LABEL_TARGET
diff --git a/gcc/loop-init.c b/gcc/loop-init.c
index 92d621e..04b8a5b 100644
--- a/gcc/loop-init.c
+++ b/gcc/loop-init.c
@@ -302,25 +302,35 @@ gate_handle_loop2 (void)
     } 
 }
 
-struct rtl_opt_pass pass_loop2 =
+class pass_loop2 : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_loop2(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "loop2",
+		   OPTGROUP_LOOP,
+		   TV_LOOP,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_handle_loop2 (); }
+
+  bool has_execute () { return false; }
+  unsigned int impl_execute () { return 0; }
+
+}; // class pass_loop2
+
+rtl_opt_pass *
+make_pass_loop2 (context &ctxt)
+{
+  return new pass_loop2 (ctxt);
+}
 
 
 /* Initialization of the RTL loop passes.  */
@@ -339,25 +349,35 @@ rtl_loop_init (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_rtl_loop_init =
+class pass_rtl_loop_init : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_rtl_loop_init(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "loop2_init",
+		   OPTGROUP_LOOP,
+		   TV_LOOP,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_verify_rtl_sharing)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return rtl_loop_init (); }
+
+}; // class pass_rtl_loop_init
+
+rtl_opt_pass *
+make_pass_rtl_loop_init (context &ctxt)
+{
+  return new pass_rtl_loop_init (ctxt);
+}
 
 
 /* Finalization of the RTL loop passes.  */
@@ -380,26 +400,35 @@ rtl_loop_done (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_rtl_loop_done =
+class pass_rtl_loop_done : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_rtl_loop_done(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "loop2_done",
+		   OPTGROUP_LOOP,
+		   TV_LOOP,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(PROP_loops)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_verify_flow | TODO_verify_rtl_sharing)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return rtl_loop_done (); }
+
+}; // class pass_rtl_loop_done
+
+rtl_opt_pass *
+make_pass_rtl_loop_done (context &ctxt)
+{
+  return new pass_rtl_loop_done (ctxt);
+}
 
 
 /* Loop invariant code motion.  */
@@ -417,26 +446,35 @@ rtl_move_loop_invariants (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_rtl_move_loop_invariants =
+class pass_rtl_move_loop_invariants : public rtl_opt_pass
+{
+public:
+  pass_rtl_move_loop_invariants(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "loop2_invariant",
+		   OPTGROUP_LOOP,
+		   TV_LOOP_MOVE_INVARIANTS,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_df_verify | TODO_df_finish | TODO_verify_rtl_sharing)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_rtl_move_loop_invariants (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return rtl_move_loop_invariants (); }
+
+}; // class pass_rtl_move_loop_invariants
+
+rtl_opt_pass *
+make_pass_rtl_move_loop_invariants (context &ctxt)
 {
- {
-  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 */
- }
-};
+  return new pass_rtl_move_loop_invariants (ctxt);
+}
 
 
 /* Loop unswitching for RTL.  */
@@ -454,25 +492,35 @@ rtl_unswitch (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_rtl_unswitch =
+class pass_rtl_unswitch : public rtl_opt_pass
+{
+public:
+  pass_rtl_unswitch(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "loop2_unswitch",
+		   OPTGROUP_LOOP,
+		   TV_LOOP_UNSWITCH,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_verify_rtl_sharing)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_rtl_unswitch (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return rtl_unswitch (); }
+
+}; // class pass_rtl_unswitch
+
+rtl_opt_pass *
+make_pass_rtl_unswitch (context &ctxt)
 {
- {
-  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 */
- }
-};
+  return new pass_rtl_unswitch (ctxt);
+}
 
 
 /* Loop unswitching for RTL.  */
@@ -503,25 +551,35 @@ rtl_unroll_and_peel_loops (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_rtl_unroll_and_peel_loops =
+class pass_rtl_unroll_and_peel_loops : public rtl_opt_pass
+{
+public:
+  pass_rtl_unroll_and_peel_loops(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "loop2_unroll",
+		   OPTGROUP_LOOP,
+		   TV_LOOP_UNROLL,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_verify_rtl_sharing)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_rtl_unroll_and_peel_loops (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return rtl_unroll_and_peel_loops (); }
+
+}; // class pass_rtl_unroll_and_peel_loops
+
+rtl_opt_pass *
+make_pass_rtl_unroll_and_peel_loops (context &ctxt)
 {
- {
-  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 */
- }
-};
+  return new pass_rtl_unroll_and_peel_loops (ctxt);
+}
 
 
 /* The doloop optimization.  */
@@ -545,22 +603,32 @@ rtl_doloop (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_rtl_doloop =
+class pass_rtl_doloop : public rtl_opt_pass
+{
+public:
+  pass_rtl_doloop(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "loop2_doloop",
+		   OPTGROUP_LOOP,
+		   TV_LOOP_DOLOOP,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_verify_rtl_sharing)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_rtl_doloop (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return rtl_doloop (); }
+
+}; // class pass_rtl_doloop
+
+rtl_opt_pass *
+make_pass_rtl_doloop (context &ctxt)
 {
- {
-  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 */
- }
-};
+  return new pass_rtl_doloop (ctxt);
+}
diff --git a/gcc/lower-subreg.c b/gcc/lower-subreg.c
index eb22d8c..09cd898 100644
--- a/gcc/lower-subreg.c
+++ b/gcc/lower-subreg.c
@@ -1689,43 +1689,62 @@ rest_of_handle_lower_subreg2 (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_lower_subreg =
+class pass_lower_subreg : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_lower_subreg(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "subreg1",
+		   OPTGROUP_NONE,
+		   TV_LOWER_SUBREG,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_verify_flow)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_handle_lower_subreg (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return rest_of_handle_lower_subreg (); }
+
+}; // class pass_lower_subreg
+
+rtl_opt_pass *
+make_pass_lower_subreg (context &ctxt)
+{
+  return new pass_lower_subreg (ctxt);
+}
 
-struct rtl_opt_pass pass_lower_subreg2 =
+class pass_lower_subreg2 : public rtl_opt_pass
 {
- {
-  RTL_PASS,
-  "subreg2",	                        /* name */
-  OPTGROUP_NONE,                        /* optinfo_flags */
-  gate_handle_lower_subreg,             /* gate */
-  rest_of_handle_lower_subreg2,          /* execute */
-  NULL,                                 /* sub */
-  NULL,                                 /* next */
-  0,                                    /* static_pass_number */
-  TV_LOWER_SUBREG,                      /* tv_id */
-  0,                                    /* properties_required */
-  0,                                    /* properties_provided */
-  0,                                    /* properties_destroyed */
-  0,                                    /* todo_flags_start */
-  TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_verify_flow                      /* todo_flags_finish */
- }
-};
+public:
+  pass_lower_subreg2(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "subreg2",
+		   OPTGROUP_NONE,
+		   TV_LOWER_SUBREG,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_df_finish | TODO_verify_rtl_sharing | TODO_verify_flow)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_handle_lower_subreg (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return rest_of_handle_lower_subreg2 (); }
+
+}; // class pass_lower_subreg2
+
+rtl_opt_pass *
+make_pass_lower_subreg2 (context &ctxt)
+{
+  return new pass_lower_subreg2 (ctxt);
+}
diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c
index f9184c3..a0fea80 100644
--- a/gcc/lto-streamer-out.c
+++ b/gcc/lto-streamer-out.c
@@ -1004,34 +1004,61 @@ lto_output (void)
 #endif
 }
 
-struct ipa_opt_pass_d pass_ipa_lto_gimple_out =
+class pass_ipa_lto_gimple_out : public ipa_opt_pass_d
 {
- {
-  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 */
-};
+public:
+  pass_ipa_lto_gimple_out(context &ctxt)
+    : ipa_opt_pass_d(ctxt,
+		     "lto_gimple_out",
+		     OPTGROUP_NONE,
+		     TV_IPA_LTO_GIMPLE_OUT,
+		     pass_properties(required(0),
+				     provided(0),
+				     destroyed(0)),
+		     pass_todo_flags(start(0),
+				     finish(0)),
+		     0) /* function_transform_todo_flags_start */
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_lto_out (); }
+
+  bool has_execute () { return false; }
+  unsigned int impl_execute () { return 0; }
+
+  /* ipa_opt_pass_d methods: */
+  bool has_generate_summary () { return false; }
+  void impl_generate_summary () { }
+
+  bool has_write_summary () { return true; }
+  void impl_write_summary () { lto_output (); }
+
+  bool has_read_summary () { return false; }
+  void impl_read_summary () { }
+
+  bool has_write_optimization_summary () { return true; }
+  void impl_write_optimization_summary () { lto_output (); }
+
+  bool has_read_optimization_summary () { return false; }
+  void impl_read_optimization_summary () { }
+
+  bool has_stmt_fixup () { return false; }
+  void impl_stmt_fixup (struct cgraph_node *, gimple *) { }
+
+  bool has_function_transform () { return false; }
+  unsigned int impl_function_transform (struct cgraph_node *) { return 0; }
+
+  bool has_variable_transform () { return false; }
+  void impl_variable_transform (struct varpool_node *) { }
+
+}; // class pass_ipa_lto_gimple_out
+
+ipa_opt_pass_d *
+make_pass_ipa_lto_gimple_out (context &ctxt)
+{
+  return new pass_ipa_lto_gimple_out (ctxt);
+}
 
 
 /* Write each node in encoded by ENCODER to OB, as well as those reachable
@@ -1459,31 +1486,58 @@ produce_asm_for_decls (void)
 }
 
 
-struct ipa_opt_pass_d pass_ipa_lto_finish_out =
+class pass_ipa_lto_finish_out : public ipa_opt_pass_d
 {
- {
-  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 */
-};
+public:
+  pass_ipa_lto_finish_out(context &ctxt)
+    : ipa_opt_pass_d(ctxt,
+		     "lto_decls_out",
+		     OPTGROUP_NONE,
+		     TV_IPA_LTO_DECL_OUT,
+		     pass_properties(required(0),
+				     provided(0),
+				     destroyed(0)),
+		     pass_todo_flags(start(0),
+				     finish(0)),
+		     0) /* function_transform_todo_flags_start */
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_lto_out (); }
+
+  bool has_execute () { return false; }
+  unsigned int impl_execute () { return 0; }
+
+  /* ipa_opt_pass_d methods: */
+  bool has_generate_summary () { return false; }
+  void impl_generate_summary () { }
+
+  bool has_write_summary () { return true; }
+  void impl_write_summary () { produce_asm_for_decls (); }
+
+  bool has_read_summary () { return false; }
+  void impl_read_summary () { }
+
+  bool has_write_optimization_summary () { return true; }
+  void impl_write_optimization_summary () { produce_asm_for_decls (); }
+
+  bool has_read_optimization_summary () { return false; }
+  void impl_read_optimization_summary () { }
+
+  bool has_stmt_fixup () { return false; }
+  void impl_stmt_fixup (struct cgraph_node *, gimple *) { }
+
+  bool has_function_transform () { return false; }
+  unsigned int impl_function_transform (struct cgraph_node *) { return 0; }
+
+  bool has_variable_transform () { return false; }
+  void impl_variable_transform (struct varpool_node *) { }
+
+}; // class pass_ipa_lto_finish_out
+
+ipa_opt_pass_d *
+make_pass_ipa_lto_finish_out (context &ctxt)
+{
+  return new pass_ipa_lto_finish_out (ctxt);
+}
diff --git a/gcc/mode-switching.c b/gcc/mode-switching.c
index 2bcb154..0803fad 100644
--- a/gcc/mode-switching.c
+++ b/gcc/mode-switching.c
@@ -777,23 +777,32 @@ rest_of_handle_mode_switching (void)
 }
 
 
-struct rtl_opt_pass pass_mode_switching =
+class pass_mode_switching : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_mode_switching(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "mode_sw",
+		   OPTGROUP_NONE,
+		   TV_MODE_SWITCH,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_df_finish | TODO_verify_rtl_sharing | 0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_mode_switching (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return rest_of_handle_mode_switching (); }
+
+}; // class pass_mode_switching
+
+rtl_opt_pass *
+make_pass_mode_switching (context &ctxt)
+{
+  return new pass_mode_switching (ctxt);
+}
diff --git a/gcc/modulo-sched.c b/gcc/modulo-sched.c
index 6ce79a9..6bb58e0 100644
--- a/gcc/modulo-sched.c
+++ b/gcc/modulo-sched.c
@@ -3351,24 +3351,32 @@ 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 */
- }
-};
+class pass_sms : public rtl_opt_pass
+{
+public:
+  pass_sms(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "sms",
+		   OPTGROUP_NONE,
+		   TV_SMS,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_df_finish | TODO_verify_flow | TODO_verify_rtl_sharing)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_handle_sms (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return rest_of_handle_sms (); }
+
+}; // class pass_sms
+
+rtl_opt_pass *
+make_pass_sms (context &ctxt)
+{
+  return new pass_sms (ctxt);
+}
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index 3e519db..51bb617 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -5785,25 +5785,35 @@ gate_expand_omp (void)
   return (flag_openmp != 0 && !seen_error ());
 }
 
-struct gimple_opt_pass pass_expand_omp =
+class pass_expand_omp : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_expand_omp(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "ompexp",
+		      OPTGROUP_NONE,
+		      TV_NONE,
+		      pass_properties(required(PROP_gimple_any),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_expand_omp (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return execute_expand_omp (); }
+
+}; // class pass_expand_omp
+
+gimple_opt_pass *
+make_pass_expand_omp (context &ctxt)
+{
+  return new pass_expand_omp (ctxt);
+}
 
 /* Routines to lower OpenMP directives into OMP-GIMPLE.  */
 
@@ -6960,25 +6970,35 @@ execute_lower_omp (void)
   return 0;
 }
 
-struct gimple_opt_pass pass_lower_omp =
+class pass_lower_omp : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_lower_omp(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "omplower",
+		      OPTGROUP_NONE,
+		      TV_NONE,
+		      pass_properties(required(PROP_gimple_any),
+				      provided(PROP_gimple_lomp),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return execute_lower_omp (); }
+
+}; // class pass_lower_omp
+
+gimple_opt_pass *
+make_pass_lower_omp (context &ctxt)
+{
+  return new pass_lower_omp (ctxt);
+}
 
 /* The following is a utility to diagnose OpenMP structured block violations.
    It is not part of the "omplower" pass, as that's invoked too late.  It
@@ -7224,24 +7244,36 @@ gate_diagnose_omp_blocks (void)
   return flag_openmp != 0;
 }
 
-struct gimple_opt_pass pass_diagnose_omp_blocks =
+class pass_diagnose_omp_blocks : public gimple_opt_pass
 {
-  {
-    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 */
+public:
+  pass_diagnose_omp_blocks(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "*diagnose_omp_blocks",
+		      OPTGROUP_NONE,
+		      TV_NONE,
+		      pass_properties(required(PROP_gimple_any),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_diagnose_omp_blocks (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () {
+    return diagnose_omp_structured_block_errors ();
   }
-};
+
+}; // class pass_diagnose_omp_blocks
+
+gimple_opt_pass *
+make_pass_diagnose_omp_blocks (context &ctxt)
+{
+  return new pass_diagnose_omp_blocks (ctxt);
+}
 
 #include "gt-omp-low.h"
diff --git a/gcc/passes.c b/gcc/passes.c
index 32c5bed..ed7ae6c 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -276,25 +276,37 @@ 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 */
- }
-};
+class pass_early_local_passes : public simple_ipa_opt_pass
+{
+public:
+  pass_early_local_passes(context &ctxt)
+    : simple_ipa_opt_pass(ctxt,
+			  "early_local_cleanups",
+			  OPTGROUP_NONE,
+			  TV_EARLY_LOCAL,
+			  pass_properties(required(0),
+					  provided(0),
+					  destroyed(0)),
+			  pass_todo_flags(start(0),
+					  finish(TODO_remove_functions)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_all_early_local_passes (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () {
+    return execute_all_early_local_passes ();
+  }
+
+}; // class pass_early_local_passes
+
+simple_ipa_opt_pass *
+make_pass_early_local_passes (context &ctxt)
+{
+  return new pass_early_local_passes (ctxt);
+}
 
 /* Gate: execute, or not, all of the non-trivial optimizations.  */
 
@@ -306,25 +318,35 @@ 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 */
- }
-};
+class pass_all_early_optimizations : public gimple_opt_pass
+{
+public:
+  pass_all_early_optimizations(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "early_optimizations",
+		      OPTGROUP_NONE,
+		      TV_NONE,
+		      pass_properties(required(0),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_all_early_optimizations (); }
+
+  bool has_execute () { return false; }
+  unsigned int impl_execute () { return 0; }
+
+}; // class pass_all_early_optimizations
+
+static gimple_opt_pass *
+make_pass_all_early_optimizations (context &ctxt)
+{
+  return new pass_all_early_optimizations (ctxt);
+}
 
 /* Gate: execute, or not, all of the non-trivial optimizations.  */
 
@@ -334,25 +356,35 @@ 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 */
- }
-};
+class pass_all_optimizations : public gimple_opt_pass
+{
+public:
+  pass_all_optimizations(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "*all_optimizations",
+		      OPTGROUP_NONE,
+		      TV_OPTIMIZE,
+		      pass_properties(required(0),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_all_optimizations (); }
+
+  bool has_execute () { return false; }
+  unsigned int impl_execute () { return 0; }
+
+}; // class pass_all_optimizations
+
+static gimple_opt_pass *
+make_pass_all_optimizations (context &ctxt)
+{
+  return new pass_all_optimizations (ctxt);
+}
 
 /* Gate: execute, or not, all of the non-trivial optimizations.  */
 
@@ -362,25 +394,35 @@ 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 */
- }
-};
+class pass_all_optimizations_g : public gimple_opt_pass
+{
+public:
+  pass_all_optimizations_g(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "*all_optimizations_g",
+		      OPTGROUP_NONE,
+		      TV_OPTIMIZE,
+		      pass_properties(required(0),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_all_optimizations_g (); }
+
+  bool has_execute () { return false; }
+  unsigned int impl_execute () { return 0; }
+
+}; // class pass_all_optimizations_g
+
+static gimple_opt_pass *
+make_pass_all_optimizations_g (context &ctxt)
+{
+  return new pass_all_optimizations_g (ctxt);
+}
 
 static bool
 gate_rest_of_compilation (void)
@@ -390,25 +432,35 @@ 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 */
- }
-};
+class pass_rest_of_compilation : public rtl_opt_pass
+{
+public:
+  pass_rest_of_compilation(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "*rest_of_compilation",
+		   OPTGROUP_NONE,
+		   TV_REST_OF_COMPILATION,
+		   pass_properties(required(PROP_rtl),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_rest_of_compilation (); }
+
+  bool has_execute () { return false; }
+  unsigned int impl_execute () { return 0; }
+
+}; // class pass_rest_of_compilation
+
+static rtl_opt_pass *
+make_pass_rest_of_compilation (context &ctxt)
+{
+  return new pass_rest_of_compilation (ctxt);
+}
 
 static bool
 gate_postreload (void)
@@ -416,25 +468,35 @@ 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 */
- }
-};
+class pass_postreload : public rtl_opt_pass
+{
+public:
+  pass_postreload(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "*all-postreload",
+		   OPTGROUP_NONE,
+		   TV_POSTRELOAD,
+		   pass_properties(required(PROP_rtl),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_verify_rtl_sharing)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_postreload (); }
+
+  bool has_execute () { return false; }
+  unsigned int impl_execute () { return 0; }
+
+}; // class pass_postreload
+
+static rtl_opt_pass *
+make_pass_postreload (context &ctxt)
+{
+  return new pass_postreload (ctxt);
+}
 
 
 
diff --git a/gcc/postreload-gcse.c b/gcc/postreload-gcse.c
index b9befe0..fa62379 100644
--- a/gcc/postreload-gcse.c
+++ b/gcc/postreload-gcse.c
@@ -1322,23 +1322,32 @@ rest_of_handle_gcse2 (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_gcse2 =
+class pass_gcse2 : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_gcse2(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "gcse2",
+		   OPTGROUP_NONE,
+		   TV_GCSE_AFTER_RELOAD,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_verify_rtl_sharing | TODO_verify_flow)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_handle_gcse2 (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return rest_of_handle_gcse2 (); }
+
+}; // class pass_gcse2
+
+rtl_opt_pass *
+make_pass_gcse2 (context &ctxt)
+{
+  return new pass_gcse2 (ctxt);
+}
diff --git a/gcc/postreload.c b/gcc/postreload.c
index 33462e4..d91c91e 100644
--- a/gcc/postreload.c
+++ b/gcc/postreload.c
@@ -2300,23 +2300,32 @@ rest_of_handle_postreload (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_postreload_cse =
+class pass_postreload_cse : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_postreload_cse(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "postreload",
+		   OPTGROUP_NONE,
+		   TV_RELOAD_CSE_REGS,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_df_finish | TODO_verify_rtl_sharing | 0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_handle_postreload (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return rest_of_handle_postreload (); }
+
+}; // class pass_postreload_cse
+
+rtl_opt_pass *
+make_pass_postreload_cse (context &ctxt)
+{
+  return new pass_postreload_cse (ctxt);
+}
diff --git a/gcc/predict.c b/gcc/predict.c
index 91f66a8..3d3dcd1 100644
--- a/gcc/predict.c
+++ b/gcc/predict.c
@@ -2900,45 +2900,67 @@ 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 */
- }
-};
+class pass_profile : public gimple_opt_pass
+{
+public:
+  pass_profile(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "profile_estimate",
+		      OPTGROUP_NONE,
+		      TV_BRANCH_PROB,
+		      pass_properties(required(PROP_cfg),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_verify_ssa)))
+  {}
 
-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 */
- }
-};
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_estimate_probability (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () {
+    return tree_estimate_probability_driver ();
+  }
+
+}; // class pass_profile
+
+gimple_opt_pass *
+make_pass_profile (context &ctxt)
+{
+  return new pass_profile (ctxt);
+}
+
+class pass_strip_predict_hints : public gimple_opt_pass
+{
+public:
+  pass_strip_predict_hints(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "*strip_predict_hints",
+		      OPTGROUP_NONE,
+		      TV_BRANCH_PROB,
+		      pass_properties(required(PROP_cfg),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_verify_ssa)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return strip_predict_hints (); }
+
+}; // class pass_strip_predict_hints
+
+gimple_opt_pass *
+make_pass_strip_predict_hints (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:
diff --git a/gcc/recog.c b/gcc/recog.c
index ed359f6..476d17f 100644
--- a/gcc/recog.c
+++ b/gcc/recog.c
@@ -3748,26 +3748,35 @@ 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 */
- }
-};
+class pass_peephole2 : public rtl_opt_pass
+{
+public:
+  pass_peephole2(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "peephole2",
+		   OPTGROUP_NONE,
+		   TV_PEEPHOLE2,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_df_finish | TODO_verify_rtl_sharing | 0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_handle_peephole2 (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return rest_of_handle_peephole2 (); }
+
+}; // class pass_peephole2
+
+rtl_opt_pass *
+make_pass_peephole2 (context &ctxt)
+{
+  return new pass_peephole2 (ctxt);
+}
 
 static unsigned int
 rest_of_handle_split_all_insns (void)
@@ -3776,25 +3785,37 @@ 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 */
- }
-};
+class pass_split_all_insns : public rtl_opt_pass
+{
+public:
+  pass_split_all_insns(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "split1",
+		   OPTGROUP_NONE,
+		   TV_NONE,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () {
+    return rest_of_handle_split_all_insns ();
+  }
+
+}; // class pass_split_all_insns
+
+rtl_opt_pass *
+make_pass_split_all_insns (context &ctxt)
+{
+  return new pass_split_all_insns (ctxt);
+}
 
 static unsigned int
 rest_of_handle_split_after_reload (void)
@@ -3807,25 +3828,37 @@ 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 */
- }
-};
+class pass_split_after_reload : public rtl_opt_pass
+{
+public:
+  pass_split_after_reload(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "split2",
+		   OPTGROUP_NONE,
+		   TV_NONE,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () {
+    return rest_of_handle_split_after_reload ();
+  }
+
+}; // class pass_split_after_reload
+
+rtl_opt_pass *
+make_pass_split_after_reload (context &ctxt)
+{
+  return new pass_split_after_reload (ctxt);
+}
 
 static bool
 gate_handle_split_before_regstack (void)
@@ -3852,25 +3885,37 @@ 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 */
- }
-};
+class pass_split_before_regstack : public rtl_opt_pass
+{
+public:
+  pass_split_before_regstack(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "split3",
+		   OPTGROUP_NONE,
+		   TV_NONE,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_handle_split_before_regstack (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () {
+    return rest_of_handle_split_before_regstack ();
+  }
+
+}; // class pass_split_before_regstack
+
+rtl_opt_pass *
+make_pass_split_before_regstack (context &ctxt)
+{
+  return new pass_split_before_regstack (ctxt);
+}
 
 static bool
 gate_handle_split_before_sched2 (void)
@@ -3891,25 +3936,37 @@ 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 */
- }
-};
+class pass_split_before_sched2 : public rtl_opt_pass
+{
+public:
+  pass_split_before_sched2(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "split4",
+		   OPTGROUP_NONE,
+		   TV_NONE,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_verify_flow)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_handle_split_before_sched2 (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () {
+    return rest_of_handle_split_before_sched2 ();
+  }
+
+}; // class pass_split_before_sched2
+
+rtl_opt_pass *
+make_pass_split_before_sched2 (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.  */
@@ -3923,22 +3980,32 @@ 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 */
- }
-};
+class pass_split_for_shorten_branches : public rtl_opt_pass
+{
+public:
+  pass_split_for_shorten_branches(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "split5",
+		   OPTGROUP_NONE,
+		   TV_NONE,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_verify_rtl_sharing)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_do_final_split (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return split_all_insns_noflow (); }
+
+}; // class pass_split_for_shorten_branches
+
+rtl_opt_pass *
+make_pass_split_for_shorten_branches (context &ctxt)
+{
+  return new pass_split_for_shorten_branches (ctxt);
+}
diff --git a/gcc/ree.c b/gcc/ree.c
index c0d43c8..6ae278b 100644
--- a/gcc/ree.c
+++ b/gcc/ree.c
@@ -940,23 +940,32 @@ gate_handle_ree (void)
   return (optimize > 0 && flag_ree);
 }
 
-struct rtl_opt_pass pass_ree =
+class pass_ree : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_ree(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "ree",
+		   OPTGROUP_NONE,
+		   TV_REE,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_df_finish | TODO_verify_rtl_sharing)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_handle_ree (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return rest_of_handle_ree (); }
+
+}; // class pass_ree
+
+rtl_opt_pass *
+make_pass_ree (context &ctxt)
+{
+  return new pass_ree (ctxt);
+}
diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c
index 2812787..03aed36 100644
--- a/gcc/reg-stack.c
+++ b/gcc/reg-stack.c
@@ -3296,25 +3296,35 @@ gate_handle_stack_regs (void)
 #endif
 }
 
-struct rtl_opt_pass pass_stack_regs =
+class pass_stack_regs : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_stack_regs(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "*stack_regs",
+		   OPTGROUP_NONE,
+		   TV_REG_STACK,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_handle_stack_regs (); }
+
+  bool has_execute () { return false; }
+  unsigned int impl_execute () { return 0; }
+
+}; // class pass_stack_regs
+
+rtl_opt_pass *
+make_pass_stack_regs (context &ctxt)
+{
+  return new pass_stack_regs (ctxt);
+}
 
 /* Convert register usage from flat register file usage to a stack
    register file.  */
@@ -3328,22 +3338,32 @@ rest_of_handle_stack_regs (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_stack_regs_run =
+class pass_stack_regs_run : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_stack_regs_run(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "stack",
+		   OPTGROUP_NONE,
+		   TV_REG_STACK,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_df_finish | TODO_verify_rtl_sharing)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return rest_of_handle_stack_regs (); }
+
+}; // class pass_stack_regs_run
+
+rtl_opt_pass *
+make_pass_stack_regs_run (context &ctxt)
+{
+  return new pass_stack_regs_run (ctxt);
+}
diff --git a/gcc/regcprop.c b/gcc/regcprop.c
index 97a023f..6948ada 100644
--- a/gcc/regcprop.c
+++ b/gcc/regcprop.c
@@ -1229,23 +1229,32 @@ gate_handle_cprop (void)
 }
 
 
-struct rtl_opt_pass pass_cprop_hardreg =
+class pass_cprop_hardreg : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_cprop_hardreg(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "cprop_hardreg",
+		   OPTGROUP_NONE,
+		   TV_CPROP_REGISTERS,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_df_finish | TODO_verify_rtl_sharing)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_handle_cprop (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return copyprop_hardreg_forward (); }
+
+}; // class pass_cprop_hardreg
+
+rtl_opt_pass *
+make_pass_cprop_hardreg (context &ctxt)
+{
+  return new pass_cprop_hardreg (ctxt);
+}
diff --git a/gcc/reginfo.c b/gcc/reginfo.c
index 0153cd9..f75c3e3 100644
--- a/gcc/reginfo.c
+++ b/gcc/reginfo.c
@@ -965,25 +965,35 @@ reginfo_init (void)
   return 1;
 }
 
-struct rtl_opt_pass pass_reginfo_init =
+class pass_reginfo_init : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_reginfo_init(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "reginfo",
+		   OPTGROUP_NONE,
+		   TV_NONE,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return reginfo_init (); }
+
+}; // class pass_reginfo_init
+
+rtl_opt_pass *
+make_pass_reginfo_init (context &ctxt)
+{
+  return new pass_reginfo_init (ctxt);
+}
 
 
 
diff --git a/gcc/regmove.c b/gcc/regmove.c
index 1ce8a7e..e8527c4 100644
--- a/gcc/regmove.c
+++ b/gcc/regmove.c
@@ -1361,22 +1361,32 @@ gate_handle_regmove (void)
 }
 
 
-struct rtl_opt_pass pass_regmove =
+class pass_regmove : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_regmove(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "regmove",
+		   OPTGROUP_NONE,
+		   TV_REGMOVE,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_df_finish | TODO_verify_rtl_sharing)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_handle_regmove (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return regmove_optimize (); }
+
+}; // class pass_regmove
+
+rtl_opt_pass *
+make_pass_regmove (context &ctxt)
+{
+  return new pass_regmove (ctxt);
+}
diff --git a/gcc/regrename.c b/gcc/regrename.c
index 20e2ae9..97048f8 100644
--- a/gcc/regrename.c
+++ b/gcc/regrename.c
@@ -1842,23 +1842,32 @@ gate_handle_regrename (void)
   return (optimize > 0 && (flag_rename_registers));
 }
 
-struct rtl_opt_pass pass_regrename =
+class pass_regrename : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_regrename(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "rnreg",
+		   OPTGROUP_NONE,
+		   TV_RENAME_REGISTERS,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_df_finish | TODO_verify_rtl_sharing | 0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_handle_regrename (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return regrename_optimize (); }
+
+}; // class pass_regrename
+
+rtl_opt_pass *
+make_pass_regrename (context &ctxt)
+{
+  return new pass_regrename (ctxt);
+}
diff --git a/gcc/reorg.c b/gcc/reorg.c
index 1bc73b0..ca53fb9 100644
--- a/gcc/reorg.c
+++ b/gcc/reorg.c
@@ -3814,25 +3814,35 @@ rest_of_handle_delay_slots (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_delay_slots =
+class pass_delay_slots : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_delay_slots(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "dbr",
+		   OPTGROUP_NONE,
+		   TV_DBR_SCHED,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_handle_delay_slots (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return rest_of_handle_delay_slots (); }
+
+}; // class pass_delay_slots
+
+rtl_opt_pass *
+make_pass_delay_slots (context &ctxt)
+{
+  return new pass_delay_slots (ctxt);
+}
 
 /* Machine dependent reorg pass.  */
 static bool
@@ -3849,22 +3859,32 @@ rest_of_handle_machine_reorg (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_machine_reorg =
+class pass_machine_reorg : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_machine_reorg(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "mach",
+		   OPTGROUP_NONE,
+		   TV_MACH_DEP,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_handle_machine_reorg (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return rest_of_handle_machine_reorg (); }
+
+}; // class pass_machine_reorg
+
+rtl_opt_pass *
+make_pass_machine_reorg (context &ctxt)
+{
+  return new pass_machine_reorg (ctxt);
+}
diff --git a/gcc/sched-rgn.c b/gcc/sched-rgn.c
index 6eb00e9..f0dd2fc 100644
--- a/gcc/sched-rgn.c
+++ b/gcc/sched-rgn.c
@@ -3613,44 +3613,62 @@ 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 */
- }
-};
+class pass_sched : public rtl_opt_pass
+{
+public:
+  pass_sched(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "sched1",
+		   OPTGROUP_NONE,
+		   TV_SCHED,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_df_finish | TODO_verify_rtl_sharing | TODO_verify_flow)))
+  {}
 
-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 */
- }
-};
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_handle_sched (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return rest_of_handle_sched (); }
+
+}; // class pass_sched
+
+rtl_opt_pass *
+make_pass_sched (context &ctxt)
+{
+  return new pass_sched (ctxt);
+}
+
+class pass_sched2 : public rtl_opt_pass
+{
+public:
+  pass_sched2(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "sched2",
+		   OPTGROUP_NONE,
+		   TV_SCHED2,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_df_finish | TODO_verify_rtl_sharing | TODO_verify_flow)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_handle_sched2 (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return rest_of_handle_sched2 (); }
+
+}; // class pass_sched2
+
+rtl_opt_pass *
+make_pass_sched2 (context &ctxt)
+{
+  return new pass_sched2 (ctxt);
+}
diff --git a/gcc/stack-ptr-mod.c b/gcc/stack-ptr-mod.c
index 739bcfc..16f6559 100644
--- a/gcc/stack-ptr-mod.c
+++ b/gcc/stack-ptr-mod.c
@@ -90,22 +90,32 @@ rest_of_handle_stack_ptr_mod (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_stack_ptr_mod =
+class pass_stack_ptr_mod : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_stack_ptr_mod(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "*stack_ptr_mod",
+		   OPTGROUP_NONE,
+		   TV_NONE,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return rest_of_handle_stack_ptr_mod (); }
+
+}; // class pass_stack_ptr_mod
+
+rtl_opt_pass *
+make_pass_stack_ptr_mod (context &ctxt)
+{
+  return new pass_stack_ptr_mod (ctxt);
+}
diff --git a/gcc/store-motion.c b/gcc/store-motion.c
index 6fc072c..4b23e44 100644
--- a/gcc/store-motion.c
+++ b/gcc/store-motion.c
@@ -1232,23 +1232,32 @@ execute_rtl_store_motion (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_rtl_store_motion =
+class pass_rtl_store_motion : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_rtl_store_motion(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "store_motion",
+		   OPTGROUP_NONE,
+		   TV_LSM,
+		   pass_properties(required(PROP_cfglayout),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_df_finish | TODO_verify_rtl_sharing | TODO_verify_flow)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_rtl_store_motion (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return execute_rtl_store_motion (); }
+
+}; // class pass_rtl_store_motion
+
+rtl_opt_pass *
+make_pass_rtl_store_motion (context &ctxt)
+{
+  return new pass_rtl_store_motion (ctxt);
+}
diff --git a/gcc/testsuite/g++.dg/plugin/dumb_plugin.c b/gcc/testsuite/g++.dg/plugin/dumb_plugin.c
index 0f15140..b1610de 100644
--- a/gcc/testsuite/g++.dg/plugin/dumb_plugin.c
+++ b/gcc/testsuite/g++.dg/plugin/dumb_plugin.c
@@ -57,25 +57,35 @@ gate_dumb_plugin_example (void)
   return true;
 }
 
-static struct gimple_opt_pass pass_dumb_plugin_example =
+class pass_dumb_plugin_example : public gimple_opt_pass
 {
-  {
-    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 */
-  }
-};
+public:
+  pass_dumb_plugin_example(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "dumb_plugin_example",
+		      OPTGROUP_NONE,
+		      TV_NONE,
+		      pass_properties(required(PROP_cfg),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_dumb_plugin_example (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return execute_dumb_plugin_example (); }
+
+}; // class pass_dumb_plugin_example
+
+static gimple_opt_pass *
+make_pass_dumb_plugin_example (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,
diff --git a/gcc/testsuite/g++.dg/plugin/selfassign.c b/gcc/testsuite/g++.dg/plugin/selfassign.c
index 37a0a97..1b5298a 100644
--- a/gcc/testsuite/g++.dg/plugin/selfassign.c
+++ b/gcc/testsuite/g++.dg/plugin/selfassign.c
@@ -263,25 +263,35 @@ gate_warn_self_assign (void)
   return true;
 }
 
-static struct gimple_opt_pass pass_warn_self_assign =
+class pass_warn_self_assign : public gimple_opt_pass
 {
-  {
-    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 */
-  }
-};
+public:
+  pass_warn_self_assign(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "warn_self_assign",
+		      OPTGROUP_NONE,
+		      TV_NONE,
+		      pass_properties(required(PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_warn_self_assign (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return execute_warn_self_assign (); }
+
+}; // class pass_warn_self_assign
+
+static gimple_opt_pass *
+make_pass_warn_self_assign (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.
diff --git a/gcc/testsuite/gcc.dg/plugin/one_time_plugin.c b/gcc/testsuite/gcc.dg/plugin/one_time_plugin.c
index 45e6257..4ef813d 100644
--- a/gcc/testsuite/gcc.dg/plugin/one_time_plugin.c
+++ b/gcc/testsuite/gcc.dg/plugin/one_time_plugin.c
@@ -27,25 +27,35 @@ static unsigned int one_pass_exec (void)
  return 0;
 }
 
-struct gimple_opt_pass one_pass = 
+class one_pass : public gimple_opt_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 */
-  }
-};
+public:
+  one_pass(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "cfg",
+		      OPTGROUP_NONE,
+		      TV_NONE,
+		      pass_properties(required(PROP_gimple_any),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return one_pass_gate (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return one_pass_exec (); }
+
+}; // class one_pass
+
+gimple_opt_pass *
+make_one_pass (context &ctxt)
+{
+  return new one_pass (ctxt);
+}
 
 
 int plugin_init (struct plugin_name_args *plugin_info,
diff --git a/gcc/testsuite/gcc.dg/plugin/selfassign.c b/gcc/testsuite/gcc.dg/plugin/selfassign.c
index 37a0a97..1b5298a 100644
--- a/gcc/testsuite/gcc.dg/plugin/selfassign.c
+++ b/gcc/testsuite/gcc.dg/plugin/selfassign.c
@@ -263,25 +263,35 @@ gate_warn_self_assign (void)
   return true;
 }
 
-static struct gimple_opt_pass pass_warn_self_assign =
+class pass_warn_self_assign : public gimple_opt_pass
 {
-  {
-    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 */
-  }
-};
+public:
+  pass_warn_self_assign(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "warn_self_assign",
+		      OPTGROUP_NONE,
+		      TV_NONE,
+		      pass_properties(required(PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_warn_self_assign (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return execute_warn_self_assign (); }
+
+}; // class pass_warn_self_assign
+
+static gimple_opt_pass *
+make_pass_warn_self_assign (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.
diff --git a/gcc/tracer.c b/gcc/tracer.c
index 975cadb..084acb6 100644
--- a/gcc/tracer.c
+++ b/gcc/tracer.c
@@ -397,23 +397,32 @@ gate_tracer (void)
   return (optimize > 0 && flag_tracer && flag_reorder_blocks);
 }
 
-struct gimple_opt_pass pass_tracer =
+class pass_tracer : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_tracer(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "tracer",
+		      OPTGROUP_NONE,
+		      TV_TRACER,
+		      pass_properties(required(0),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_update_ssa | TODO_verify_ssa)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_tracer (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return tracer (); }
+
+}; // class pass_tracer
+
+gimple_opt_pass *
+make_pass_tracer (context &ctxt)
+{
+  return new pass_tracer (ctxt);
+}
diff --git a/gcc/trans-mem.c b/gcc/trans-mem.c
index b0f18b5..7e059b7 100644
--- a/gcc/trans-mem.c
+++ b/gcc/trans-mem.c
@@ -800,25 +800,35 @@ diagnose_tm_blocks (void)
   return 0;
 }
 
-struct gimple_opt_pass pass_diagnose_tm_blocks =
+class pass_diagnose_tm_blocks : public gimple_opt_pass
 {
-  {
-    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 */
-  }
-};
+public:
+  pass_diagnose_tm_blocks(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "*diagnose_tm_blocks",
+		      OPTGROUP_NONE,
+		      TV_TRANS_MEM,
+		      pass_properties(required(PROP_gimple_any),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_tm (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return diagnose_tm_blocks (); }
+
+}; // class pass_diagnose_tm_blocks
+
+gimple_opt_pass *
+make_pass_diagnose_tm_blocks (context &ctxt)
+{
+  return new pass_diagnose_tm_blocks (ctxt);
+}
 
 /* Instead of instrumenting thread private memory, we save the
    addresses in a log which we later use to save/restore the addresses
@@ -1675,25 +1685,35 @@ 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 */
- }
-};
+class pass_lower_tm : public gimple_opt_pass
+{
+public:
+  pass_lower_tm(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "tmlower",
+		      OPTGROUP_NONE,
+		      TV_TRANS_MEM,
+		      pass_properties(required(PROP_gimple_lcf),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_tm (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return execute_lower_tm (); }
+
+}; // class pass_lower_tm
+
+gimple_opt_pass *
+make_pass_lower_tm (context &ctxt)
+{
+  return new pass_lower_tm (ctxt);
+}
 
 /* Collect region information for each transaction.  */
 
@@ -1937,25 +1957,35 @@ 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 */
- }
-};
+class pass_tm_init : public gimple_opt_pass
+{
+public:
+  pass_tm_init(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "*tminit",
+		      OPTGROUP_NONE,
+		      TV_TRANS_MEM,
+		      pass_properties(required(PROP_ssa | PROP_cfg),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_tm_init (); }
+
+  bool has_execute () { return false; }
+  unsigned int impl_execute () { return 0; }
+
+}; // class pass_tm_init
+
+gimple_opt_pass *
+make_pass_tm_init (context &ctxt)
+{
+  return new pass_tm_init (ctxt);
+}
 
 /* Add FLAGS to the GIMPLE_TRANSACTION subcode for the transaction region
    represented by STATE.  */
@@ -2896,26 +2926,35 @@ 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 */
- }
-};
+class pass_tm_mark : public gimple_opt_pass
+{
+public:
+  pass_tm_mark(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "tmmark",
+		      OPTGROUP_NONE,
+		      TV_TRANS_MEM,
+		      pass_properties(required(PROP_ssa | PROP_cfg),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_update_ssa | TODO_verify_ssa)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return execute_tm_mark (); }
+
+}; // class pass_tm_mark
+
+gimple_opt_pass *
+make_pass_tm_mark (context &ctxt)
+{
+  return new pass_tm_mark (ctxt);
+}
 
 
 /* Create an abnormal edge from STMT at iter, splitting the block
@@ -3063,26 +3102,35 @@ 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 */
- }
-};
+class pass_tm_edges : public gimple_opt_pass
+{
+public:
+  pass_tm_edges(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "tmedge",
+		      OPTGROUP_NONE,
+		      TV_TRANS_MEM,
+		      pass_properties(required(PROP_ssa | PROP_cfg),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_update_ssa | TODO_verify_ssa)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return execute_tm_edges (); }
+
+}; // class pass_tm_edges
+
+gimple_opt_pass *
+make_pass_tm_edges (context &ctxt)
+{
+  return new pass_tm_edges (ctxt);
+}
 
 /* Helper function for expand_regions.  Expand REGION and recurse to
    the inner region.  Call CALLBACK on each region.  CALLBACK returns
@@ -3781,25 +3829,35 @@ 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 */
- }
-};
+class pass_tm_memopt : public gimple_opt_pass
+{
+public:
+  pass_tm_memopt(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "tmmemopt",
+		      OPTGROUP_NONE,
+		      TV_TRANS_MEM,
+		      pass_properties(required(PROP_ssa | PROP_cfg),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_tm_memopt (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return execute_tm_memopt (); }
+
+}; // class pass_tm_memopt
+
+gimple_opt_pass *
+make_pass_tm_memopt (context &ctxt)
+{
+  return new pass_tm_memopt (ctxt);
+}
 
 
 /* Interprocedual analysis for the creation of transactional clones.
@@ -5387,24 +5445,34 @@ 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 */
- },
-};
+class pass_ipa_tm : public simple_ipa_opt_pass
+{
+public:
+  pass_ipa_tm(context &ctxt)
+    : simple_ipa_opt_pass(ctxt,
+			  "tmipa",
+			  OPTGROUP_NONE,
+			  TV_TRANS_MEM,
+			  pass_properties(required(PROP_ssa | PROP_cfg),
+					  provided(0),
+					  destroyed(0)),
+			  pass_todo_flags(start(0),
+					  finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_tm (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return ipa_tm_execute (); }
+
+}; // class pass_ipa_tm
+
+simple_ipa_opt_pass *
+make_pass_ipa_tm (context &ctxt)
+{
+  return new pass_ipa_tm (ctxt);
+}
 
 #include "gt-trans-mem.h"
diff --git a/gcc/tree-call-cdce.c b/gcc/tree-call-cdce.c
index 9b6186e..cfb8e6f 100644
--- a/gcc/tree-call-cdce.c
+++ b/gcc/tree-call-cdce.c
@@ -913,22 +913,32 @@ gate_call_cdce (void)
   return flag_tree_builtin_call_dce != 0 && optimize_function_for_speed_p (cfun);
 }
 
-struct gimple_opt_pass pass_call_cdce =
+class pass_call_cdce : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_call_cdce(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "cdce",
+		      OPTGROUP_NONE,
+		      TV_TREE_CALL_CDCE,
+		      pass_properties(required(PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_verify_ssa)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_call_cdce (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return tree_call_cdce (); }
+
+}; // class pass_call_cdce
+
+gimple_opt_pass *
+make_pass_call_cdce (context &ctxt)
+{
+  return new pass_call_cdce (ctxt);
+}
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 05bac43..68a9c5b 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -223,25 +223,35 @@ 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,				/* properties_provided */
-  0,					/* properties_destroyed */
-  0,					/* todo_flags_start */
-  TODO_verify_stmts | TODO_cleanup_cfg  /* todo_flags_finish */
- }
-};
+class pass_build_cfg : public gimple_opt_pass
+{
+public:
+  pass_build_cfg(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "cfg",
+		      OPTGROUP_NONE,
+		      TV_TREE_CFG,
+		      pass_properties(required(PROP_gimple_leh),
+				      provided(PROP_cfg),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_verify_stmts | TODO_cleanup_cfg)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return execute_build_cfg (); }
+
+}; // class pass_build_cfg
+
+gimple_opt_pass *
+make_pass_build_cfg (context &ctxt)
+{
+  return new pass_build_cfg (ctxt);
+}
 
 
 /* Return true if T is a computed goto.  */
@@ -7794,25 +7804,35 @@ 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 */
- }
-};
+class pass_split_crit_edges : public gimple_opt_pass
+{
+public:
+  pass_split_crit_edges(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "crited",
+		      OPTGROUP_NONE,
+		      TV_TREE_SPLIT_EDGES,
+		      pass_properties(required(PROP_cfg),
+				      provided(PROP_no_crit_edges),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_verify_flow)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return split_critical_edges (); }
+
+}; // class pass_split_crit_edges
+
+gimple_opt_pass *
+make_pass_split_crit_edges (context &ctxt)
+{
+  return new pass_split_crit_edges (ctxt);
+}
 
 
 /* Build a ternary operation and gimplify it.  Emit code before GSI.
@@ -7948,25 +7968,35 @@ 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 */
- }
-};
+class pass_warn_function_return : public gimple_opt_pass
+{
+public:
+  pass_warn_function_return(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "*warn_function_return",
+		      OPTGROUP_NONE,
+		      TV_NONE,
+		      pass_properties(required(PROP_cfg),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return execute_warn_function_return (); }
+
+}; // class pass_warn_function_return
+
+gimple_opt_pass *
+make_pass_warn_function_return (context &ctxt)
+{
+  return new pass_warn_function_return (ctxt);
+}
 
 /* Emit noreturn warnings.  */
 
@@ -7985,25 +8015,37 @@ 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 */
- }
-};
+class pass_warn_function_noreturn : public gimple_opt_pass
+{
+public:
+  pass_warn_function_noreturn(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "*warn_function_noreturn",
+		      OPTGROUP_NONE,
+		      TV_NONE,
+		      pass_properties(required(PROP_cfg),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_warn_function_noreturn (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () {
+    return execute_warn_function_noreturn ();
+  }
+
+}; // class pass_warn_function_noreturn
+
+gimple_opt_pass *
+make_pass_warn_function_noreturn (context &ctxt)
+{
+  return new pass_warn_function_noreturn (ctxt);
+}
 
 
 /* Walk a gimplified function and warn for functions whose return value is
@@ -8084,25 +8126,35 @@ 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 */
-  }
-};
+class pass_warn_unused_result : public gimple_opt_pass
+{
+public:
+  pass_warn_unused_result(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "*warn_unused_result",
+		      OPTGROUP_NONE,
+		      TV_NONE,
+		      pass_properties(required(PROP_gimple_any),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_warn_unused_result (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return run_warn_unused_result (); }
+
+}; // class pass_warn_unused_result
+
+gimple_opt_pass *
+make_pass_warn_unused_result (context &ctxt)
+{
+  return new pass_warn_unused_result (ctxt);
+}
 
 
 /* Garbage collection support for edge_def.  */
diff --git a/gcc/tree-cfgcleanup.c b/gcc/tree-cfgcleanup.c
index b355a86..492bb66 100644
--- a/gcc/tree-cfgcleanup.c
+++ b/gcc/tree-cfgcleanup.c
@@ -976,22 +976,32 @@ gate_merge_phi (void)
   return 1;
 }
 
-struct gimple_opt_pass pass_merge_phi =
+class pass_merge_phi : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_merge_phi(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "mergephi",
+		      OPTGROUP_NONE,
+		      TV_TREE_MERGE_PHI,
+		      pass_properties(required(PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_verify_ssa)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_merge_phi (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return merge_phi_nodes (); }
+
+}; // class pass_merge_phi
+
+gimple_opt_pass *
+make_pass_merge_phi (context &ctxt)
+{
+  return new pass_merge_phi (ctxt);
+}
diff --git a/gcc/tree-complex.c b/gcc/tree-complex.c
index 760083b..a9e7ceb 100644
--- a/gcc/tree-complex.c
+++ b/gcc/tree-complex.c
@@ -1632,26 +1632,35 @@ tree_lower_complex (void)
   return 0;
 }
 
-struct gimple_opt_pass pass_lower_complex =
+class pass_lower_complex : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_lower_complex(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "cplxlower",
+		      OPTGROUP_NONE,
+		      TV_NONE,
+		      pass_properties(required(PROP_ssa),
+				      provided(PROP_gimple_lcx),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_update_ssa | TODO_verify_stmts)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return tree_lower_complex (); }
+
+}; // class pass_lower_complex
+
+gimple_opt_pass *
+make_pass_lower_complex (context &ctxt)
+{
+  return new pass_lower_complex (ctxt);
+}
 
 
 static bool
@@ -1662,23 +1671,32 @@ gate_no_optimization (void)
   return !(cfun->curr_properties & PROP_gimple_lcx);
 }
 
-struct gimple_opt_pass pass_lower_complex_O0 =
+class pass_lower_complex_O0 : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_lower_complex_O0(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "cplxlower0",
+		      OPTGROUP_NONE,
+		      TV_NONE,
+		      pass_properties(required(PROP_cfg),
+				      provided(PROP_gimple_lcx),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_update_ssa | TODO_verify_stmts)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_no_optimization (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return tree_lower_complex (); }
+
+}; // class pass_lower_complex_O0
+
+gimple_opt_pass *
+make_pass_lower_complex_O0 (context &ctxt)
+{
+  return new pass_lower_complex_O0 (ctxt);
+}
diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c
index 2eb3097..10bf550 100644
--- a/gcc/tree-eh.c
+++ b/gcc/tree-eh.c
@@ -2134,25 +2134,35 @@ lower_eh_constructs (void)
   return 0;
 }
 
-struct gimple_opt_pass pass_lower_eh =
+class pass_lower_eh : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_lower_eh(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "eh",
+		      OPTGROUP_NONE,
+		      TV_TREE_EH,
+		      pass_properties(required(PROP_gimple_lcf),
+				      provided(PROP_gimple_leh),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return lower_eh_constructs (); }
+
+}; // class pass_lower_eh
+
+gimple_opt_pass *
+make_pass_lower_eh (context &ctxt)
+{
+  return new pass_lower_eh (ctxt);
+}
 
 /* Create the multiple edges from an EH_DISPATCH statement to all of
    the possible handlers for its EH region.  Return true if there's
@@ -2994,25 +3004,35 @@ gate_refactor_eh (void)
   return flag_exceptions != 0;
 }
 
-struct gimple_opt_pass pass_refactor_eh =
+class pass_refactor_eh : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_refactor_eh(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "ehopt",
+		      OPTGROUP_NONE,
+		      TV_TREE_EH,
+		      pass_properties(required(PROP_gimple_lcf),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_refactor_eh (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return refactor_eh (); }
+
+}; // class pass_refactor_eh
+
+gimple_opt_pass *
+make_pass_refactor_eh (context &ctxt)
+{
+  return new pass_refactor_eh (ctxt);
+}
 
 /* At the end of gimple optimization, we can lower RESX.  */
 
@@ -3203,25 +3223,35 @@ gate_lower_resx (void)
   return flag_exceptions != 0;
 }
 
-struct gimple_opt_pass pass_lower_resx =
+class pass_lower_resx : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_lower_resx(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "resx",
+		      OPTGROUP_NONE,
+		      TV_TREE_EH,
+		      pass_properties(required(PROP_gimple_lcf),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_verify_flow)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_lower_resx (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return execute_lower_resx (); }
+
+}; // class pass_lower_resx
+
+gimple_opt_pass *
+make_pass_lower_resx (context &ctxt)
+{
+  return new pass_lower_resx (ctxt);
+}
 
 /* Try to optimize var = {v} {CLOBBER} stmts followed just by
    external throw.  */
@@ -3549,25 +3579,35 @@ gate_lower_eh_dispatch (void)
   return cfun->eh->region_tree != NULL;
 }
 
-struct gimple_opt_pass pass_lower_eh_dispatch =
+class pass_lower_eh_dispatch : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_lower_eh_dispatch(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "ehdisp",
+		      OPTGROUP_NONE,
+		      TV_TREE_EH,
+		      pass_properties(required(PROP_gimple_lcf),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_verify_flow)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_lower_eh_dispatch (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return execute_lower_eh_dispatch (); }
+
+}; // class pass_lower_eh_dispatch
+
+gimple_opt_pass *
+make_pass_lower_eh_dispatch (context &ctxt)
+{
+  return new pass_lower_eh_dispatch (ctxt);
+}
 
 /* Walk statements, see what regions and, optionally, landing pads
    are really referenced.
@@ -4401,24 +4441,35 @@ 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 */
-   0             		/* todo_flags_finish */
-   }
-};
+class pass_cleanup_eh : public gimple_opt_pass
+{
+public:
+  pass_cleanup_eh(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "ehcleanup",
+		      OPTGROUP_NONE,
+		      TV_TREE_EH,
+		      pass_properties(required(PROP_gimple_lcf),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_cleanup_eh (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return execute_cleanup_eh (); }
+
+}; // class pass_cleanup_eh
+
+gimple_opt_pass *
+make_pass_cleanup_eh (context &ctxt)
+{
+  return new pass_cleanup_eh (ctxt);
+}
 
 /* Verify that BB containing STMT as the last statement, has precisely the
    edge that make_eh_edges would create.  */
diff --git a/gcc/tree-emutls.c b/gcc/tree-emutls.c
index fc75b31..21c450c 100644
--- a/gcc/tree-emutls.c
+++ b/gcc/tree-emutls.c
@@ -809,22 +809,32 @@ gate_emutls (void)
   return !targetm.have_tls;
 }
 
-struct simple_ipa_opt_pass pass_ipa_lower_emutls =
+class pass_ipa_lower_emutls : public simple_ipa_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_ipa_lower_emutls(context &ctxt)
+    : simple_ipa_opt_pass(ctxt,
+			  "emutls",
+			  OPTGROUP_NONE,
+			  TV_IPA_OPT,
+			  pass_properties(required(PROP_cfg | PROP_ssa),
+					  provided(0),
+					  destroyed(0)),
+			  pass_todo_flags(start(0),
+					  finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_emutls (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return ipa_lower_emutls (); }
+
+}; // class pass_ipa_lower_emutls
+
+simple_ipa_opt_pass *
+make_pass_ipa_lower_emutls (context &ctxt)
+{
+  return new pass_ipa_lower_emutls (ctxt);
+}
diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c
index 95d0394..60f39f9 100644
--- a/gcc/tree-if-conv.c
+++ b/gcc/tree-if-conv.c
@@ -1853,23 +1853,32 @@ gate_tree_if_conversion (void)
 	  || flag_tree_loop_if_convert_stores == 1);
 }
 
-struct gimple_opt_pass pass_if_conversion =
+class pass_if_conversion : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_if_conversion(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "ifcvt",
+		      OPTGROUP_NONE,
+		      TV_NONE,
+		      pass_properties(required(PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_verify_stmts | TODO_verify_flow)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_tree_if_conversion (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return main_tree_if_conversion (); }
+
+}; // class pass_if_conversion
+
+gimple_opt_pass *
+make_pass_if_conversion (context &ctxt)
+{
+  return new pass_if_conversion (ctxt);
+}
diff --git a/gcc/tree-into-ssa.c b/gcc/tree-into-ssa.c
index 65c15da..9bca54a 100644
--- a/gcc/tree-into-ssa.c
+++ b/gcc/tree-into-ssa.c
@@ -2408,26 +2408,35 @@ 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 */
- }
-};
+class pass_build_ssa : public gimple_opt_pass
+{
+public:
+  pass_build_ssa(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "ssa",
+		      OPTGROUP_NONE,
+		      TV_TREE_SSA_OTHER,
+		      pass_properties(required(PROP_cfg),
+				      provided(PROP_ssa),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_verify_ssa | TODO_remove_unused_locals)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return rewrite_into_ssa (); }
+
+}; // class pass_build_ssa
+
+gimple_opt_pass *
+make_pass_build_ssa (context &ctxt)
+{
+  return new pass_build_ssa (ctxt);
+}
 
 
 /* Mark the definition of VAR at STMT and BB as interesting for the
diff --git a/gcc/tree-loop-distribution.c b/gcc/tree-loop-distribution.c
index 5c2c7db..bcfce6d 100644
--- a/gcc/tree-loop-distribution.c
+++ b/gcc/tree-loop-distribution.c
@@ -1589,22 +1589,32 @@ gate_tree_loop_distribution (void)
     || flag_tree_loop_distribute_patterns;
 }
 
-struct gimple_opt_pass pass_loop_distribution =
+class pass_loop_distribution : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_loop_distribution(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "ldist",
+		      OPTGROUP_LOOP,
+		      TV_TREE_LOOP_DISTRIBUTION,
+		      pass_properties(required(PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_verify_ssa)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_tree_loop_distribution (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return tree_loop_distribution (); }
+
+}; // class pass_loop_distribution
+
+gimple_opt_pass *
+make_pass_loop_distribution (context &ctxt)
+{
+  return new pass_loop_distribution (ctxt);
+}
diff --git a/gcc/tree-mudflap.c b/gcc/tree-mudflap.c
index b250bfe..3a38866 100644
--- a/gcc/tree-mudflap.c
+++ b/gcc/tree-mudflap.c
@@ -1378,45 +1378,66 @@ gate_mudflap (void)
   return flag_mudflap != 0;
 }
 
-struct gimple_opt_pass pass_mudflap_1 =
+class pass_mudflap_1 : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_mudflap_1(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "mudflap1",
+		      OPTGROUP_NONE,
+		      TV_NONE,
+		      pass_properties(required(PROP_gimple_any),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_mudflap (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () {
+    return execute_mudflap_function_decls ();
+  }
+
+}; // class pass_mudflap_1
 
-struct gimple_opt_pass pass_mudflap_2 =
+gimple_opt_pass *
+make_pass_mudflap_1 (context &ctxt)
 {
- {
-  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 */
- }
-};
+  return new pass_mudflap_1 (ctxt);
+}
+
+class pass_mudflap_2 : public gimple_opt_pass
+{
+public:
+  pass_mudflap_2(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "mudflap2",
+		      OPTGROUP_NONE,
+		      TV_NONE,
+		      pass_properties(required(PROP_ssa | PROP_cfg | PROP_gimple_leh),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_verify_flow | TODO_verify_stmts | TODO_update_ssa)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_mudflap (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return execute_mudflap_function_ops (); }
+
+}; // class pass_mudflap_2
+
+gimple_opt_pass *
+make_pass_mudflap_2 (context &ctxt)
+{
+  return new pass_mudflap_2 (ctxt);
+}
 
 #include "gt-tree-mudflap.h"
diff --git a/gcc/tree-nomudflap.c b/gcc/tree-nomudflap.c
index 657c82d..fef09d0 100644
--- a/gcc/tree-nomudflap.c
+++ b/gcc/tree-nomudflap.c
@@ -85,45 +85,65 @@ gate_mudflap (void)
   return flag_mudflap != 0;
 }
 
-struct gimple_opt_pass pass_mudflap_1 =
+class pass_mudflap_1 : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_mudflap_1(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "mudflap1",
+		      OPTGROUP_NONE,
+		      TV_NONE,
+		      pass_properties(required(0),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_mudflap (); }
+
+  bool has_execute () { return false; }
+  unsigned int impl_execute () { return 0; }
+
+}; // class pass_mudflap_1
+
+gimple_opt_pass *
+make_pass_mudflap_1 (context &ctxt)
+{
+  return new pass_mudflap_1 (ctxt);
+}
 
-struct gimple_opt_pass pass_mudflap_2 =
+class pass_mudflap_2 : public gimple_opt_pass
 {
- {
-  GIMPLE_PASS,
-  "mudflap2",				/* name */
-  OPTGROUP_NONE,                        /* optinfo_flags */
-  gate_mudflap,                         /* gate */
-  NULL,					/* execute */
-  NULL,					/* sub */
-  NULL,					/* next */
-  0,					/* static_pass_number */
-  TV_NONE,				/* tv_id */
-  0,					/* properties_required */
-  0,					/* properties_provided */
-  0,					/* properties_destroyed */
-  0,					/* todo_flags_start */
-  0                                     /* todo_flags_finish */
- }
-};
+public:
+  pass_mudflap_2(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "mudflap2",
+		      OPTGROUP_NONE,
+		      TV_NONE,
+		      pass_properties(required(0),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_mudflap (); }
+
+  bool has_execute () { return false; }
+  unsigned int impl_execute () { return 0; }
+
+}; // class pass_mudflap_2
+
+gimple_opt_pass *
+make_pass_mudflap_2 (context &ctxt)
+{
+  return new pass_mudflap_2 (ctxt);
+}
 
 /* Instead of:
 #include "gt-tree-mudflap.h"
diff --git a/gcc/tree-nrv.c b/gcc/tree-nrv.c
index 51bc7cd..de9b3de 100644
--- a/gcc/tree-nrv.c
+++ b/gcc/tree-nrv.c
@@ -269,25 +269,35 @@ gate_pass_return_slot (void)
   return optimize > 0;
 }
 
-struct gimple_opt_pass pass_nrv =
+class pass_nrv : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_nrv(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "nrv",
+		      OPTGROUP_NONE,
+		      TV_TREE_NRV,
+		      pass_properties(required(PROP_ssa | PROP_cfg),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_pass_return_slot (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return tree_nrv (); }
+
+}; // class pass_nrv
+
+gimple_opt_pass *
+make_pass_nrv (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
@@ -355,22 +365,32 @@ execute_return_slot_opt (void)
   return 0;
 }
 
-struct gimple_opt_pass pass_return_slot =
+class pass_return_slot : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_return_slot(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "retslot",
+		      OPTGROUP_NONE,
+		      TV_NONE,
+		      pass_properties(required(PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return execute_return_slot_opt (); }
+
+}; // class pass_return_slot
+
+gimple_opt_pass *
+make_pass_return_slot (context &ctxt)
+{
+  return new pass_return_slot (ctxt);
+}
diff --git a/gcc/tree-object-size.c b/gcc/tree-object-size.c
index 2b8311a..af54ca6 100644
--- a/gcc/tree-object-size.c
+++ b/gcc/tree-object-size.c
@@ -1262,22 +1262,32 @@ compute_object_sizes (void)
   return 0;
 }
 
-struct gimple_opt_pass pass_object_sizes =
+class pass_object_sizes : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_object_sizes(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "objsz",
+		      OPTGROUP_NONE,
+		      TV_NONE,
+		      pass_properties(required(PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_verify_ssa)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return compute_object_sizes (); }
+
+}; // class pass_object_sizes
+
+gimple_opt_pass *
+make_pass_object_sizes (context &ctxt)
+{
+  return new pass_object_sizes (ctxt);
+}
diff --git a/gcc/tree-optimize.c b/gcc/tree-optimize.c
index a72369e..da3d467 100644
--- a/gcc/tree-optimize.c
+++ b/gcc/tree-optimize.c
@@ -88,25 +88,37 @@ execute_cleanup_cfg_post_optimizing (void)
   return todo;
 }
 
-struct gimple_opt_pass pass_cleanup_cfg_post_optimizing =
+class pass_cleanup_cfg_post_optimizing : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_cleanup_cfg_post_optimizing(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "optimized",
+		      OPTGROUP_NONE,
+		      TV_TREE_CLEANUP_CFG,
+		      pass_properties(required(PROP_cfg),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_remove_unused_locals)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () {
+    return execute_cleanup_cfg_post_optimizing ();
+  }
+
+}; // class pass_cleanup_cfg_post_optimizing
+
+gimple_opt_pass *
+make_pass_cleanup_cfg_post_optimizing (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,
@@ -207,22 +219,32 @@ execute_fixup_cfg (void)
   return todo;
 }
 
-struct gimple_opt_pass pass_fixup_cfg =
+class pass_fixup_cfg : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_fixup_cfg(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "*free_cfg_annotations",
+		      OPTGROUP_NONE,
+		      TV_NONE,
+		      pass_properties(required(PROP_cfg),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return execute_fixup_cfg (); }
+
+}; // class pass_fixup_cfg
+
+gimple_opt_pass *
+make_pass_fixup_cfg (context &ctxt)
+{
+  return new pass_fixup_cfg (ctxt);
+}
diff --git a/gcc/tree-pass.h b/gcc/tree-pass.h
index b8c59a7..24e5d20 100644
--- a/gcc/tree-pass.h
+++ b/gcc/tree-pass.h
@@ -257,238 +257,238 @@ 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 (context &ctxt);
+extern gimple_opt_pass *make_pass_mudflap_2 (context &ctxt);
+extern gimple_opt_pass *make_pass_asan (context &ctxt);
+extern gimple_opt_pass *make_pass_asan_O0 (context &ctxt);
+extern gimple_opt_pass *make_pass_tsan (context &ctxt);
+extern gimple_opt_pass *make_pass_tsan_O0 (context &ctxt);
+extern gimple_opt_pass *make_pass_lower_cf (context &ctxt);
+extern gimple_opt_pass *make_pass_refactor_eh (context &ctxt);
+extern gimple_opt_pass *make_pass_lower_eh (context &ctxt);
+extern gimple_opt_pass *make_pass_lower_eh_dispatch (context &ctxt);
+extern gimple_opt_pass *make_pass_lower_resx (context &ctxt);
+extern gimple_opt_pass *make_pass_build_cfg (context &ctxt);
+extern gimple_opt_pass *make_pass_early_tree_profile (context &ctxt);
+extern gimple_opt_pass *make_pass_cleanup_eh (context &ctxt);
+extern gimple_opt_pass *make_pass_sra (context &ctxt);
+extern gimple_opt_pass *make_pass_sra_early (context &ctxt);
+extern gimple_opt_pass *make_pass_early_ipa_sra (context &ctxt);
+extern gimple_opt_pass *make_pass_tail_recursion (context &ctxt);
+extern gimple_opt_pass *make_pass_tail_calls (context &ctxt);
+extern gimple_opt_pass *make_pass_tree_loop (context &ctxt);
+extern gimple_opt_pass *make_pass_tree_loop_init (context &ctxt);
+extern gimple_opt_pass *make_pass_lim (context &ctxt);
+extern gimple_opt_pass *make_pass_tree_unswitch (context &ctxt);
+extern gimple_opt_pass *make_pass_predcom (context &ctxt);
+extern gimple_opt_pass *make_pass_iv_canon (context &ctxt);
+extern gimple_opt_pass *make_pass_scev_cprop (context &ctxt);
+extern gimple_opt_pass *make_pass_empty_loop (context &ctxt);
+extern gimple_opt_pass *make_pass_record_bounds (context &ctxt);
+extern gimple_opt_pass *make_pass_graphite (context &ctxt);
+extern gimple_opt_pass *make_pass_graphite_transforms (context &ctxt);
+extern gimple_opt_pass *make_pass_if_conversion (context &ctxt);
+extern gimple_opt_pass *make_pass_loop_distribution (context &ctxt);
+extern gimple_opt_pass *make_pass_vectorize (context &ctxt);
+extern gimple_opt_pass *make_pass_slp_vectorize (context &ctxt);
+extern gimple_opt_pass *make_pass_complete_unroll (context &ctxt);
+extern gimple_opt_pass *make_pass_complete_unrolli (context &ctxt);
+extern gimple_opt_pass *make_pass_parallelize_loops (context &ctxt);
+extern gimple_opt_pass *make_pass_loop_prefetch (context &ctxt);
+extern gimple_opt_pass *make_pass_iv_optimize (context &ctxt);
+extern gimple_opt_pass *make_pass_tree_loop_done (context &ctxt);
+extern gimple_opt_pass *make_pass_ch (context &ctxt);
+extern gimple_opt_pass *make_pass_ccp (context &ctxt);
+extern gimple_opt_pass *make_pass_phi_only_cprop (context &ctxt);
+extern gimple_opt_pass *make_pass_build_ssa (context &ctxt);
+extern gimple_opt_pass *make_pass_build_alias (context &ctxt);
+extern gimple_opt_pass *make_pass_build_ealias (context &ctxt);
+extern gimple_opt_pass *make_pass_dominator (context &ctxt);
+extern gimple_opt_pass *make_pass_dce (context &ctxt);
+extern gimple_opt_pass *make_pass_dce_loop (context &ctxt);
+extern gimple_opt_pass *make_pass_cd_dce (context &ctxt);
+extern gimple_opt_pass *make_pass_call_cdce (context &ctxt);
+extern gimple_opt_pass *make_pass_merge_phi (context &ctxt);
+extern gimple_opt_pass *make_pass_split_crit_edges (context &ctxt);
+extern gimple_opt_pass *make_pass_pre (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 (context &ctxt);
+extern gimple_opt_pass *make_pass_strip_predict_hints (context &ctxt);
+extern gimple_opt_pass *make_pass_lower_complex_O0 (context &ctxt);
+extern gimple_opt_pass *make_pass_lower_complex (context &ctxt);
+extern gimple_opt_pass *make_pass_lower_vector (context &ctxt);
+extern gimple_opt_pass *make_pass_lower_vector_ssa (context &ctxt);
+extern gimple_opt_pass *make_pass_lower_omp (context &ctxt);
+extern gimple_opt_pass *make_pass_diagnose_omp_blocks (context &ctxt);
+extern gimple_opt_pass *make_pass_expand_omp (context &ctxt);
+extern gimple_opt_pass *make_pass_expand_omp_ssa (context &ctxt);
+extern gimple_opt_pass *make_pass_object_sizes (context &ctxt);
+extern gimple_opt_pass *make_pass_strlen (context &ctxt);
+extern gimple_opt_pass *make_pass_fold_builtins (context &ctxt);
+extern gimple_opt_pass *make_pass_stdarg (context &ctxt);
+extern gimple_opt_pass *make_pass_early_warn_uninitialized (context &ctxt);
+extern gimple_opt_pass *make_pass_late_warn_uninitialized (context &ctxt);
+extern gimple_opt_pass *make_pass_cse_reciprocals (context &ctxt);
+extern gimple_opt_pass *make_pass_cse_sincos (context &ctxt);
+extern gimple_opt_pass *make_pass_optimize_bswap (context &ctxt);
+extern gimple_opt_pass *make_pass_optimize_widening_mul (context &ctxt);
+extern gimple_opt_pass *make_pass_warn_function_return (context &ctxt);
+extern gimple_opt_pass *make_pass_warn_function_noreturn (context &ctxt);
+extern gimple_opt_pass *make_pass_cselim (context &ctxt);
+extern gimple_opt_pass *make_pass_phiopt (context &ctxt);
+extern gimple_opt_pass *make_pass_forwprop (context &ctxt);
+extern gimple_opt_pass *make_pass_phiprop (context &ctxt);
+extern gimple_opt_pass *make_pass_tree_ifcombine (context &ctxt);
+extern gimple_opt_pass *make_pass_dse (context &ctxt);
+extern gimple_opt_pass *make_pass_nrv (context &ctxt);
+extern gimple_opt_pass *make_pass_rename_ssa_copies (context &ctxt);
+extern gimple_opt_pass *make_pass_sink_code (context &ctxt);
+extern gimple_opt_pass *make_pass_fre (context &ctxt);
+extern gimple_opt_pass *make_pass_check_data_deps (context &ctxt);
+extern gimple_opt_pass *make_pass_copy_prop (context &ctxt);
+extern gimple_opt_pass *make_pass_vrp (context &ctxt);
+extern gimple_opt_pass *make_pass_uncprop (context &ctxt);
+extern gimple_opt_pass *make_pass_return_slot (context &ctxt);
+extern gimple_opt_pass *make_pass_reassoc (context &ctxt);
+extern gimple_opt_pass *make_pass_rebuild_cgraph_edges (context &ctxt);
+extern gimple_opt_pass *make_pass_remove_cgraph_callee_edges (context &ctxt);
+extern gimple_opt_pass *make_pass_build_cgraph_edges (context &ctxt);
+extern gimple_opt_pass *make_pass_local_pure_const (context &ctxt);
+extern gimple_opt_pass *make_pass_tracer (context &ctxt);
+extern gimple_opt_pass *make_pass_warn_unused_result (context &ctxt);
+extern gimple_opt_pass *make_pass_diagnose_tm_blocks (context &ctxt);
+extern gimple_opt_pass *make_pass_lower_tm (context &ctxt);
+extern gimple_opt_pass *make_pass_tm_init (context &ctxt);
+extern gimple_opt_pass *make_pass_tm_mark (context &ctxt);
+extern gimple_opt_pass *make_pass_tm_memopt (context &ctxt);
+extern gimple_opt_pass *make_pass_tm_edges (context &ctxt);
+extern gimple_opt_pass *make_pass_split_functions (context &ctxt);
+extern gimple_opt_pass *make_pass_feedback_split_functions (context &ctxt);
+extern gimple_opt_pass *make_pass_strength_reduction (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_wpa_fixup;
-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 (context &ctxt);
+extern simple_ipa_opt_pass *make_pass_ipa_function_and_variable_visibility (context &ctxt);
+extern simple_ipa_opt_pass *make_pass_ipa_tree_profile (context &ctxt);
+
+extern simple_ipa_opt_pass *make_pass_early_local_passes (context &ctxt);
+
+extern ipa_opt_pass_d *make_pass_ipa_whole_program_visibility (context &ctxt);
+extern ipa_opt_pass_d *make_pass_ipa_lto_gimple_out (context &ctxt);
+extern simple_ipa_opt_pass *make_pass_ipa_increase_alignment (context &ctxt);
+extern ipa_opt_pass_d *make_pass_ipa_inline (context &ctxt);
+extern simple_ipa_opt_pass *make_pass_ipa_free_lang_data (context &ctxt);
+extern simple_ipa_opt_pass *make_pass_ipa_free_inline_summary (context &ctxt);
+extern ipa_opt_pass_d *make_pass_ipa_cp (context &ctxt);
+extern ipa_opt_pass_d *make_pass_ipa_reference (context &ctxt);
+extern ipa_opt_pass_d *make_pass_ipa_pure_const (context &ctxt);
+extern simple_ipa_opt_pass *make_pass_ipa_pta (context &ctxt);
+extern ipa_opt_pass_d *make_pass_ipa_lto_wpa_fixup (context &ctxt);
+extern ipa_opt_pass_d *make_pass_ipa_lto_finish_out (context &ctxt);
+extern simple_ipa_opt_pass *make_pass_ipa_tm (context &ctxt);
+extern ipa_opt_pass_d *make_pass_ipa_profile (context &ctxt);
+extern ipa_opt_pass_d *make_pass_ipa_cdtor_merge (context &ctxt);
+
+extern gimple_opt_pass *make_pass_cleanup_cfg_post_optimizing (context &ctxt);
+extern gimple_opt_pass *make_pass_init_datastructures (context &ctxt);
+extern gimple_opt_pass *make_pass_fixup_cfg (context &ctxt);
+
+extern rtl_opt_pass *make_pass_expand (context &ctxt);
+extern rtl_opt_pass *make_pass_instantiate_virtual_regs (context &ctxt);
+extern rtl_opt_pass *make_pass_rtl_fwprop (context &ctxt);
+extern rtl_opt_pass *make_pass_rtl_fwprop_addr (context &ctxt);
+extern rtl_opt_pass *make_pass_jump (context &ctxt);
+extern rtl_opt_pass *make_pass_jump2 (context &ctxt);
+extern rtl_opt_pass *make_pass_lower_subreg (context &ctxt);
+extern rtl_opt_pass *make_pass_cse (context &ctxt);
+extern rtl_opt_pass *make_pass_fast_rtl_dce (context &ctxt);
+extern rtl_opt_pass *make_pass_ud_rtl_dce (context &ctxt);
+extern rtl_opt_pass *make_pass_rtl_dce (context &ctxt);
+extern rtl_opt_pass *make_pass_rtl_dse1 (context &ctxt);
+extern rtl_opt_pass *make_pass_rtl_dse2 (context &ctxt);
+extern rtl_opt_pass *make_pass_rtl_dse3 (context &ctxt);
+extern rtl_opt_pass *make_pass_rtl_cprop (context &ctxt);
+extern rtl_opt_pass *make_pass_rtl_pre (context &ctxt);
+extern rtl_opt_pass *make_pass_rtl_hoist (context &ctxt);
+extern rtl_opt_pass *make_pass_rtl_store_motion (context &ctxt);
+extern rtl_opt_pass *make_pass_cse_after_global_opts (context &ctxt);
+extern rtl_opt_pass *make_pass_rtl_ifcvt (context &ctxt);
+
+extern rtl_opt_pass *make_pass_into_cfg_layout_mode (context &ctxt);
+extern rtl_opt_pass *make_pass_outof_cfg_layout_mode (context &ctxt);
+
+extern rtl_opt_pass *make_pass_loop2 (context &ctxt);
+extern rtl_opt_pass *make_pass_rtl_loop_init (context &ctxt);
+extern rtl_opt_pass *make_pass_rtl_move_loop_invariants (context &ctxt);
+extern rtl_opt_pass *make_pass_rtl_unswitch (context &ctxt);
+extern rtl_opt_pass *make_pass_rtl_unroll_and_peel_loops (context &ctxt);
+extern rtl_opt_pass *make_pass_rtl_doloop (context &ctxt);
+extern rtl_opt_pass *make_pass_rtl_loop_done (context &ctxt);
+
+extern rtl_opt_pass *make_pass_web (context &ctxt);
+extern rtl_opt_pass *make_pass_cse2 (context &ctxt);
+extern rtl_opt_pass *make_pass_df_initialize_opt (context &ctxt);
+extern rtl_opt_pass *make_pass_df_initialize_no_opt (context &ctxt);
+extern rtl_opt_pass *make_pass_reginfo_init (context &ctxt);
+extern rtl_opt_pass *make_pass_inc_dec (context &ctxt);
+extern rtl_opt_pass *make_pass_stack_ptr_mod (context &ctxt);
+extern rtl_opt_pass *make_pass_initialize_regs (context &ctxt);
+extern rtl_opt_pass *make_pass_combine (context &ctxt);
+extern rtl_opt_pass *make_pass_if_after_combine (context &ctxt);
+extern rtl_opt_pass *make_pass_ree (context &ctxt);
+extern rtl_opt_pass *make_pass_partition_blocks (context &ctxt);
+extern rtl_opt_pass *make_pass_match_asm_constraints (context &ctxt);
+extern rtl_opt_pass *make_pass_regmove (context &ctxt);
+extern rtl_opt_pass *make_pass_split_all_insns (context &ctxt);
+extern rtl_opt_pass *make_pass_fast_rtl_byte_dce (context &ctxt);
+extern rtl_opt_pass *make_pass_lower_subreg2 (context &ctxt);
+extern rtl_opt_pass *make_pass_mode_switching (context &ctxt);
+extern rtl_opt_pass *make_pass_sms (context &ctxt);
+extern rtl_opt_pass *make_pass_sched (context &ctxt);
+extern rtl_opt_pass *make_pass_ira (context &ctxt);
+extern rtl_opt_pass *make_pass_reload (context &ctxt);
+extern rtl_opt_pass *make_pass_clean_state (context &ctxt);
+extern rtl_opt_pass *make_pass_branch_prob (context &ctxt);
+extern rtl_opt_pass *make_pass_value_profile_transformations (context &ctxt);
+extern rtl_opt_pass *make_pass_postreload_cse (context &ctxt);
+extern rtl_opt_pass *make_pass_gcse2 (context &ctxt);
+extern rtl_opt_pass *make_pass_split_after_reload (context &ctxt);
+extern rtl_opt_pass *make_pass_branch_target_load_optimize1 (context &ctxt);
+extern rtl_opt_pass *make_pass_thread_prologue_and_epilogue (context &ctxt);
+extern rtl_opt_pass *make_pass_stack_adjustments (context &ctxt);
+extern rtl_opt_pass *make_pass_peephole2 (context &ctxt);
+extern rtl_opt_pass *make_pass_if_after_reload (context &ctxt);
+extern rtl_opt_pass *make_pass_regrename (context &ctxt);
+extern rtl_opt_pass *make_pass_cprop_hardreg (context &ctxt);
+extern rtl_opt_pass *make_pass_reorder_blocks (context &ctxt);
+extern rtl_opt_pass *make_pass_branch_target_load_optimize2 (context &ctxt);
+extern rtl_opt_pass *make_pass_leaf_regs (context &ctxt);
+extern rtl_opt_pass *make_pass_split_before_sched2 (context &ctxt);
+extern rtl_opt_pass *make_pass_compare_elim_after_reload (context &ctxt);
+extern rtl_opt_pass *make_pass_sched2 (context &ctxt);
+extern rtl_opt_pass *make_pass_stack_regs (context &ctxt);
+extern rtl_opt_pass *make_pass_stack_regs_run (context &ctxt);
+extern rtl_opt_pass *make_pass_df_finish (context &ctxt);
+extern rtl_opt_pass *make_pass_compute_alignments (context &ctxt);
+extern rtl_opt_pass *make_pass_duplicate_computed_gotos (context &ctxt);
+extern rtl_opt_pass *make_pass_variable_tracking (context &ctxt);
+extern rtl_opt_pass *make_pass_free_cfg (context &ctxt);
+extern rtl_opt_pass *make_pass_machine_reorg (context &ctxt);
+extern rtl_opt_pass *make_pass_cleanup_barriers (context &ctxt);
+extern rtl_opt_pass *make_pass_delay_slots (context &ctxt);
+extern rtl_opt_pass *make_pass_split_for_shorten_branches (context &ctxt);
+extern rtl_opt_pass *make_pass_split_before_regstack (context &ctxt);
+extern rtl_opt_pass *make_pass_convert_to_eh_region_ranges (context &ctxt);
+extern rtl_opt_pass *make_pass_shorten_branches (context &ctxt);
+extern rtl_opt_pass *make_pass_set_nothrow_function_flags (context &ctxt);
+extern rtl_opt_pass *make_pass_dwarf2_frame (context &ctxt);
+extern rtl_opt_pass *make_pass_final (context &ctxt);
+extern rtl_opt_pass *make_pass_rtl_seqabstr (context &ctxt);
+extern gimple_opt_pass *make_pass_release_ssa_names (context &ctxt);
+extern gimple_opt_pass *make_pass_early_inline (context &ctxt);
+extern gimple_opt_pass *make_pass_inline_parameters (context &ctxt);
+extern gimple_opt_pass *make_pass_update_address_taken (context &ctxt);
+extern gimple_opt_pass *make_pass_convert_switch (context &ctxt);
 
 /* The root of the compilation pass tree, once constructed.  */
 extern struct opt_pass *all_passes, *all_small_ipa_passes, *all_lowering_passes,
diff --git a/gcc/tree-profile.c b/gcc/tree-profile.c
index 9985b40..ede83b8 100644
--- a/gcc/tree-profile.c
+++ b/gcc/tree-profile.c
@@ -561,24 +561,34 @@ gate_tree_profile_ipa (void)
 	      || profile_arc_flag));
 }
 
-struct simple_ipa_opt_pass pass_ipa_tree_profile =
+class pass_ipa_tree_profile : public simple_ipa_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_ipa_tree_profile(context &ctxt)
+    : simple_ipa_opt_pass(ctxt,
+			  "profile",
+			  OPTGROUP_NONE,
+			  TV_IPA_PROFILE,
+			  pass_properties(required(0),
+					  provided(0),
+					  destroyed(0)),
+			  pass_todo_flags(start(0),
+					  finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_tree_profile_ipa (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return tree_profiling (); }
+
+}; // class pass_ipa_tree_profile
+
+simple_ipa_opt_pass *
+make_pass_ipa_tree_profile (context &ctxt)
+{
+  return new pass_ipa_tree_profile (ctxt);
+}
 
 #include "gt-tree-profile.h"
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index a148a60..d78debf 100644
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -3433,47 +3433,65 @@ gate_intra_sra (void)
 }
 
 
-struct gimple_opt_pass pass_sra_early =
+class pass_sra_early : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_sra_early(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "esra",
+		      OPTGROUP_NONE,
+		      TV_TREE_SRA,
+		      pass_properties(required(PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_update_ssa | TODO_verify_ssa)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_intra_sra (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return early_intra_sra (); }
+
+}; // class pass_sra_early
+
+gimple_opt_pass *
+make_pass_sra_early (context &ctxt)
+{
+  return new pass_sra_early (ctxt);
+}
 
-struct gimple_opt_pass pass_sra =
+class pass_sra : public gimple_opt_pass
 {
- {
-  GIMPLE_PASS,
-  "sra",	 			/* name */
-  OPTGROUP_NONE,                        /* optinfo_flags */
-  gate_intra_sra,			/* gate */
-  late_intra_sra,			/* execute */
-  NULL,					/* sub */
-  NULL,					/* next */
-  0,					/* static_pass_number */
-  TV_TREE_SRA,				/* tv_id */
-  PROP_cfg | PROP_ssa,                  /* properties_required */
-  0,					/* properties_provided */
-  0,					/* properties_destroyed */
-  TODO_update_address_taken,		/* todo_flags_start */
-  TODO_update_ssa
-  | TODO_verify_ssa			/* todo_flags_finish */
- }
-};
+public:
+  pass_sra(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "sra",
+		      OPTGROUP_NONE,
+		      TV_TREE_SRA,
+		      pass_properties(required(PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(TODO_update_address_taken),
+				      finish(TODO_update_ssa | TODO_verify_ssa)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_intra_sra (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return late_intra_sra (); }
+
+}; // class pass_sra
+
+gimple_opt_pass *
+make_pass_sra (context &ctxt)
+{
+  return new pass_sra (ctxt);
+}
 
 
 /* Return true iff PARM (which must be a parm_decl) is an unused scalar
@@ -5009,22 +5027,32 @@ ipa_early_sra_gate (void)
   return flag_ipa_sra && dbg_cnt (eipa_sra);
 }
 
-struct gimple_opt_pass pass_early_ipa_sra =
+class pass_early_ipa_sra : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_early_ipa_sra(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "eipa_sra",
+		      OPTGROUP_NONE,
+		      TV_IPA_SRA,
+		      pass_properties(required(0),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_dump_symtab)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return ipa_early_sra_gate (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return ipa_early_sra (); }
+
+}; // class pass_early_ipa_sra
+
+gimple_opt_pass *
+make_pass_early_ipa_sra (context &ctxt)
+{
+  return new pass_early_ipa_sra (ctxt);
+}
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c
index 1bc4c2f..ac8d81e 100644
--- a/gcc/tree-ssa-ccp.c
+++ b/gcc/tree-ssa-ccp.c
@@ -2121,27 +2121,35 @@ gate_ccp (void)
 }
 
 
-struct gimple_opt_pass pass_ccp =
+class pass_ccp : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_ccp(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "ccp",
+		      OPTGROUP_NONE,
+		      TV_TREE_CCP,
+		      pass_properties(required(PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_verify_ssa | TODO_update_address_taken | TODO_verify_stmts)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_ccp (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return do_ssa_ccp (); }
+
+}; // class pass_ccp
+
+gimple_opt_pass *
+make_pass_ccp (context &ctxt)
+{
+  return new pass_ccp (ctxt);
+}
 
 
 
@@ -2521,23 +2529,32 @@ execute_fold_all_builtins (void)
 }
 
 
-struct gimple_opt_pass pass_fold_builtins =
+class pass_fold_builtins : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_fold_builtins(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "fab",
+		      OPTGROUP_NONE,
+		      TV_NONE,
+		      pass_properties(required(PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_verify_ssa | TODO_update_ssa)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return execute_fold_all_builtins (); }
+
+}; // class pass_fold_builtins
+
+gimple_opt_pass *
+make_pass_fold_builtins (context &ctxt)
+{
+  return new pass_fold_builtins (ctxt);
+}
diff --git a/gcc/tree-ssa-copy.c b/gcc/tree-ssa-copy.c
index d16756c..f54fb29 100644
--- a/gcc/tree-ssa-copy.c
+++ b/gcc/tree-ssa-copy.c
@@ -827,24 +827,32 @@ gate_copy_prop (void)
   return flag_tree_copy_prop != 0;
 }
 
-struct gimple_opt_pass pass_copy_prop =
+class pass_copy_prop : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_copy_prop(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "copyprop",
+		      OPTGROUP_NONE,
+		      TV_TREE_COPY_PROP,
+		      pass_properties(required(PROP_ssa | PROP_cfg),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_cleanup_cfg | TODO_verify_ssa | TODO_update_ssa)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_copy_prop (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return execute_copy_prop (); }
+
+}; // class pass_copy_prop
+
+gimple_opt_pass *
+make_pass_copy_prop (context &ctxt)
+{
+  return new pass_copy_prop (ctxt);
+}
diff --git a/gcc/tree-ssa-copyrename.c b/gcc/tree-ssa-copyrename.c
index 6f49b7e..29fcbb4 100644
--- a/gcc/tree-ssa-copyrename.c
+++ b/gcc/tree-ssa-copyrename.c
@@ -435,22 +435,32 @@ gate_copyrename (void)
   return flag_tree_copyrename != 0;
 }
 
-struct gimple_opt_pass pass_rename_ssa_copies =
+class pass_rename_ssa_copies : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_rename_ssa_copies(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "copyrename",
+		      OPTGROUP_NONE,
+		      TV_TREE_COPY_RENAME,
+		      pass_properties(required(PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_verify_ssa)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_copyrename (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return rename_ssa_copies (); }
+
+}; // class pass_rename_ssa_copies
+
+gimple_opt_pass *
+make_pass_rename_ssa_copies (context &ctxt)
+{
+  return new pass_rename_ssa_copies (ctxt);
+}
diff --git a/gcc/tree-ssa-dce.c b/gcc/tree-ssa-dce.c
index 05c58fe..f8c29cf 100644
--- a/gcc/tree-ssa-dce.c
+++ b/gcc/tree-ssa-dce.c
@@ -1643,63 +1643,92 @@ gate_dce (void)
   return flag_tree_dce != 0;
 }
 
-struct gimple_opt_pass pass_dce =
+class pass_dce : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
-
-struct gimple_opt_pass pass_dce_loop =
+public:
+  pass_dce(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "dce",
+		      OPTGROUP_NONE,
+		      TV_TREE_DCE,
+		      pass_properties(required(PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_verify_ssa)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_dce (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return tree_ssa_dce (); }
+
+}; // class pass_dce
+
+gimple_opt_pass *
+make_pass_dce (context &ctxt)
 {
- {
-  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 */
- }
-};
-
-struct gimple_opt_pass pass_cd_dce =
+  return new pass_dce (ctxt);
+}
+
+class pass_dce_loop : public gimple_opt_pass
+{
+public:
+  pass_dce_loop(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "dceloop",
+		      OPTGROUP_NONE,
+		      TV_TREE_DCE,
+		      pass_properties(required(PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_verify_ssa)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_dce (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return tree_ssa_dce_loop (); }
+
+}; // class pass_dce_loop
+
+gimple_opt_pass *
+make_pass_dce_loop (context &ctxt)
+{
+  return new pass_dce_loop (ctxt);
+}
+
+class pass_cd_dce : 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_cd_dce(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "cddce",
+		      OPTGROUP_NONE,
+		      TV_TREE_CD_DCE,
+		      pass_properties(required(PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_verify_ssa | TODO_verify_flow)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_dce (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return tree_ssa_cd_dce (); }
+
+}; // class pass_cd_dce
+
+gimple_opt_pass *
+make_pass_cd_dce (context &ctxt)
+{
+  return new pass_cd_dce (ctxt);
+}
diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c
index d650d95..3bcaa2e 100644
--- a/gcc/tree-ssa-dom.c
+++ b/gcc/tree-ssa-dom.c
@@ -854,28 +854,35 @@ gate_dominator (void)
   return flag_tree_dom != 0;
 }
 
-struct gimple_opt_pass pass_dominator =
+class pass_dominator : public gimple_opt_pass
 {
- {
-  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
-    | TODO_verify_ssa
-    | TODO_verify_flow			/* todo_flags_finish */
- }
-};
+public:
+  pass_dominator(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "dom",
+		      OPTGROUP_NONE,
+		      TV_TREE_SSA_DOMINATOR_OPTS,
+		      pass_properties(required(PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_cleanup_cfg | TODO_update_ssa | TODO_verify_ssa | TODO_verify_flow)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_dominator (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return tree_ssa_dominator_optimize (); }
+
+}; // class pass_dominator
+
+gimple_opt_pass *
+make_pass_dominator (context &ctxt)
+{
+  return new pass_dominator (ctxt);
+}
 
 
 /* Given a conditional statement CONDSTMT, convert the
@@ -3059,25 +3066,32 @@ eliminate_degenerate_phis (void)
   return 0;
 }
 
-struct gimple_opt_pass pass_phi_only_cprop =
+class pass_phi_only_cprop : public gimple_opt_pass
 {
- {
-  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
-    | TODO_verify_stmts
-    | TODO_update_ssa			/* todo_flags_finish */
- }
-};
+public:
+  pass_phi_only_cprop(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "phicprop",
+		      OPTGROUP_NONE,
+		      TV_TREE_PHI_CPROP,
+		      pass_properties(required(PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_cleanup_cfg | TODO_verify_ssa | TODO_verify_stmts | TODO_update_ssa)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_dominator (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return eliminate_degenerate_phis (); }
+
+}; // class pass_phi_only_cprop
+
+gimple_opt_pass *
+make_pass_phi_only_cprop (context &ctxt)
+{
+  return new pass_phi_only_cprop (ctxt);
+}
diff --git a/gcc/tree-ssa-dse.c b/gcc/tree-ssa-dse.c
index ad99ea9..b48bdf5 100644
--- a/gcc/tree-ssa-dse.c
+++ b/gcc/tree-ssa-dse.c
@@ -359,22 +359,32 @@ gate_dse (void)
   return flag_tree_dse != 0;
 }
 
-struct gimple_opt_pass pass_dse =
+class pass_dse : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_dse(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "dse",
+		      OPTGROUP_NONE,
+		      TV_TREE_DSE,
+		      pass_properties(required(PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_verify_ssa)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_dse (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return tree_ssa_dse (); }
+
+}; // class pass_dse
+
+gimple_opt_pass *
+make_pass_dse (context &ctxt)
+{
+  return new pass_dse (ctxt);
+}
diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c
index ac930c6..3587aed 100644
--- a/gcc/tree-ssa-forwprop.c
+++ b/gcc/tree-ssa-forwprop.c
@@ -3136,23 +3136,34 @@ gate_forwprop (void)
   return flag_tree_forwprop;
 }
 
-struct gimple_opt_pass pass_forwprop =
+class pass_forwprop : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_forwprop(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "forwprop",
+		      OPTGROUP_NONE,
+		      TV_TREE_FORWPROP,
+		      pass_properties(required(PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_update_ssa | TODO_verify_ssa)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_forwprop (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () {
+    return ssa_forward_propagate_and_combine ();
+  }
+
+}; // class pass_forwprop
+
+gimple_opt_pass *
+make_pass_forwprop (context &ctxt)
+{
+  return new pass_forwprop (ctxt);
+}
diff --git a/gcc/tree-ssa-ifcombine.c b/gcc/tree-ssa-ifcombine.c
index 9598eb8..6f511bc 100644
--- a/gcc/tree-ssa-ifcombine.c
+++ b/gcc/tree-ssa-ifcombine.c
@@ -648,23 +648,32 @@ gate_ifcombine (void)
   return 1;
 }
 
-struct gimple_opt_pass pass_tree_ifcombine =
+class pass_tree_ifcombine : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_tree_ifcombine(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "ifcombine",
+		      OPTGROUP_NONE,
+		      TV_TREE_IFCOMBINE,
+		      pass_properties(required(PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_update_ssa | TODO_verify_ssa)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_ifcombine (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return tree_ssa_ifcombine (); }
+
+}; // class pass_tree_ifcombine
+
+gimple_opt_pass *
+make_pass_tree_ifcombine (context &ctxt)
+{
+  return new pass_tree_ifcombine (ctxt);
+}
diff --git a/gcc/tree-ssa-loop-ch.c b/gcc/tree-ssa-loop-ch.c
index b8dd1a3..148eca9 100644
--- a/gcc/tree-ssa-loop-ch.c
+++ b/gcc/tree-ssa-loop-ch.c
@@ -255,24 +255,32 @@ gate_ch (void)
   return flag_tree_ch != 0;
 }
 
-struct gimple_opt_pass pass_ch =
+class pass_ch : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_ch(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "ch",
+		      OPTGROUP_LOOP,
+		      TV_TREE_CH,
+		      pass_properties(required(PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_cleanup_cfg | TODO_verify_ssa | TODO_verify_flow)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_ch (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return copy_loop_headers (); }
+
+}; // class pass_ch
+
+gimple_opt_pass *
+make_pass_ch (context &ctxt)
+{
+  return new pass_ch (ctxt);
+}
diff --git a/gcc/tree-ssa-loop.c b/gcc/tree-ssa-loop.c
index fef6883..0af7720 100644
--- a/gcc/tree-ssa-loop.c
+++ b/gcc/tree-ssa-loop.c
@@ -41,25 +41,35 @@ 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 */
- }
-};
+class pass_tree_loop : public gimple_opt_pass
+{
+public:
+  pass_tree_loop(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "loop",
+		      OPTGROUP_LOOP,
+		      TV_TREE_LOOP,
+		      pass_properties(required(PROP_cfg),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_verify_ssa)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_tree_loop (); }
+
+  bool has_execute () { return false; }
+  unsigned int impl_execute () { return 0; }
+
+}; // class pass_tree_loop
+
+gimple_opt_pass *
+make_pass_tree_loop (context &ctxt)
+{
+  return new pass_tree_loop (ctxt);
+}
 
 /* Loop optimizer initialization.  */
 
@@ -80,25 +90,35 @@ 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 */
-  PROP_loops,				/* 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(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "loopinit",
+		      OPTGROUP_LOOP,
+		      TV_NONE,
+		      pass_properties(required(PROP_cfg),
+				      provided(PROP_loops),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return tree_ssa_loop_init (); }
+
+}; // class pass_tree_loop_init
+
+gimple_opt_pass *
+make_pass_tree_loop_init (context &ctxt)
+{
+  return new pass_tree_loop_init (ctxt);
+}
 
 /* Loop invariant motion pass.  */
 
@@ -117,25 +137,35 @@ 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 */
- }
-};
+class pass_lim : public gimple_opt_pass
+{
+public:
+  pass_lim(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "lim",
+		      OPTGROUP_LOOP,
+		      TV_LIM,
+		      pass_properties(required(PROP_cfg),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_tree_ssa_loop_im (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return tree_ssa_loop_im (); }
+
+}; // class pass_lim
+
+gimple_opt_pass *
+make_pass_lim (context &ctxt)
+{
+  return new pass_lim (ctxt);
+}
 
 /* Loop unswitching pass.  */
 
@@ -154,25 +184,35 @@ 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 */
- }
-};
+class pass_tree_unswitch : public gimple_opt_pass
+{
+public:
+  pass_tree_unswitch(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "unswitch",
+		      OPTGROUP_LOOP,
+		      TV_TREE_LOOP_UNSWITCH,
+		      pass_properties(required(PROP_cfg),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_tree_ssa_loop_unswitch (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return tree_ssa_loop_unswitch (); }
+
+}; // class pass_tree_unswitch
+
+gimple_opt_pass *
+make_pass_tree_unswitch (context &ctxt)
+{
+  return new pass_tree_unswitch (ctxt);
+}
 
 /* Predictive commoning.  */
 
@@ -191,25 +231,35 @@ 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 */
- }
-};
+class pass_predcom : public gimple_opt_pass
+{
+public:
+  pass_predcom(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "pcom",
+		      OPTGROUP_LOOP,
+		      TV_PREDCOM,
+		      pass_properties(required(PROP_cfg),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_update_ssa_only_virtuals)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_tree_predictive_commoning (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return run_tree_predictive_commoning (); }
+
+}; // class pass_predcom
+
+gimple_opt_pass *
+make_pass_predcom (context &ctxt)
+{
+  return new pass_predcom (ctxt);
+}
 
 /* Loop autovectorization.  */
 
@@ -228,26 +278,35 @@ 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 */
- }
-};
+class pass_vectorize : public gimple_opt_pass
+{
+public:
+  pass_vectorize(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "vect",
+		      OPTGROUP_LOOP | OPTGROUP_VEC,
+		      TV_TREE_VECTORIZATION,
+		      pass_properties(required(PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_tree_vectorize (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return tree_vectorize (); }
+
+}; // class pass_vectorize
+
+gimple_opt_pass *
+make_pass_vectorize (context &ctxt)
+{
+  return new pass_vectorize (ctxt);
+}
 
 /* GRAPHITE optimizations.  */
 
@@ -278,45 +337,65 @@ 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 */
- }
-};
-
-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(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "graphite0",
+		      OPTGROUP_LOOP,
+		      TV_GRAPHITE,
+		      pass_properties(required(PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_graphite_transforms (); }
+
+  bool has_execute () { return false; }
+  unsigned int impl_execute () { return 0; }
+
+}; // class pass_graphite
+
+gimple_opt_pass *
+make_pass_graphite (context &ctxt)
+{
+  return new pass_graphite (ctxt);
+}
+
+class pass_graphite_transforms : public gimple_opt_pass
+{
+public:
+  pass_graphite_transforms(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "graphite",
+		      OPTGROUP_LOOP,
+		      TV_GRAPHITE_TRANSFORMS,
+		      pass_properties(required(PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_graphite_transforms (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return graphite_transforms (); }
+
+}; // class pass_graphite_transforms
+
+gimple_opt_pass *
+make_pass_graphite_transforms (context &ctxt)
+{
+  return new pass_graphite_transforms (ctxt);
+}
 
 /* Check the correctness of the data dependence analyzers.  */
 
@@ -336,25 +415,35 @@ 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 */
- }
-};
+class pass_check_data_deps : public gimple_opt_pass
+{
+public:
+  pass_check_data_deps(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "ckdd",
+		      OPTGROUP_LOOP,
+		      TV_CHECK_DATA_DEPS,
+		      pass_properties(required(PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_check_data_deps (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return check_data_deps (); }
+
+}; // class pass_check_data_deps
+
+gimple_opt_pass *
+make_pass_check_data_deps (context &ctxt)
+{
+  return new pass_check_data_deps (ctxt);
+}
 
 /* Canonical induction variable creation pass.  */
 
@@ -373,25 +462,35 @@ 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 */
- }
-};
+class pass_iv_canon : public gimple_opt_pass
+{
+public:
+  pass_iv_canon(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "ivcanon",
+		      OPTGROUP_LOOP,
+		      TV_TREE_LOOP_IVCANON,
+		      pass_properties(required(PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_tree_ssa_loop_ivcanon (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return tree_ssa_loop_ivcanon (); }
+
+}; // class pass_iv_canon
+
+gimple_opt_pass *
+make_pass_iv_canon (context &ctxt)
+{
+  return new pass_iv_canon (ctxt);
+}
 
 /* Propagation of constants using scev.  */
 
@@ -401,27 +500,35 @@ 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 */
- }
-};
+class pass_scev_cprop : public gimple_opt_pass
+{
+public:
+  pass_scev_cprop(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "sccp",
+		      OPTGROUP_LOOP,
+		      TV_SCEV_CONST,
+		      pass_properties(required(PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_cleanup_cfg | TODO_update_ssa_only_virtuals)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_scev_const_prop (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return scev_const_prop (); }
+
+}; // class pass_scev_cprop
+
+gimple_opt_pass *
+make_pass_scev_cprop (context &ctxt)
+{
+  return new pass_scev_cprop (ctxt);
+}
 
 /* Record bounds on numbers of iterations of loops.  */
 
@@ -436,25 +543,35 @@ 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 */
- }
-};
+class pass_record_bounds : public gimple_opt_pass
+{
+public:
+  pass_record_bounds(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "*record_bounds",
+		      OPTGROUP_NONE,
+		      TV_TREE_LOOP_BOUNDS,
+		      pass_properties(required(PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return tree_ssa_loop_bounds (); }
+
+}; // class pass_record_bounds
+
+gimple_opt_pass *
+make_pass_record_bounds (context &ctxt)
+{
+  return new pass_record_bounds (ctxt);
+}
 
 /* Complete unrolling of loops.  */
 
@@ -475,25 +592,35 @@ 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 */
- }
-};
+class pass_complete_unroll : public gimple_opt_pass
+{
+public:
+  pass_complete_unroll(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "cunroll",
+		      OPTGROUP_LOOP,
+		      TV_COMPLETE_UNROLL,
+		      pass_properties(required(PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_tree_complete_unroll (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return tree_complete_unroll (); }
+
+}; // class pass_complete_unroll
+
+gimple_opt_pass *
+make_pass_complete_unroll (context &ctxt)
+{
+  return new pass_complete_unroll (ctxt);
+}
 
 /* Complete unrolling of inner loops.  */
 
@@ -522,25 +649,35 @@ 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 */
- }
-};
+class pass_complete_unrolli : public gimple_opt_pass
+{
+public:
+  pass_complete_unrolli(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "cunrolli",
+		      OPTGROUP_LOOP,
+		      TV_COMPLETE_UNROLL,
+		      pass_properties(required(PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_verify_flow)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_tree_complete_unroll_inner (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return tree_complete_unroll_inner (); }
+
+}; // class pass_complete_unrolli
+
+gimple_opt_pass *
+make_pass_complete_unrolli (context &ctxt)
+{
+  return new pass_complete_unrolli (ctxt);
+}
 
 /* Parallelization.  */
 
@@ -561,25 +698,35 @@ 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 */
-  0             			/* todo_flags_finish */
- }
-};
+class pass_parallelize_loops : public gimple_opt_pass
+{
+public:
+  pass_parallelize_loops(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "parloops",
+		      OPTGROUP_LOOP,
+		      TV_TREE_PARALLELIZE_LOOPS,
+		      pass_properties(required(PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_tree_parallelize_loops (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return tree_parallelize_loops (); }
+
+}; // class pass_parallelize_loops
+
+gimple_opt_pass *
+make_pass_parallelize_loops (context &ctxt)
+{
+  return new pass_parallelize_loops (ctxt);
+}
 
 /* Prefetching.  */
 
@@ -598,25 +745,35 @@ 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 */
- }
-};
+class pass_loop_prefetch : public gimple_opt_pass
+{
+public:
+  pass_loop_prefetch(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "aprefetch",
+		      OPTGROUP_LOOP,
+		      TV_TREE_PREFETCH,
+		      pass_properties(required(PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_tree_ssa_loop_prefetch (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return tree_ssa_loop_prefetch (); }
+
+}; // class pass_loop_prefetch
+
+gimple_opt_pass *
+make_pass_loop_prefetch (context &ctxt)
+{
+  return new pass_loop_prefetch (ctxt);
+}
 
 /* Induction variable optimizations.  */
 
@@ -636,25 +793,35 @@ 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 */
- }
-};
+class pass_iv_optimize : public gimple_opt_pass
+{
+public:
+  pass_iv_optimize(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "ivopts",
+		      OPTGROUP_LOOP,
+		      TV_TREE_LOOP_IVOPTS,
+		      pass_properties(required(PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_update_ssa)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_tree_ssa_loop_ivopts (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return tree_ssa_loop_ivopts (); }
+
+}; // class pass_iv_optimize
+
+gimple_opt_pass *
+make_pass_iv_optimize (context &ctxt)
+{
+  return new pass_iv_optimize (ctxt);
+}
 
 /* Loop optimizer finalization.  */
 
@@ -667,23 +834,32 @@ 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 */
- }
-};
+class pass_tree_loop_done : public gimple_opt_pass
+{
+public:
+  pass_tree_loop_done(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "loopdone",
+		      OPTGROUP_LOOP,
+		      TV_NONE,
+		      pass_properties(required(PROP_cfg),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_cleanup_cfg | TODO_verify_flow)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return tree_ssa_loop_done (); }
+
+}; // class pass_tree_loop_done
+
+gimple_opt_pass *
+make_pass_tree_loop_done (context &ctxt)
+{
+  return new pass_tree_loop_done (ctxt);
+}
diff --git a/gcc/tree-ssa-math-opts.c b/gcc/tree-ssa-math-opts.c
index e7e09f6..7d3c68f 100644
--- a/gcc/tree-ssa-math-opts.c
+++ b/gcc/tree-ssa-math-opts.c
@@ -636,26 +636,35 @@ execute_cse_reciprocals (void)
   return 0;
 }
 
-struct gimple_opt_pass pass_cse_reciprocals =
+class pass_cse_reciprocals : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_cse_reciprocals(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "recip",
+		      OPTGROUP_NONE,
+		      TV_NONE,
+		      pass_properties(required(PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_update_ssa | TODO_verify_ssa | TODO_verify_stmts)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_cse_reciprocals (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return execute_cse_reciprocals (); }
+
+}; // class pass_cse_reciprocals
+
+gimple_opt_pass *
+make_pass_cse_reciprocals (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
@@ -1506,26 +1515,35 @@ gate_cse_sincos (void)
   return optimize;
 }
 
-struct gimple_opt_pass pass_cse_sincos =
+class pass_cse_sincos : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_cse_sincos(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "sincos",
+		      OPTGROUP_NONE,
+		      TV_NONE,
+		      pass_properties(required(PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_update_ssa | TODO_verify_ssa | TODO_verify_stmts)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_cse_sincos (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return execute_cse_sincos (); }
+
+}; // class pass_cse_sincos
+
+gimple_opt_pass *
+make_pass_cse_sincos (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
@@ -1979,25 +1997,35 @@ gate_optimize_bswap (void)
   return flag_expensive_optimizations && optimize;
 }
 
-struct gimple_opt_pass pass_optimize_bswap =
+class pass_optimize_bswap : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_optimize_bswap(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "bswap",
+		      OPTGROUP_NONE,
+		      TV_NONE,
+		      pass_properties(required(PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_optimize_bswap (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return execute_optimize_bswap (); }
+
+}; // class pass_optimize_bswap
+
+gimple_opt_pass *
+make_pass_optimize_bswap (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.  */
@@ -2762,24 +2790,32 @@ gate_optimize_widening_mul (void)
   return flag_expensive_optimizations && optimize;
 }
 
-struct gimple_opt_pass pass_optimize_widening_mul =
+class pass_optimize_widening_mul : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_optimize_widening_mul(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "widening_mul",
+		      OPTGROUP_NONE,
+		      TV_NONE,
+		      pass_properties(required(PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_verify_ssa | TODO_verify_stmts | TODO_update_ssa)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_optimize_widening_mul (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return execute_optimize_widening_mul (); }
+
+}; // class pass_optimize_widening_mul
+
+gimple_opt_pass *
+make_pass_optimize_widening_mul (context &ctxt)
+{
+  return new pass_optimize_widening_mul (ctxt);
+}
diff --git a/gcc/tree-ssa-phiopt.c b/gcc/tree-ssa-phiopt.c
index 91df107..4da0024 100644
--- a/gcc/tree-ssa-phiopt.c
+++ b/gcc/tree-ssa-phiopt.c
@@ -1997,27 +1997,35 @@ gate_phiopt (void)
   return 1;
 }
 
-struct gimple_opt_pass pass_phiopt =
+class pass_phiopt : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_phiopt(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "phiopt",
+		      OPTGROUP_NONE,
+		      TV_TREE_PHIOPT,
+		      pass_properties(required(PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_verify_ssa | TODO_verify_flow | TODO_verify_stmts)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_phiopt (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return tree_ssa_phiopt (); }
+
+}; // class pass_phiopt
+
+gimple_opt_pass *
+make_pass_phiopt (context &ctxt)
+{
+  return new pass_phiopt (ctxt);
+}
 
 static bool
 gate_cselim (void)
@@ -2025,24 +2033,32 @@ gate_cselim (void)
   return flag_tree_cselim;
 }
 
-struct gimple_opt_pass pass_cselim =
+class pass_cselim : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_cselim(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "cselim",
+		      OPTGROUP_NONE,
+		      TV_TREE_PHIOPT,
+		      pass_properties(required(PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_verify_ssa | TODO_verify_flow | TODO_verify_stmts)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_cselim (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return tree_ssa_cs_elim (); }
+
+}; // class pass_cselim
+
+gimple_opt_pass *
+make_pass_cselim (context &ctxt)
+{
+  return new pass_cselim (ctxt);
+}
diff --git a/gcc/tree-ssa-phiprop.c b/gcc/tree-ssa-phiprop.c
index 6555ae3..b31f7d1 100644
--- a/gcc/tree-ssa-phiprop.c
+++ b/gcc/tree-ssa-phiprop.c
@@ -404,23 +404,32 @@ gate_phiprop (void)
   return flag_tree_phiprop;
 }
 
-struct gimple_opt_pass pass_phiprop =
+class pass_phiprop : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_phiprop(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "phiprop",
+		      OPTGROUP_NONE,
+		      TV_TREE_PHIPROP,
+		      pass_properties(required(PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_update_ssa | TODO_verify_ssa)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_phiprop (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return tree_ssa_phiprop (); }
+
+}; // class pass_phiprop
+
+gimple_opt_pass *
+make_pass_phiprop (context &ctxt)
+{
+  return new pass_phiprop (ctxt);
+}
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c
index 345ebcc..1ea8d60 100644
--- a/gcc/tree-ssa-pre.c
+++ b/gcc/tree-ssa-pre.c
@@ -4780,26 +4780,35 @@ gate_pre (void)
   return flag_tree_pre != 0;
 }
 
-struct gimple_opt_pass pass_pre =
+class pass_pre : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_pre(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "pre",
+		      OPTGROUP_NONE,
+		      TV_TREE_PRE,
+		      pass_properties(required(PROP_no_crit_edges | PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(TODO_rebuild_alias),
+				      finish(TODO_verify_ssa)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_pre (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return do_pre (); }
+
+}; // class pass_pre
+
+gimple_opt_pass *
+make_pass_pre (context &ctxt)
+{
+  return new pass_pre (ctxt);
+}
 
 
 /* Gate and execute functions for FRE.  */
@@ -4833,22 +4842,32 @@ gate_fre (void)
   return flag_tree_fre != 0;
 }
 
-struct gimple_opt_pass pass_fre =
+class pass_fre : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_fre(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "fre",
+		      OPTGROUP_NONE,
+		      TV_TREE_FRE,
+		      pass_properties(required(PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_verify_ssa)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_fre (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return execute_fre (); }
+
+}; // class pass_fre
+
+gimple_opt_pass *
+make_pass_fre (context &ctxt)
+{
+  return new pass_fre (ctxt);
+}
diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c
index 0089dc5..1201189 100644
--- a/gcc/tree-ssa-reassoc.c
+++ b/gcc/tree-ssa-reassoc.c
@@ -4276,24 +4276,32 @@ gate_tree_ssa_reassoc (void)
   return flag_tree_reassoc != 0;
 }
 
-struct gimple_opt_pass pass_reassoc =
+class pass_reassoc : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_reassoc(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "reassoc",
+		      OPTGROUP_NONE,
+		      TV_TREE_REASSOC,
+		      pass_properties(required(PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_verify_ssa | TODO_update_ssa_only_virtuals | TODO_verify_flow)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_tree_ssa_reassoc (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return execute_reassoc (); }
+
+}; // class pass_reassoc
+
+gimple_opt_pass *
+make_pass_reassoc (context &ctxt)
+{
+  return new pass_reassoc (ctxt);
+}
diff --git a/gcc/tree-ssa-sink.c b/gcc/tree-ssa-sink.c
index 0d9029b..1fd86c2 100644
--- a/gcc/tree-ssa-sink.c
+++ b/gcc/tree-ssa-sink.c
@@ -578,25 +578,32 @@ gate_sink (void)
   return flag_tree_sink != 0;
 }
 
-struct gimple_opt_pass pass_sink_code =
+class pass_sink_code : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_sink_code(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "sink",
+		      OPTGROUP_NONE,
+		      TV_TREE_SINK,
+		      pass_properties(required(PROP_no_crit_edges | PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_update_ssa | TODO_verify_ssa | TODO_verify_flow)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_sink (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return do_sink (); }
+
+}; // class pass_sink_code
+
+gimple_opt_pass *
+make_pass_sink_code (context &ctxt)
+{
+  return new pass_sink_code (ctxt);
+}
diff --git a/gcc/tree-ssa-strlen.c b/gcc/tree-ssa-strlen.c
index 9c724dc..93a96a2 100644
--- a/gcc/tree-ssa-strlen.c
+++ b/gcc/tree-ssa-strlen.c
@@ -2004,22 +2004,32 @@ gate_strlen (void)
   return flag_optimize_strlen != 0;
 }
 
-struct gimple_opt_pass pass_strlen =
+class pass_strlen : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_strlen(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "strlen",
+		      OPTGROUP_NONE,
+		      TV_TREE_STRLEN,
+		      pass_properties(required(PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_verify_ssa)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_strlen (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return tree_ssa_strlen (); }
+
+}; // class pass_strlen
+
+gimple_opt_pass *
+make_pass_strlen (context &ctxt)
+{
+  return new pass_strlen (ctxt);
+}
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index 37751a7..32f7361 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -6949,48 +6949,68 @@ 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 */
- }
-};
+class pass_build_alias : public gimple_opt_pass
+{
+public:
+  pass_build_alias(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "alias",
+		      OPTGROUP_NONE,
+		      TV_NONE,
+		      pass_properties(required(PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_rebuild_alias)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_tree_pta (); }
+
+  bool has_execute () { return false; }
+  unsigned int impl_execute () { return 0; }
+
+}; // class pass_build_alias
+
+gimple_opt_pass *
+make_pass_build_alias (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 */
- }
-};
+class pass_build_ealias : public gimple_opt_pass
+{
+public:
+  pass_build_ealias(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "ealias",
+		      OPTGROUP_NONE,
+		      TV_NONE,
+		      pass_properties(required(PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_rebuild_alias)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_tree_pta (); }
+
+  bool has_execute () { return false; }
+  unsigned int impl_execute () { return 0; }
+
+}; // class pass_build_ealias
+
+gimple_opt_pass *
+make_pass_build_ealias (context &ctxt)
+{
+  return new pass_build_ealias (ctxt);
+}
 
 
 /* Return true if we should execute IPA PTA.  */
@@ -7347,22 +7367,32 @@ 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 */
- }
-};
+class pass_ipa_pta : public simple_ipa_opt_pass
+{
+public:
+  pass_ipa_pta(context &ctxt)
+    : simple_ipa_opt_pass(ctxt,
+			  "pta",
+			  OPTGROUP_NONE,
+			  TV_IPA_PTA,
+			  pass_properties(required(0),
+					  provided(0),
+					  destroyed(0)),
+			  pass_todo_flags(start(0),
+					  finish(TODO_update_ssa)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_ipa_pta (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return ipa_pta_execute (); }
+
+}; // class pass_ipa_pta
+
+simple_ipa_opt_pass *
+make_pass_ipa_pta (context &ctxt)
+{
+  return new pass_ipa_pta (ctxt);
+}
diff --git a/gcc/tree-ssa-uncprop.c b/gcc/tree-ssa-uncprop.c
index c7eed9e..d9e5101 100644
--- a/gcc/tree-ssa-uncprop.c
+++ b/gcc/tree-ssa-uncprop.c
@@ -579,22 +579,32 @@ gate_uncprop (void)
   return flag_tree_dom != 0;
 }
 
-struct gimple_opt_pass pass_uncprop =
+class pass_uncprop : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_uncprop(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "uncprop",
+		      OPTGROUP_NONE,
+		      TV_TREE_SSA_UNCPROP,
+		      pass_properties(required(PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_verify_ssa)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_uncprop (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return tree_ssa_uncprop (); }
+
+}; // class pass_uncprop
+
+gimple_opt_pass *
+make_pass_uncprop (context &ctxt)
+{
+  return new pass_uncprop (ctxt);
+}
diff --git a/gcc/tree-ssa-uninit.c b/gcc/tree-ssa-uninit.c
index e8f3ff7..cadfc7f 100644
--- a/gcc/tree-ssa-uninit.c
+++ b/gcc/tree-ssa-uninit.c
@@ -2024,22 +2024,34 @@ gate_warn_uninitialized (void)
   return warn_uninitialized != 0;
 }
 
-struct gimple_opt_pass pass_late_warn_uninitialized =
+class pass_late_warn_uninitialized : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_late_warn_uninitialized(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "uninit",
+		      OPTGROUP_NONE,
+		      TV_NONE,
+		      pass_properties(required(PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_warn_uninitialized (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () {
+    return execute_late_warn_uninitialized ();
+  }
+
+}; // class pass_late_warn_uninitialized
+
+gimple_opt_pass *
+make_pass_late_warn_uninitialized (context &ctxt)
+{
+  return new pass_late_warn_uninitialized (ctxt);
+}
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c
index b0619fa..9f019f3 100644
--- a/gcc/tree-ssa.c
+++ b/gcc/tree-ssa.c
@@ -1124,25 +1124,35 @@ execute_init_datastructures (void)
   return 0;
 }
 
-struct gimple_opt_pass pass_init_datastructures =
+class pass_init_datastructures : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_init_datastructures(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "*init_datastructures",
+		      OPTGROUP_NONE,
+		      TV_NONE,
+		      pass_properties(required(PROP_cfg),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return execute_init_datastructures (); }
+
+}; // class pass_init_datastructures
+
+gimple_opt_pass *
+make_pass_init_datastructures (context &ctxt)
+{
+  return new pass_init_datastructures (ctxt);
+}
 
 /* Deallocate memory associated with SSA data structures for FNDECL.  */
 
@@ -1734,25 +1744,37 @@ gate_warn_uninitialized (void)
   return warn_uninitialized != 0;
 }
 
-struct gimple_opt_pass pass_early_warn_uninitialized =
+class pass_early_warn_uninitialized : public gimple_opt_pass
+{
+public:
+  pass_early_warn_uninitialized(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "*early_warn_uninitialized",
+		      OPTGROUP_NONE,
+		      TV_TREE_UNINIT,
+		      pass_properties(required(PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_warn_uninitialized (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () {
+    return execute_early_warn_uninitialized ();
+  }
+
+}; // class pass_early_warn_uninitialized
+
+gimple_opt_pass *
+make_pass_early_warn_uninitialized (context &ctxt)
 {
- {
-  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 */
- }
-};
+  return new pass_early_warn_uninitialized (ctxt);
+}
 
 
 /* If necessary, rewrite the base of the reference tree *TP from
@@ -2165,22 +2187,32 @@ execute_update_addresses_taken (void)
   timevar_pop (TV_ADDRESS_TAKEN);
 }
 
-struct gimple_opt_pass pass_update_address_taken =
+class pass_update_address_taken : public gimple_opt_pass
+{
+public:
+  pass_update_address_taken(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "addressables",
+		      OPTGROUP_NONE,
+		      TV_ADDRESS_TAKEN,
+		      pass_properties(required(PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_update_address_taken)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return false; }
+  unsigned int impl_execute () { return 0; }
+
+}; // class pass_update_address_taken
+
+gimple_opt_pass *
+make_pass_update_address_taken (context &ctxt)
 {
- {
-  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 */
- }
-};
+  return new pass_update_address_taken (ctxt);
+}
diff --git a/gcc/tree-ssanames.c b/gcc/tree-ssanames.c
index 0a405ce..c5227b1 100644
--- a/gcc/tree-ssanames.c
+++ b/gcc/tree-ssanames.c
@@ -440,22 +440,32 @@ release_dead_ssa_names (void)
   return 0;
 }
 
-struct gimple_opt_pass pass_release_ssa_names =
+class pass_release_ssa_names : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_release_ssa_names(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "release_ssa",
+		      OPTGROUP_NONE,
+		      TV_TREE_SSA_OTHER,
+		      pass_properties(required(PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(TODO_remove_unused_locals),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return release_dead_ssa_names (); }
+
+}; // class pass_release_ssa_names
+
+gimple_opt_pass *
+make_pass_release_ssa_names (context &ctxt)
+{
+  return new pass_release_ssa_names (ctxt);
+}
diff --git a/gcc/tree-stdarg.c b/gcc/tree-stdarg.c
index 8ad9fc2..94da9e3 100644
--- a/gcc/tree-stdarg.c
+++ b/gcc/tree-stdarg.c
@@ -985,22 +985,32 @@ finish:
 }
 
 
-struct gimple_opt_pass pass_stdarg =
+class pass_stdarg : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_stdarg(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "stdarg",
+		      OPTGROUP_NONE,
+		      TV_NONE,
+		      pass_properties(required(PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_optimize_stdarg (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return execute_optimize_stdarg (); }
+
+}; // class pass_stdarg
+
+gimple_opt_pass *
+make_pass_stdarg (context &ctxt)
+{
+  return new pass_stdarg (ctxt);
+}
diff --git a/gcc/tree-switch-conversion.c b/gcc/tree-switch-conversion.c
index 3fffdf7..4ed2c21 100644
--- a/gcc/tree-switch-conversion.c
+++ b/gcc/tree-switch-conversion.c
@@ -1460,25 +1460,32 @@ switchconv_gate (void)
   return flag_tree_switch_conversion != 0;
 }
 
-struct gimple_opt_pass pass_convert_switch =
+class pass_convert_switch : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_convert_switch(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "switchconv",
+		      OPTGROUP_NONE,
+		      TV_TREE_SWITCH_CONVERSION,
+		      pass_properties(required(PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_update_ssa | TODO_verify_ssa | TODO_verify_stmts | TODO_verify_flow)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return switchconv_gate (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return do_switchconv (); }
+
+}; // class pass_convert_switch
+
+gimple_opt_pass *
+make_pass_convert_switch (context &ctxt)
+{
+  return new pass_convert_switch (ctxt);
+}
diff --git a/gcc/tree-tailcall.c b/gcc/tree-tailcall.c
index c6581dc..40724a9 100644
--- a/gcc/tree-tailcall.c
+++ b/gcc/tree-tailcall.c
@@ -1048,42 +1048,62 @@ execute_tail_calls (void)
   return tree_optimize_tail_calls_1 (true);
 }
 
-struct gimple_opt_pass pass_tail_recursion =
+class pass_tail_recursion : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_tail_recursion(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "tailr",
+		      OPTGROUP_NONE,
+		      TV_NONE,
+		      pass_properties(required(PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_verify_ssa)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_tail_calls (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return execute_tail_recursion (); }
+
+}; // class pass_tail_recursion
+
+gimple_opt_pass *
+make_pass_tail_recursion (context &ctxt)
+{
+  return new pass_tail_recursion (ctxt);
+}
 
-struct gimple_opt_pass pass_tail_calls =
+class pass_tail_calls : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_tail_calls(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "tailc",
+		      OPTGROUP_NONE,
+		      TV_NONE,
+		      pass_properties(required(PROP_cfg | PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_verify_ssa)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_tail_calls (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return execute_tail_calls (); }
+
+}; // class pass_tail_calls
+
+gimple_opt_pass *
+make_pass_tail_calls (context &ctxt)
+{
+  return new pass_tail_calls (ctxt);
+}
diff --git a/gcc/tree-vect-generic.c b/gcc/tree-vect-generic.c
index dbad6d9..3f1d60a 100644
--- a/gcc/tree-vect-generic.c
+++ b/gcc/tree-vect-generic.c
@@ -1500,50 +1500,64 @@ expand_vector_operations (void)
   return cfg_changed ? TODO_cleanup_cfg : 0;
 }
 
-struct gimple_opt_pass pass_lower_vector =
+class pass_lower_vector : public gimple_opt_pass
 {
- {
-  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
- }
-};
-
-struct gimple_opt_pass pass_lower_vector_ssa =
+public:
+  pass_lower_vector(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "veclower",
+		      OPTGROUP_VEC,
+		      TV_NONE,
+		      pass_properties(required(PROP_cfg),
+				      provided(PROP_gimple_lvec),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_update_ssa | TODO_verify_ssa | TODO_verify_stmts | TODO_verify_flow | TODO_cleanup_cfg)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_expand_vector_operations_ssa (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return expand_vector_operations (); }
+
+}; // class pass_lower_vector
+
+gimple_opt_pass *
+make_pass_lower_vector (context &ctxt)
 {
- {
-  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
- }
-};
+  return new pass_lower_vector (ctxt);
+}
+
+class pass_lower_vector_ssa : public gimple_opt_pass
+{
+public:
+  pass_lower_vector_ssa(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "veclower2",
+		      OPTGROUP_VEC,
+		      TV_NONE,
+		      pass_properties(required(PROP_cfg),
+				      provided(PROP_gimple_lvec),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_update_ssa | TODO_verify_ssa | TODO_verify_stmts | TODO_verify_flow | TODO_cleanup_cfg)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return expand_vector_operations (); }
+
+}; // class pass_lower_vector_ssa
+
+gimple_opt_pass *
+make_pass_lower_vector_ssa (context &ctxt)
+{
+  return new pass_lower_vector_ssa (ctxt);
+}
 
 #include "gt-tree-vect-generic.h"
diff --git a/gcc/tree-vectorizer.c b/gcc/tree-vectorizer.c
index 0227d08..187aeff 100644
--- a/gcc/tree-vectorizer.c
+++ b/gcc/tree-vectorizer.c
@@ -197,28 +197,35 @@ gate_vect_slp (void)
           || flag_tree_slp_vectorize == 1);
 }
 
-struct gimple_opt_pass pass_slp_vectorize =
+class pass_slp_vectorize : public gimple_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_slp_vectorize(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "slp",
+		      OPTGROUP_LOOP | OPTGROUP_VEC,
+		      TV_TREE_SLP_VECTORIZATION,
+		      pass_properties(required(PROP_ssa | PROP_cfg),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_verify_ssa | TODO_update_ssa | TODO_verify_stmts)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_vect_slp (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return execute_vect_slp (); }
+
+}; // class pass_slp_vectorize
+
+gimple_opt_pass *
+make_pass_slp_vectorize (context &ctxt)
+{
+  return new pass_slp_vectorize (ctxt);
+}
 
 
 /* Increase alignment of global arrays to improve vectorization potential.
@@ -272,23 +279,32 @@ gate_increase_alignment (void)
 }
 
 
-struct simple_ipa_opt_pass pass_ipa_increase_alignment =
+class pass_ipa_increase_alignment : public simple_ipa_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_ipa_increase_alignment(context &ctxt)
+    : simple_ipa_opt_pass(ctxt,
+			  "increase_alignment",
+			  OPTGROUP_LOOP | OPTGROUP_VEC,
+			  TV_IPA_OPT,
+			  pass_properties(required(0),
+					  provided(0),
+					  destroyed(0)),
+			  pass_todo_flags(start(0),
+					  finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_increase_alignment (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return increase_alignment (); }
+
+}; // class pass_ipa_increase_alignment
+
+simple_ipa_opt_pass *
+make_pass_ipa_increase_alignment (context &ctxt)
+{
+  return new pass_ipa_increase_alignment (ctxt);
+}
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index 5b4321a..2f5a4fd 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -9395,25 +9395,32 @@ 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
-    | TODO_verify_ssa
-    | TODO_verify_flow			/* todo_flags_finish */
- }
-};
+class pass_vrp : public gimple_opt_pass
+{
+public:
+  pass_vrp(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "vrp",
+		      OPTGROUP_NONE,
+		      TV_TREE_VRP,
+		      pass_properties(required(PROP_ssa),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_cleanup_cfg | TODO_update_ssa | TODO_verify_ssa | TODO_verify_flow)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_vrp (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return execute_vrp (); }
+
+}; // class pass_vrp
+
+gimple_opt_pass *
+make_pass_vrp (context &ctxt)
+{
+  return new pass_vrp (ctxt);
+}
diff --git a/gcc/tree.c b/gcc/tree.c
index d8f2424..7821dd9 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -5308,25 +5308,35 @@ 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 */
- }
-};
+class pass_ipa_free_lang_data : public simple_ipa_opt_pass
+{
+public:
+  pass_ipa_free_lang_data(context &ctxt)
+    : simple_ipa_opt_pass(ctxt,
+			  "*free_lang_data",
+			  OPTGROUP_NONE,
+			  TV_IPA_FREE_LANG_DATA,
+			  pass_properties(required(0),
+					  provided(0),
+					  destroyed(0)),
+			  pass_todo_flags(start(0),
+					  finish(0)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return false; }
+  bool gate () { return true; }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return free_lang_data (); }
+
+}; // class pass_ipa_free_lang_data
+
+simple_ipa_opt_pass *
+make_pass_ipa_free_lang_data (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().  */
diff --git a/gcc/tsan.c b/gcc/tsan.c
index c02e100..4c09af8 100644
--- a/gcc/tsan.c
+++ b/gcc/tsan.c
@@ -730,25 +730,35 @@ tsan_finish_file (void)
 
 /* The pass descriptor.  */
 
-struct gimple_opt_pass pass_tsan =
+class pass_tsan : public gimple_opt_pass
 {
- {
-  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  */
- }
-};
+public:
+  pass_tsan(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "tsan",
+		      OPTGROUP_NONE,
+		      TV_NONE,
+		      pass_properties(required(PROP_ssa | PROP_cfg),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_verify_all | TODO_update_ssa)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return tsan_gate (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return tsan_pass (); }
+
+}; // class pass_tsan
+
+gimple_opt_pass *
+make_pass_tsan (context &ctxt)
+{
+  return new pass_tsan (ctxt);
+}
 
 static bool
 tsan_gate_O0 (void)
@@ -756,22 +766,32 @@ tsan_gate_O0 (void)
   return flag_tsan != 0 && !optimize;
 }
 
-struct gimple_opt_pass pass_tsan_O0 =
+class pass_tsan_O0 : public gimple_opt_pass
 {
- {
-  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  */
- }
-};
+public:
+  pass_tsan_O0(context &ctxt)
+    : gimple_opt_pass(ctxt,
+		      "tsan0",
+		      OPTGROUP_NONE,
+		      TV_NONE,
+		      pass_properties(required(PROP_ssa | PROP_cfg),
+				      provided(0),
+				      destroyed(0)),
+		      pass_todo_flags(start(0),
+				      finish(TODO_verify_all | TODO_update_ssa)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return tsan_gate_O0 (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return tsan_pass (); }
+
+}; // class pass_tsan_O0
+
+gimple_opt_pass *
+make_pass_tsan_O0 (context &ctxt)
+{
+  return new pass_tsan_O0 (ctxt);
+}
diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c
index 337af5a..a83587c 100644
--- a/gcc/var-tracking.c
+++ b/gcc/var-tracking.c
@@ -10222,23 +10222,32 @@ 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 */
- }
-};
+class pass_variable_tracking : public rtl_opt_pass
+{
+public:
+  pass_variable_tracking(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "vartrack",
+		   OPTGROUP_NONE,
+		   TV_VAR_TRACKING,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_verify_rtl_sharing | TODO_verify_flow)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_handle_var_tracking (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return variable_tracking_main (); }
+
+}; // class pass_variable_tracking
+
+rtl_opt_pass *
+make_pass_variable_tracking (context &ctxt)
+{
+  return new pass_variable_tracking (ctxt);
+}
diff --git a/gcc/web.c b/gcc/web.c
index d09d1d5..1d2b36d 100644
--- a/gcc/web.c
+++ b/gcc/web.c
@@ -439,22 +439,32 @@ web_main (void)
   return 0;
 }
 
-struct rtl_opt_pass pass_web =
+class pass_web : public rtl_opt_pass
 {
- {
-  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 */
- }
-};
+public:
+  pass_web(context &ctxt)
+    : rtl_opt_pass(ctxt,
+		   "web",
+		   OPTGROUP_NONE,
+		   TV_WEB,
+		   pass_properties(required(0),
+				   provided(0),
+				   destroyed(0)),
+		   pass_todo_flags(start(0),
+				   finish(TODO_df_finish | TODO_verify_rtl_sharing)))
+  {}
+
+  /* opt_pass methods: */
+  bool has_gate () { return true; }
+  bool gate () { return gate_handle_web (); }
+
+  bool has_execute () { return true; }
+  unsigned int impl_execute () { return web_main (); }
+
+}; // class pass_web
+
+rtl_opt_pass *
+make_pass_web (context &ctxt)
+{
+  return new pass_web (ctxt);
+}
-- 
1.7.11.7

