From 17795822b27b7b5381525b1d7c98ca181be9bc80 Mon Sep 17 00:00:00 2001 From: Trevor Saunders Date: Wed, 12 Aug 2015 20:09:33 +0000 Subject: [PATCH] Revert "replace several uses of the anon namespace with GCC_FINAL" This reverts commit daa5a8a3cf9b04cd9af5544c61e12e6dca14f870. From-SVN: r226834 --- gcc/ChangeLog | 13 +++++++ gcc/compare-elim.c | 8 +++-- gcc/dce.c | 16 ++++++--- gcc/dse.c | 16 ++++++--- gcc/gimple-ssa-isolate-paths.c | 6 ++-- gcc/gimple-ssa-strength-reduction.c | 8 +++-- gcc/graphite.c | 16 ++++++--- gcc/init-regs.c | 8 +++-- gcc/ipa-pure-const.c | 32 ++++++++++++----- gcc/ipa-visibility.c | 14 ++++++-- gcc/ipa.c | 24 +++++++++---- gcc/mode-switching.c | 8 +++-- gcc/omp-low.c | 40 +++++++++++++++------ gcc/reorg.c | 16 ++++++--- gcc/sanopt.c | 8 +++-- gcc/trans-mem.c | 56 +++++++++++++++++++++-------- gcc/tree-eh.c | 40 +++++++++++++++------ gcc/tree-if-conv.c | 8 +++-- gcc/tree-ssa-copyrename.c | 8 +++-- gcc/tree-ssa-dce.c | 16 ++++++--- gcc/tree-ssa-dom.c | 8 +++-- gcc/tree-ssa-dse.c | 8 +++-- gcc/tree-ssa-forwprop.c | 8 +++-- gcc/tree-ssa-sink.c | 8 +++-- gcc/tree-ssanames.c | 8 +++-- gcc/tree-stdarg.c | 16 ++++++--- gcc/tree-tailcall.c | 16 ++++++--- gcc/tree-vect-generic.c | 16 ++++++--- gcc/tree.c | 8 +++-- gcc/ubsan.c | 8 +++-- gcc/var-tracking.c | 8 +++-- gcc/vtable-verify.c | 8 +++-- gcc/web.c | 8 +++-- 33 files changed, 370 insertions(+), 119 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e8e7ab1bf10..e968d2d6726 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,16 @@ +2015-08-11 Trevor Saunders + + revert: + * compare-elim.c, dce.c, dse.c, gimple-ssa-isolate-paths.c, + gimple-ssa-strength-reduction.c, graphite.c, init-regs.c, + ipa-pure-const.c, ipa-visibility.c, ipa.c, mode-switching.c, + omp-low.c, reorg.c, sanopt.c, trans-mem.c, tree-eh.c, + tree-if-conv.c, tree-ssa-copyrename.c, tree-ssa-dce.c, + tree-ssa-dom.c, tree-ssa-dse.c, tree-ssa-forwprop.c, + tree-ssa-sink.c, tree-ssanames.c, tree-stdarg.c, tree-tailcall.c, + tree-vect-generic.c, tree.c, ubsan.c, var-tracking.c, + vtable-verify.c, web.c: Use GCC_FINAL instead of the anonymous + 2015-08-12 Max Filippov * config/xtensa/constraints.md (define_constraint "Y"): New diff --git a/gcc/compare-elim.c b/gcc/compare-elim.c index ea94c4e2036..b65d09e7938 100644 --- a/gcc/compare-elim.c +++ b/gcc/compare-elim.c @@ -668,7 +668,9 @@ execute_compare_elim_after_reload (void) return 0; } -static const pass_data pass_data_compare_elim_after_reload = +namespace { + +const pass_data pass_data_compare_elim_after_reload = { RTL_PASS, /* type */ "cmpelim", /* name */ @@ -681,7 +683,7 @@ static const pass_data pass_data_compare_elim_after_reload = ( TODO_df_finish | TODO_df_verify ), /* todo_flags_finish */ }; -class pass_compare_elim_after_reload GCC_FINAL : public rtl_opt_pass +class pass_compare_elim_after_reload : public rtl_opt_pass { public: pass_compare_elim_after_reload (gcc::context *ctxt) @@ -704,6 +706,8 @@ public: }; // class pass_compare_elim_after_reload +} // anon namespace + rtl_opt_pass * make_pass_compare_elim_after_reload (gcc::context *ctxt) { diff --git a/gcc/dce.c b/gcc/dce.c index 1b23eb79ade..c9cffc97055 100644 --- a/gcc/dce.c +++ b/gcc/dce.c @@ -784,7 +784,9 @@ rest_of_handle_ud_dce (void) } -static const pass_data pass_data_ud_rtl_dce = +namespace { + +const pass_data pass_data_ud_rtl_dce = { RTL_PASS, /* type */ "ud_dce", /* name */ @@ -797,7 +799,7 @@ static const pass_data pass_data_ud_rtl_dce = TODO_df_finish, /* todo_flags_finish */ }; -class pass_ud_rtl_dce GCC_FINAL : public rtl_opt_pass +class pass_ud_rtl_dce : public rtl_opt_pass { public: pass_ud_rtl_dce (gcc::context *ctxt) @@ -817,6 +819,8 @@ public: }; // class pass_ud_rtl_dce +} // anon namespace + rtl_opt_pass * make_pass_ud_rtl_dce (gcc::context *ctxt) { @@ -1211,7 +1215,9 @@ run_fast_dce (void) } -static const pass_data pass_data_fast_rtl_dce = +namespace { + +const pass_data pass_data_fast_rtl_dce = { RTL_PASS, /* type */ "rtl_dce", /* name */ @@ -1224,7 +1230,7 @@ static const pass_data pass_data_fast_rtl_dce = TODO_df_finish, /* todo_flags_finish */ }; -class pass_fast_rtl_dce GCC_FINAL : public rtl_opt_pass +class pass_fast_rtl_dce : public rtl_opt_pass { public: pass_fast_rtl_dce (gcc::context *ctxt) @@ -1244,6 +1250,8 @@ public: }; // class pass_fast_rtl_dce +} // anon namespace + rtl_opt_pass * make_pass_fast_rtl_dce (gcc::context *ctxt) { diff --git a/gcc/dse.c b/gcc/dse.c index 6a0cc07b61e..ff26fc0cb05 100644 --- a/gcc/dse.c +++ b/gcc/dse.c @@ -3725,7 +3725,9 @@ rest_of_handle_dse (void) return 0; } -static const pass_data pass_data_rtl_dse1 = +namespace { + +const pass_data pass_data_rtl_dse1 = { RTL_PASS, /* type */ "dse1", /* name */ @@ -3738,7 +3740,7 @@ static const pass_data pass_data_rtl_dse1 = TODO_df_finish, /* todo_flags_finish */ }; -class pass_rtl_dse1 GCC_FINAL : public rtl_opt_pass +class pass_rtl_dse1 : public rtl_opt_pass { public: pass_rtl_dse1 (gcc::context *ctxt) @@ -3755,13 +3757,17 @@ public: }; // class pass_rtl_dse1 +} // anon namespace + rtl_opt_pass * make_pass_rtl_dse1 (gcc::context *ctxt) { return new pass_rtl_dse1 (ctxt); } -static const pass_data pass_data_rtl_dse2 = +namespace { + +const pass_data pass_data_rtl_dse2 = { RTL_PASS, /* type */ "dse2", /* name */ @@ -3774,7 +3780,7 @@ static const pass_data pass_data_rtl_dse2 = TODO_df_finish, /* todo_flags_finish */ }; -class pass_rtl_dse2 GCC_FINAL : public rtl_opt_pass +class pass_rtl_dse2 : public rtl_opt_pass { public: pass_rtl_dse2 (gcc::context *ctxt) @@ -3791,6 +3797,8 @@ public: }; // class pass_rtl_dse2 +} // anon namespace + rtl_opt_pass * make_pass_rtl_dse2 (gcc::context *ctxt) { diff --git a/gcc/gimple-ssa-isolate-paths.c b/gcc/gimple-ssa-isolate-paths.c index d68eaff5f7d..6f84f85856b 100644 --- a/gcc/gimple-ssa-isolate-paths.c +++ b/gcc/gimple-ssa-isolate-paths.c @@ -540,7 +540,8 @@ gimple_ssa_isolate_erroneous_paths (void) return 0; } -static const pass_data pass_data_isolate_erroneous_paths = +namespace { +const pass_data pass_data_isolate_erroneous_paths = { GIMPLE_PASS, /* type */ "isolate-paths", /* name */ @@ -553,7 +554,7 @@ static const pass_data pass_data_isolate_erroneous_paths = 0, /* todo_flags_finish */ }; -class pass_isolate_erroneous_paths GCC_FINAL : public gimple_opt_pass +class pass_isolate_erroneous_paths : public gimple_opt_pass { public: pass_isolate_erroneous_paths (gcc::context *ctxt) @@ -577,6 +578,7 @@ public: } }; // class pass_isolate_erroneous_paths +} gimple_opt_pass * make_pass_isolate_erroneous_paths (gcc::context *ctxt) diff --git a/gcc/gimple-ssa-strength-reduction.c b/gcc/gimple-ssa-strength-reduction.c index f192f545164..b369ef5ed89 100644 --- a/gcc/gimple-ssa-strength-reduction.c +++ b/gcc/gimple-ssa-strength-reduction.c @@ -3584,7 +3584,9 @@ analyze_candidates_and_replace (void) } } -static const pass_data pass_data_strength_reduction = +namespace { + +const pass_data pass_data_strength_reduction = { GIMPLE_PASS, /* type */ "slsr", /* name */ @@ -3597,7 +3599,7 @@ static const pass_data pass_data_strength_reduction = 0, /* todo_flags_finish */ }; -class pass_strength_reduction GCC_FINAL : public gimple_opt_pass +class pass_strength_reduction : public gimple_opt_pass { public: pass_strength_reduction (gcc::context *ctxt) @@ -3663,6 +3665,8 @@ pass_strength_reduction::execute (function *fun) return 0; } +} // anon namespace + gimple_opt_pass * make_pass_strength_reduction (gcc::context *ctxt) { diff --git a/gcc/graphite.c b/gcc/graphite.c index ca1b9b64b77..9b9ab887287 100644 --- a/gcc/graphite.c +++ b/gcc/graphite.c @@ -338,7 +338,9 @@ gate_graphite_transforms (void) return flag_graphite != 0; } -static const pass_data pass_data_graphite = +namespace { + +const pass_data pass_data_graphite = { GIMPLE_PASS, /* type */ "graphite0", /* name */ @@ -351,7 +353,7 @@ static const pass_data pass_data_graphite = 0, /* todo_flags_finish */ }; -class pass_graphite GCC_FINAL : public gimple_opt_pass +class pass_graphite : public gimple_opt_pass { public: pass_graphite (gcc::context *ctxt) @@ -363,13 +365,17 @@ public: }; // class pass_graphite +} // anon namespace + gimple_opt_pass * make_pass_graphite (gcc::context *ctxt) { return new pass_graphite (ctxt); } -static const pass_data pass_data_graphite_transforms = +namespace { + +const pass_data pass_data_graphite_transforms = { GIMPLE_PASS, /* type */ "graphite", /* name */ @@ -382,7 +388,7 @@ static const pass_data pass_data_graphite_transforms = 0, /* todo_flags_finish */ }; -class pass_graphite_transforms GCC_FINAL : public gimple_opt_pass +class pass_graphite_transforms : public gimple_opt_pass { public: pass_graphite_transforms (gcc::context *ctxt) @@ -395,6 +401,8 @@ public: }; // class pass_graphite_transforms +} // anon namespace + gimple_opt_pass * make_pass_graphite_transforms (gcc::context *ctxt) { diff --git a/gcc/init-regs.c b/gcc/init-regs.c index 42f1b28603d..68fb7fe5d05 100644 --- a/gcc/init-regs.c +++ b/gcc/init-regs.c @@ -137,7 +137,9 @@ initialize_uninitialized_regs (void) BITMAP_FREE (already_genned); } -static const pass_data pass_data_initialize_regs = +namespace { + +const pass_data pass_data_initialize_regs = { RTL_PASS, /* type */ "init-regs", /* name */ @@ -150,7 +152,7 @@ static const pass_data pass_data_initialize_regs = TODO_df_finish, /* todo_flags_finish */ }; -class pass_initialize_regs GCC_FINAL : public rtl_opt_pass +class pass_initialize_regs : public rtl_opt_pass { public: pass_initialize_regs (gcc::context *ctxt) @@ -167,6 +169,8 @@ public: }; // class pass_initialize_regs +} // anon namespace + rtl_opt_pass * make_pass_initialize_regs (gcc::context *ctxt) { diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c index f9d5ef94932..8fd8c365bb4 100644 --- a/gcc/ipa-pure-const.c +++ b/gcc/ipa-pure-const.c @@ -120,7 +120,9 @@ static vec funct_state_vec; static bool gate_pure_const (void); -static const pass_data pass_data_ipa_pure_const = +namespace { + +const pass_data pass_data_ipa_pure_const = { IPA_PASS, /* type */ "pure-const", /* name */ @@ -133,7 +135,7 @@ static const pass_data pass_data_ipa_pure_const = 0, /* todo_flags_finish */ }; -class pass_ipa_pure_const GCC_FINAL : public ipa_opt_pass_d +class pass_ipa_pure_const : public ipa_opt_pass_d { public: pass_ipa_pure_const(gcc::context *ctxt); @@ -154,6 +156,8 @@ private: }; // class pass_ipa_pure_const +} // anon namespace + /* Try to guess if function body will always be visible to compiler when compiling the call and whether compiler will be able to propagate the information by itself. */ @@ -1665,7 +1669,9 @@ skip_function_for_local_pure_const (struct cgraph_node *node) ipa_pure_const. This pass is effective when executed together with other optimization passes in early optimization pass queue. */ -static const pass_data pass_data_local_pure_const = +namespace { + +const pass_data pass_data_local_pure_const = { GIMPLE_PASS, /* type */ "local-pure-const", /* name */ @@ -1678,7 +1684,7 @@ static const pass_data pass_data_local_pure_const = 0, /* todo_flags_finish */ }; -class pass_local_pure_const GCC_FINAL : public gimple_opt_pass +class pass_local_pure_const : public gimple_opt_pass { public: pass_local_pure_const (gcc::context *ctxt) @@ -1802,6 +1808,8 @@ pass_local_pure_const::execute (function *fun) return 0; } +} // anon namespace + gimple_opt_pass * make_pass_local_pure_const (gcc::context *ctxt) { @@ -1810,7 +1818,9 @@ make_pass_local_pure_const (gcc::context *ctxt) /* Emit noreturn warnings. */ -static const pass_data pass_data_warn_function_noreturn = +namespace { + +const pass_data pass_data_warn_function_noreturn = { GIMPLE_PASS, /* type */ "*warn_function_noreturn", /* name */ @@ -1823,7 +1833,7 @@ static const pass_data pass_data_warn_function_noreturn = 0, /* todo_flags_finish */ }; -class pass_warn_function_noreturn GCC_FINAL : public gimple_opt_pass +class pass_warn_function_noreturn : public gimple_opt_pass { public: pass_warn_function_noreturn (gcc::context *ctxt) @@ -1842,6 +1852,8 @@ public: }; // class pass_warn_function_noreturn +} // anon namespace + gimple_opt_pass * make_pass_warn_function_noreturn (gcc::context *ctxt) { @@ -1852,7 +1864,9 @@ make_pass_warn_function_noreturn (gcc::context *ctxt) ipa_pure_const. This pass is effective when executed together with other optimization passes in early optimization pass queue. */ -static const pass_data pass_data_nothrow = +namespace { + +const pass_data pass_data_nothrow = { GIMPLE_PASS, /* type */ "nothrow", /* name */ @@ -1865,7 +1879,7 @@ static const pass_data pass_data_nothrow = 0, /* todo_flags_finish */ }; -class pass_nothrow GCC_FINAL : public gimple_opt_pass +class pass_nothrow : public gimple_opt_pass { public: pass_nothrow (gcc::context *ctxt) @@ -1931,6 +1945,8 @@ pass_nothrow::execute (function *) return 0; } +} // anon namespace + gimple_opt_pass * make_pass_nothrow (gcc::context *ctxt) { diff --git a/gcc/ipa-visibility.c b/gcc/ipa-visibility.c index 00a157ab567..93073d80d10 100644 --- a/gcc/ipa-visibility.c +++ b/gcc/ipa-visibility.c @@ -728,7 +728,9 @@ function_and_variable_visibility (bool whole_program) /* Local function pass handling visibilities. This happens before LTO streaming so in particular -fwhole-program should be ignored at this level. */ -static const pass_data pass_data_ipa_function_and_variable_visibility = +namespace { + +const pass_data pass_data_ipa_function_and_variable_visibility = { SIMPLE_IPA_PASS, /* type */ "visibility", /* name */ @@ -752,7 +754,11 @@ whole_program_function_and_variable_visibility (void) return 0; } -static const pass_data pass_data_ipa_whole_program_visibility = +} // anon namespace + +namespace { + +const pass_data pass_data_ipa_whole_program_visibility = { IPA_PASS, /* type */ "whole-program", /* name */ @@ -765,7 +771,7 @@ static const pass_data pass_data_ipa_whole_program_visibility = ( TODO_remove_functions | TODO_dump_symtab ), /* todo_flags_finish */ }; -class pass_ipa_whole_program_visibility GCC_FINAL : public ipa_opt_pass_d +class pass_ipa_whole_program_visibility : public ipa_opt_pass_d { public: pass_ipa_whole_program_visibility (gcc::context *ctxt) @@ -795,6 +801,8 @@ public: }; // class pass_ipa_whole_program_visibility +} // anon namespace + ipa_opt_pass_d * make_pass_ipa_whole_program_visibility (gcc::context *ctxt) { diff --git a/gcc/ipa.c b/gcc/ipa.c index 0fa93c36419..75e367f0115 100644 --- a/gcc/ipa.c +++ b/gcc/ipa.c @@ -832,7 +832,9 @@ ipa_discover_readonly_nonaddressable_vars (void) /* Free inline summary. */ -static const pass_data pass_data_ipa_free_inline_summary = +namespace { + +const pass_data pass_data_ipa_free_inline_summary = { SIMPLE_IPA_PASS, /* type */ "free-inline-summary", /* name */ @@ -848,7 +850,7 @@ static const pass_data pass_data_ipa_free_inline_summary = ( TODO_remove_functions | TODO_dump_symtab ), /* todo_flags_finish */ }; -class pass_ipa_free_inline_summary GCC_FINAL : public simple_ipa_opt_pass +class pass_ipa_free_inline_summary : public simple_ipa_opt_pass { public: pass_ipa_free_inline_summary (gcc::context *ctxt) @@ -864,6 +866,8 @@ public: }; // class pass_ipa_free_inline_summary +} // anon namespace + simple_ipa_opt_pass * make_pass_ipa_free_inline_summary (gcc::context *ctxt) { @@ -1160,7 +1164,9 @@ ipa_cdtor_merge (void) return 0; } -static const pass_data pass_data_ipa_cdtor_merge = +namespace { + +const pass_data pass_data_ipa_cdtor_merge = { IPA_PASS, /* type */ "cdtor", /* name */ @@ -1173,7 +1179,7 @@ static const pass_data pass_data_ipa_cdtor_merge = 0, /* todo_flags_finish */ }; -class pass_ipa_cdtor_merge GCC_FINAL : public ipa_opt_pass_d +class pass_ipa_cdtor_merge : public ipa_opt_pass_d { public: pass_ipa_cdtor_merge (gcc::context *ctxt) @@ -1204,6 +1210,8 @@ pass_ipa_cdtor_merge::gate (function *) return !targetm.have_ctors_dtors || (optimize && in_lto_p); } +} // anon namespace + ipa_opt_pass_d * make_pass_ipa_cdtor_merge (gcc::context *ctxt) { @@ -1380,7 +1388,9 @@ ipa_single_use (void) return 0; } -static const pass_data pass_data_ipa_single_use = +namespace { + +const pass_data pass_data_ipa_single_use = { IPA_PASS, /* type */ "single-use", /* name */ @@ -1393,7 +1403,7 @@ static const pass_data pass_data_ipa_single_use = 0, /* todo_flags_finish */ }; -class pass_ipa_single_use GCC_FINAL : public ipa_opt_pass_d +class pass_ipa_single_use : public ipa_opt_pass_d { public: pass_ipa_single_use (gcc::context *ctxt) @@ -1421,6 +1431,8 @@ pass_ipa_single_use::gate (function *) return optimize; } +} // anon namespace + ipa_opt_pass_d * make_pass_ipa_single_use (gcc::context *ctxt) { diff --git a/gcc/mode-switching.c b/gcc/mode-switching.c index cd44f0bb33b..4529bc29fa2 100644 --- a/gcc/mode-switching.c +++ b/gcc/mode-switching.c @@ -854,7 +854,9 @@ optimize_mode_switching (void) #endif /* OPTIMIZE_MODE_SWITCHING */ -static const pass_data pass_data_mode_switching = +namespace { + +const pass_data pass_data_mode_switching = { RTL_PASS, /* type */ "mode_sw", /* name */ @@ -867,7 +869,7 @@ static const pass_data pass_data_mode_switching = TODO_df_finish, /* todo_flags_finish */ }; -class pass_mode_switching GCC_FINAL : public rtl_opt_pass +class pass_mode_switching : public rtl_opt_pass { public: pass_mode_switching (gcc::context *ctxt) @@ -897,6 +899,8 @@ public: }; // class pass_mode_switching +} // anon namespace + rtl_opt_pass * make_pass_mode_switching (gcc::context *ctxt) { diff --git a/gcc/omp-low.c b/gcc/omp-low.c index 57d585ad914..c1dc9191c42 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -9529,7 +9529,9 @@ execute_expand_omp (void) /* OMP expansion -- the default pass, run before creation of SSA form. */ -static const pass_data pass_data_expand_omp = +namespace { + +const pass_data pass_data_expand_omp = { GIMPLE_PASS, /* type */ "ompexp", /* name */ @@ -9542,7 +9544,7 @@ static const pass_data pass_data_expand_omp = 0, /* todo_flags_finish */ }; -class pass_expand_omp GCC_FINAL : public gimple_opt_pass +class pass_expand_omp : public gimple_opt_pass { public: pass_expand_omp (gcc::context *ctxt) @@ -9566,13 +9568,17 @@ public: }; // class pass_expand_omp +} // anon namespace + gimple_opt_pass * make_pass_expand_omp (gcc::context *ctxt) { return new pass_expand_omp (ctxt); } -static const pass_data pass_data_expand_omp_ssa = +namespace { + +const pass_data pass_data_expand_omp_ssa = { GIMPLE_PASS, /* type */ "ompexpssa", /* name */ @@ -9585,7 +9591,7 @@ static const pass_data pass_data_expand_omp_ssa = TODO_cleanup_cfg | TODO_rebuild_alias, /* todo_flags_finish */ }; -class pass_expand_omp_ssa GCC_FINAL : public gimple_opt_pass +class pass_expand_omp_ssa : public gimple_opt_pass { public: pass_expand_omp_ssa (gcc::context *ctxt) @@ -9601,6 +9607,8 @@ public: }; // class pass_expand_omp_ssa +} // anon namespace + gimple_opt_pass * make_pass_expand_omp_ssa (gcc::context *ctxt) { @@ -11944,7 +11952,9 @@ execute_lower_omp (void) return 0; } -static const pass_data pass_data_lower_omp = +namespace { + +const pass_data pass_data_lower_omp = { GIMPLE_PASS, /* type */ "omplower", /* name */ @@ -11957,7 +11967,7 @@ static const pass_data pass_data_lower_omp = 0, /* todo_flags_finish */ }; -class pass_lower_omp GCC_FINAL : public gimple_opt_pass +class pass_lower_omp : public gimple_opt_pass { public: pass_lower_omp (gcc::context *ctxt) @@ -11969,6 +11979,8 @@ public: }; // class pass_lower_omp +} // anon namespace + gimple_opt_pass * make_pass_lower_omp (gcc::context *ctxt) { @@ -12398,7 +12410,9 @@ diagnose_omp_structured_block_errors (void) return 0; } -static const pass_data pass_data_diagnose_omp_blocks = +namespace { + +const pass_data pass_data_diagnose_omp_blocks = { GIMPLE_PASS, /* type */ "*diagnose_omp_blocks", /* name */ @@ -12411,7 +12425,7 @@ static const pass_data pass_data_diagnose_omp_blocks = 0, /* todo_flags_finish */ }; -class pass_diagnose_omp_blocks GCC_FINAL : public gimple_opt_pass +class pass_diagnose_omp_blocks : public gimple_opt_pass { public: pass_diagnose_omp_blocks (gcc::context *ctxt) @@ -12430,6 +12444,8 @@ public: }; // class pass_diagnose_omp_blocks +} // anon namespace + gimple_opt_pass * make_pass_diagnose_omp_blocks (gcc::context *ctxt) { @@ -13691,7 +13707,9 @@ ipa_omp_simd_clone (void) return 0; } -static const pass_data pass_data_omp_simd_clone = +namespace { + +const pass_data pass_data_omp_simd_clone = { SIMPLE_IPA_PASS, /* type */ "simdclone", /* name */ @@ -13704,7 +13722,7 @@ static const pass_data pass_data_omp_simd_clone = 0, /* todo_flags_finish */ }; -class pass_omp_simd_clone GCC_FINAL : public simple_ipa_opt_pass +class pass_omp_simd_clone : public simple_ipa_opt_pass { public: pass_omp_simd_clone(gcc::context *ctxt) @@ -13725,6 +13743,8 @@ pass_omp_simd_clone::gate (function *) && (targetm.simd_clone.compute_vecsize_and_simdlen != NULL)); } +} // anon namespace + simple_ipa_opt_pass * make_pass_omp_simd_clone (gcc::context *ctxt) { diff --git a/gcc/reorg.c b/gcc/reorg.c index 8b9c9d7d5ca..1c60e13167e 100644 --- a/gcc/reorg.c +++ b/gcc/reorg.c @@ -3940,7 +3940,9 @@ rest_of_handle_delay_slots (void) return 0; } -static const pass_data pass_data_delay_slots = +namespace { + +const pass_data pass_data_delay_slots = { RTL_PASS, /* type */ "dbr", /* name */ @@ -3953,7 +3955,7 @@ static const pass_data pass_data_delay_slots = 0, /* todo_flags_finish */ }; -class pass_delay_slots GCC_FINAL : public rtl_opt_pass +class pass_delay_slots : public rtl_opt_pass { public: pass_delay_slots (gcc::context *ctxt) @@ -3980,6 +3982,8 @@ pass_delay_slots::gate (function *) #endif } +} // anon namespace + rtl_opt_pass * make_pass_delay_slots (gcc::context *ctxt) { @@ -3988,7 +3992,9 @@ make_pass_delay_slots (gcc::context *ctxt) /* Machine dependent reorg pass. */ -static const pass_data pass_data_machine_reorg = +namespace { + +const pass_data pass_data_machine_reorg = { RTL_PASS, /* type */ "mach", /* name */ @@ -4001,7 +4007,7 @@ static const pass_data pass_data_machine_reorg = 0, /* todo_flags_finish */ }; -class pass_machine_reorg GCC_FINAL : public rtl_opt_pass +class pass_machine_reorg : public rtl_opt_pass { public: pass_machine_reorg (gcc::context *ctxt) @@ -4022,6 +4028,8 @@ public: }; // class pass_machine_reorg +} // anon namespace + rtl_opt_pass * make_pass_machine_reorg (gcc::context *ctxt) { diff --git a/gcc/sanopt.c b/gcc/sanopt.c index dcb3659b0a6..269c11d31a7 100644 --- a/gcc/sanopt.c +++ b/gcc/sanopt.c @@ -621,7 +621,9 @@ sanopt_optimize (function *fun) /* Perform optimization of sanitize functions. */ -static const pass_data pass_data_sanopt = +namespace { + +const pass_data pass_data_sanopt = { GIMPLE_PASS, /* type */ "sanopt", /* name */ @@ -634,7 +636,7 @@ static const pass_data pass_data_sanopt = TODO_update_ssa, /* todo_flags_finish */ }; -class pass_sanopt GCC_FINAL : public gimple_opt_pass +class pass_sanopt : public gimple_opt_pass { public: pass_sanopt (gcc::context *ctxt) @@ -743,6 +745,8 @@ pass_sanopt::execute (function *fun) return 0; } +} // anon namespace + gimple_opt_pass * make_pass_sanopt (gcc::context *ctxt) { diff --git a/gcc/trans-mem.c b/gcc/trans-mem.c index bf7241aa9f9..891e6388cc4 100644 --- a/gcc/trans-mem.c +++ b/gcc/trans-mem.c @@ -845,7 +845,9 @@ diagnose_tm_blocks (void) return 0; } -static const pass_data pass_data_diagnose_tm_blocks = +namespace { + +const pass_data pass_data_diagnose_tm_blocks = { GIMPLE_PASS, /* type */ "*diagnose_tm_blocks", /* name */ @@ -858,7 +860,7 @@ static const pass_data pass_data_diagnose_tm_blocks = 0, /* todo_flags_finish */ }; -class pass_diagnose_tm_blocks GCC_FINAL : public gimple_opt_pass +class pass_diagnose_tm_blocks : public gimple_opt_pass { public: pass_diagnose_tm_blocks (gcc::context *ctxt) @@ -871,6 +873,8 @@ public: }; // class pass_diagnose_tm_blocks +} // anon namespace + gimple_opt_pass * make_pass_diagnose_tm_blocks (gcc::context *ctxt) { @@ -1761,7 +1765,9 @@ execute_lower_tm (void) return 0; } -static const pass_data pass_data_lower_tm = +namespace { + +const pass_data pass_data_lower_tm = { GIMPLE_PASS, /* type */ "tmlower", /* name */ @@ -1774,7 +1780,7 @@ static const pass_data pass_data_lower_tm = 0, /* todo_flags_finish */ }; -class pass_lower_tm GCC_FINAL : public gimple_opt_pass +class pass_lower_tm : public gimple_opt_pass { public: pass_lower_tm (gcc::context *ctxt) @@ -1787,6 +1793,8 @@ public: }; // class pass_lower_tm +} // anon namespace + gimple_opt_pass * make_pass_lower_tm (gcc::context *ctxt) { @@ -2052,7 +2060,9 @@ gate_tm_init (void) return true; } -static const pass_data pass_data_tm_init = +namespace { + +const pass_data pass_data_tm_init = { GIMPLE_PASS, /* type */ "*tminit", /* name */ @@ -2065,7 +2075,7 @@ static const pass_data pass_data_tm_init = 0, /* todo_flags_finish */ }; -class pass_tm_init GCC_FINAL : public gimple_opt_pass +class pass_tm_init : public gimple_opt_pass { public: pass_tm_init (gcc::context *ctxt) @@ -2077,6 +2087,8 @@ public: }; // class pass_tm_init +} // anon namespace + gimple_opt_pass * make_pass_tm_init (gcc::context *ctxt) { @@ -3018,7 +3030,9 @@ execute_tm_mark (void) return 0; } -static const pass_data pass_data_tm_mark = +namespace { + +const pass_data pass_data_tm_mark = { GIMPLE_PASS, /* type */ "tmmark", /* name */ @@ -3031,7 +3045,7 @@ static const pass_data pass_data_tm_mark = TODO_update_ssa, /* todo_flags_finish */ }; -class pass_tm_mark GCC_FINAL : public gimple_opt_pass +class pass_tm_mark : public gimple_opt_pass { public: pass_tm_mark (gcc::context *ctxt) @@ -3043,6 +3057,8 @@ public: }; // class pass_tm_mark +} // anon namespace + gimple_opt_pass * make_pass_tm_mark (gcc::context *ctxt) { @@ -3175,7 +3191,9 @@ expand_block_edges (struct tm_region *const region, basic_block bb) /* Entry point to the final expansion of transactional nodes. */ -static const pass_data pass_data_tm_edges = +namespace { + +const pass_data pass_data_tm_edges = { GIMPLE_PASS, /* type */ "tmedge", /* name */ @@ -3188,7 +3206,7 @@ static const pass_data pass_data_tm_edges = TODO_update_ssa, /* todo_flags_finish */ }; -class pass_tm_edges GCC_FINAL : public gimple_opt_pass +class pass_tm_edges : public gimple_opt_pass { public: pass_tm_edges (gcc::context *ctxt) @@ -3225,6 +3243,8 @@ pass_tm_edges::execute (function *fun) return 0; } +} // anon namespace + gimple_opt_pass * make_pass_tm_edges (gcc::context *ctxt) { @@ -3930,7 +3950,9 @@ execute_tm_memopt (void) return 0; } -static const pass_data pass_data_tm_memopt = +namespace { + +const pass_data pass_data_tm_memopt = { GIMPLE_PASS, /* type */ "tmmemopt", /* name */ @@ -3943,7 +3965,7 @@ static const pass_data pass_data_tm_memopt = 0, /* todo_flags_finish */ }; -class pass_tm_memopt GCC_FINAL : public gimple_opt_pass +class pass_tm_memopt : public gimple_opt_pass { public: pass_tm_memopt (gcc::context *ctxt) @@ -3956,6 +3978,8 @@ public: }; // class pass_tm_memopt +} // anon namespace + gimple_opt_pass * make_pass_tm_memopt (gcc::context *ctxt) { @@ -5568,7 +5592,9 @@ ipa_tm_execute (void) return 0; } -static const pass_data pass_data_ipa_tm = +namespace { + +const pass_data pass_data_ipa_tm = { SIMPLE_IPA_PASS, /* type */ "tmipa", /* name */ @@ -5581,7 +5607,7 @@ static const pass_data pass_data_ipa_tm = 0, /* todo_flags_finish */ }; -class pass_ipa_tm GCC_FINAL : public simple_ipa_opt_pass +class pass_ipa_tm : public simple_ipa_opt_pass { public: pass_ipa_tm (gcc::context *ctxt) @@ -5594,6 +5620,8 @@ public: }; // class pass_ipa_tm +} // anon namespace + simple_ipa_opt_pass * make_pass_ipa_tm (gcc::context *ctxt) { diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c index 609bf4a28bf..c1ca468fa25 100644 --- a/gcc/tree-eh.c +++ b/gcc/tree-eh.c @@ -2137,7 +2137,9 @@ lower_eh_constructs_1 (struct leh_state *state, gimple_seq *pseq) lower_eh_constructs_2 (state, &gsi); } -static const pass_data pass_data_lower_eh = +namespace { + +const pass_data pass_data_lower_eh = { GIMPLE_PASS, /* type */ "eh", /* name */ @@ -2150,7 +2152,7 @@ static const pass_data pass_data_lower_eh = 0, /* todo_flags_finish */ }; -class pass_lower_eh GCC_FINAL : public gimple_opt_pass +class pass_lower_eh : public gimple_opt_pass { public: pass_lower_eh (gcc::context *ctxt) @@ -2205,6 +2207,8 @@ pass_lower_eh::execute (function *fun) return 0; } +} // anon namespace + gimple_opt_pass * make_pass_lower_eh (gcc::context *ctxt) { @@ -3109,7 +3113,9 @@ refactor_eh_r (gimple_seq seq) } } -static const pass_data pass_data_refactor_eh = +namespace { + +const pass_data pass_data_refactor_eh = { GIMPLE_PASS, /* type */ "ehopt", /* name */ @@ -3122,7 +3128,7 @@ static const pass_data pass_data_refactor_eh = 0, /* todo_flags_finish */ }; -class pass_refactor_eh GCC_FINAL : public gimple_opt_pass +class pass_refactor_eh : public gimple_opt_pass { public: pass_refactor_eh (gcc::context *ctxt) @@ -3139,6 +3145,8 @@ public: }; // class pass_refactor_eh +} // anon namespace + gimple_opt_pass * make_pass_refactor_eh (gcc::context *ctxt) { @@ -3295,7 +3303,9 @@ lower_resx (basic_block bb, gresx *stmt, return ret; } -static const pass_data pass_data_lower_resx = +namespace { + +const pass_data pass_data_lower_resx = { GIMPLE_PASS, /* type */ "resx", /* name */ @@ -3308,7 +3318,7 @@ static const pass_data pass_data_lower_resx = 0, /* todo_flags_finish */ }; -class pass_lower_resx GCC_FINAL : public gimple_opt_pass +class pass_lower_resx : public gimple_opt_pass { public: pass_lower_resx (gcc::context *ctxt) @@ -3350,6 +3360,8 @@ pass_lower_resx::execute (function *fun) return any_rewritten ? TODO_update_ssa_only_virtuals : 0; } +} // anon namespace + gimple_opt_pass * make_pass_lower_resx (gcc::context *ctxt) { @@ -3688,7 +3700,9 @@ lower_eh_dispatch (basic_block src, geh_dispatch *stmt) return redirected; } -static const pass_data pass_data_lower_eh_dispatch = +namespace { + +const pass_data pass_data_lower_eh_dispatch = { GIMPLE_PASS, /* type */ "ehdisp", /* name */ @@ -3701,7 +3715,7 @@ static const pass_data pass_data_lower_eh_dispatch = 0, /* todo_flags_finish */ }; -class pass_lower_eh_dispatch GCC_FINAL : public gimple_opt_pass +class pass_lower_eh_dispatch : public gimple_opt_pass { public: pass_lower_eh_dispatch (gcc::context *ctxt) @@ -3748,6 +3762,8 @@ pass_lower_eh_dispatch::execute (function *fun) return flags; } +} // anon namespace + gimple_opt_pass * make_pass_lower_eh_dispatch (gcc::context *ctxt) { @@ -4556,7 +4572,9 @@ execute_cleanup_eh_1 (void) return 0; } -static const pass_data pass_data_cleanup_eh = +namespace { + +const pass_data pass_data_cleanup_eh = { GIMPLE_PASS, /* type */ "ehcleanup", /* name */ @@ -4569,7 +4587,7 @@ static const pass_data pass_data_cleanup_eh = 0, /* todo_flags_finish */ }; -class pass_cleanup_eh GCC_FINAL : public gimple_opt_pass +class pass_cleanup_eh : public gimple_opt_pass { public: pass_cleanup_eh (gcc::context *ctxt) @@ -4602,6 +4620,8 @@ pass_cleanup_eh::execute (function *fun) return ret; } +} // anon namespace + gimple_opt_pass * make_pass_cleanup_eh (gcc::context *ctxt) { diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c index 7ecbe4a1d2f..291e6020b25 100644 --- a/gcc/tree-if-conv.c +++ b/gcc/tree-if-conv.c @@ -2734,7 +2734,9 @@ tree_if_conversion (struct loop *loop) /* Tree if-conversion pass management. */ -static const pass_data pass_data_if_conversion = +namespace { + +const pass_data pass_data_if_conversion = { GIMPLE_PASS, /* type */ "ifcvt", /* name */ @@ -2747,7 +2749,7 @@ static const pass_data pass_data_if_conversion = 0, /* todo_flags_finish */ }; -class pass_if_conversion GCC_FINAL : public gimple_opt_pass +class pass_if_conversion : public gimple_opt_pass { public: pass_if_conversion (gcc::context *ctxt) @@ -2796,6 +2798,8 @@ pass_if_conversion::execute (function *fun) return todo; } +} // anon namespace + gimple_opt_pass * make_pass_if_conversion (gcc::context *ctxt) { diff --git a/gcc/tree-ssa-copyrename.c b/gcc/tree-ssa-copyrename.c index 61bef85cbd1..aeb7f28f03b 100644 --- a/gcc/tree-ssa-copyrename.c +++ b/gcc/tree-ssa-copyrename.c @@ -301,7 +301,9 @@ copy_rename_partition_coalesce (var_map map, tree var1, tree var2, FILE *debug) } -static const pass_data pass_data_rename_ssa_copies = +namespace { + +const pass_data pass_data_rename_ssa_copies = { GIMPLE_PASS, /* type */ "copyrename", /* name */ @@ -314,7 +316,7 @@ static const pass_data pass_data_rename_ssa_copies = 0, /* todo_flags_finish */ }; -class pass_rename_ssa_copies GCC_FINAL : public gimple_opt_pass +class pass_rename_ssa_copies : public gimple_opt_pass { public: pass_rename_ssa_copies (gcc::context *ctxt) @@ -464,6 +466,8 @@ pass_rename_ssa_copies::execute (function *fun) return 0; } +} // anon namespace + gimple_opt_pass * make_pass_rename_ssa_copies (gcc::context *ctxt) { diff --git a/gcc/tree-ssa-dce.c b/gcc/tree-ssa-dce.c index 7c23393a86a..2d2edc80116 100644 --- a/gcc/tree-ssa-dce.c +++ b/gcc/tree-ssa-dce.c @@ -1689,7 +1689,9 @@ tree_ssa_cd_dce (void) return perform_tree_ssa_dce (/*aggressive=*/optimize >= 2); } -static const pass_data pass_data_dce = +namespace { + +const pass_data pass_data_dce = { GIMPLE_PASS, /* type */ "dce", /* name */ @@ -1702,7 +1704,7 @@ static const pass_data pass_data_dce = 0, /* todo_flags_finish */ }; -class pass_dce GCC_FINAL : public gimple_opt_pass +class pass_dce : public gimple_opt_pass { public: pass_dce (gcc::context *ctxt) @@ -1716,13 +1718,17 @@ public: }; // class pass_dce +} // anon namespace + gimple_opt_pass * make_pass_dce (gcc::context *ctxt) { return new pass_dce (ctxt); } -static const pass_data pass_data_cd_dce = +namespace { + +const pass_data pass_data_cd_dce = { GIMPLE_PASS, /* type */ "cddce", /* name */ @@ -1735,7 +1741,7 @@ static const pass_data pass_data_cd_dce = 0, /* todo_flags_finish */ }; -class pass_cd_dce GCC_FINAL : public gimple_opt_pass +class pass_cd_dce : public gimple_opt_pass { public: pass_cd_dce (gcc::context *ctxt) @@ -1749,6 +1755,8 @@ public: }; // class pass_cd_dce +} // anon namespace + gimple_opt_pass * make_pass_cd_dce (gcc::context *ctxt) { diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c index a2742377e41..3eb003c728a 100644 --- a/gcc/tree-ssa-dom.c +++ b/gcc/tree-ssa-dom.c @@ -1131,7 +1131,9 @@ private: every new symbol exposed, its corresponding bit will be set in VARS_TO_RENAME. */ -static const pass_data pass_data_dominator = +namespace { + +const pass_data pass_data_dominator = { GIMPLE_PASS, /* type */ "dom", /* name */ @@ -1144,7 +1146,7 @@ static const pass_data pass_data_dominator = ( TODO_cleanup_cfg | TODO_update_ssa ), /* todo_flags_finish */ }; -class pass_dominator GCC_FINAL : public gimple_opt_pass +class pass_dominator : public gimple_opt_pass { public: pass_dominator (gcc::context *ctxt) @@ -1297,6 +1299,8 @@ pass_dominator::execute (function *fun) return 0; } +} // anon namespace + gimple_opt_pass * make_pass_dominator (gcc::context *ctxt) { diff --git a/gcc/tree-ssa-dse.c b/gcc/tree-ssa-dse.c index 03356458943..4ad19b3bc60 100644 --- a/gcc/tree-ssa-dse.c +++ b/gcc/tree-ssa-dse.c @@ -347,7 +347,9 @@ dse_dom_walker::before_dom_children (basic_block bb) } } -static const pass_data pass_data_dse = +namespace { + +const pass_data pass_data_dse = { GIMPLE_PASS, /* type */ "dse", /* name */ @@ -360,7 +362,7 @@ static const pass_data pass_data_dse = 0, /* todo_flags_finish */ }; -class pass_dse GCC_FINAL : public gimple_opt_pass +class pass_dse : public gimple_opt_pass { public: pass_dse (gcc::context *ctxt) @@ -407,6 +409,8 @@ pass_dse::execute (function *fun) return 0; } +} // anon namespace + gimple_opt_pass * make_pass_dse (gcc::context *ctxt) { diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c index 27aacc225c2..ccfde5f1e36 100644 --- a/gcc/tree-ssa-forwprop.c +++ b/gcc/tree-ssa-forwprop.c @@ -2075,7 +2075,9 @@ fwprop_ssa_val (tree name) /* Main entry point for the forward propagation and statement combine optimizer. */ -static const pass_data pass_data_forwprop = +namespace { + +const pass_data pass_data_forwprop = { GIMPLE_PASS, /* type */ "forwprop", /* name */ @@ -2088,7 +2090,7 @@ static const pass_data pass_data_forwprop = TODO_update_ssa, /* todo_flags_finish */ }; -class pass_forwprop GCC_FINAL : public gimple_opt_pass +class pass_forwprop : public gimple_opt_pass { public: pass_forwprop (gcc::context *ctxt) @@ -2475,6 +2477,8 @@ pass_forwprop::execute (function *fun) return todoflags; } +} // anon namespace + gimple_opt_pass * make_pass_forwprop (gcc::context *ctxt) { diff --git a/gcc/tree-ssa-sink.c b/gcc/tree-ssa-sink.c index 8b7a02d588c..8118f357852 100644 --- a/gcc/tree-ssa-sink.c +++ b/gcc/tree-ssa-sink.c @@ -590,7 +590,9 @@ sink_code_in_bb (basic_block bb) Note that this reduces the number of computations of a = b + c to 1 when we take the else edge, instead of 2. */ -static const pass_data pass_data_sink_code = +namespace { + +const pass_data pass_data_sink_code = { GIMPLE_PASS, /* type */ "sink", /* name */ @@ -605,7 +607,7 @@ static const pass_data pass_data_sink_code = TODO_update_ssa, /* todo_flags_finish */ }; -class pass_sink_code GCC_FINAL : public gimple_opt_pass +class pass_sink_code : public gimple_opt_pass { public: pass_sink_code (gcc::context *ctxt) @@ -636,6 +638,8 @@ pass_sink_code::execute (function *fun) return 0; } +} // anon namespace + gimple_opt_pass * make_pass_sink_code (gcc::context *ctxt) { diff --git a/gcc/tree-ssanames.c b/gcc/tree-ssanames.c index a3c64ab8ea4..910cb19b8d1 100644 --- a/gcc/tree-ssanames.c +++ b/gcc/tree-ssanames.c @@ -576,7 +576,9 @@ replace_ssa_name_symbol (tree ssa_name, tree sym) version namespace. This is used to keep footprint of compiler during interprocedural optimization. */ -static const pass_data pass_data_release_ssa_names = +namespace { + +const pass_data pass_data_release_ssa_names = { GIMPLE_PASS, /* type */ "release_ssa", /* name */ @@ -589,7 +591,7 @@ static const pass_data pass_data_release_ssa_names = 0, /* todo_flags_finish */ }; -class pass_release_ssa_names GCC_FINAL : public gimple_opt_pass +class pass_release_ssa_names : public gimple_opt_pass { public: pass_release_ssa_names (gcc::context *ctxt) @@ -635,6 +637,8 @@ pass_release_ssa_names::execute (function *fun) return 0; } +} // anon namespace + gimple_opt_pass * make_pass_release_ssa_names (gcc::context *ctxt) { diff --git a/gcc/tree-stdarg.c b/gcc/tree-stdarg.c index fe19da4c338..cd595a94f68 100644 --- a/gcc/tree-stdarg.c +++ b/gcc/tree-stdarg.c @@ -1114,7 +1114,9 @@ expand_ifn_va_arg (function *fun) #endif } -static const pass_data pass_data_stdarg = +namespace { + +const pass_data pass_data_stdarg = { GIMPLE_PASS, /* type */ "stdarg", /* name */ @@ -1127,7 +1129,7 @@ static const pass_data pass_data_stdarg = 0, /* todo_flags_finish */ }; -class pass_stdarg GCC_FINAL : public gimple_opt_pass +class pass_stdarg : public gimple_opt_pass { public: pass_stdarg (gcc::context *ctxt) @@ -1163,13 +1165,17 @@ pass_stdarg::execute (function *fun) return 0; } +} // anon namespace + gimple_opt_pass * make_pass_stdarg (gcc::context *ctxt) { return new pass_stdarg (ctxt); } -static const pass_data pass_data_lower_vaarg = +namespace { + +const pass_data pass_data_lower_vaarg = { GIMPLE_PASS, /* type */ "lower_vaarg", /* name */ @@ -1182,7 +1188,7 @@ static const pass_data pass_data_lower_vaarg = 0, /* todo_flags_finish */ }; -class pass_lower_vaarg GCC_FINAL : public gimple_opt_pass +class pass_lower_vaarg : public gimple_opt_pass { public: pass_lower_vaarg (gcc::context *ctxt) @@ -1206,6 +1212,8 @@ pass_lower_vaarg::execute (function *fun) return 0; } +} // anon namespace + gimple_opt_pass * make_pass_lower_vaarg (gcc::context *ctxt) { diff --git a/gcc/tree-tailcall.c b/gcc/tree-tailcall.c index 08b5807ff19..7b723c2caeb 100644 --- a/gcc/tree-tailcall.c +++ b/gcc/tree-tailcall.c @@ -1092,7 +1092,9 @@ execute_tail_calls (void) return tree_optimize_tail_calls_1 (true); } -static const pass_data pass_data_tail_recursion = +namespace { + +const pass_data pass_data_tail_recursion = { GIMPLE_PASS, /* type */ "tailr", /* name */ @@ -1105,7 +1107,7 @@ static const pass_data pass_data_tail_recursion = 0, /* todo_flags_finish */ }; -class pass_tail_recursion GCC_FINAL : public gimple_opt_pass +class pass_tail_recursion : public gimple_opt_pass { public: pass_tail_recursion (gcc::context *ctxt) @@ -1122,13 +1124,17 @@ public: }; // class pass_tail_recursion +} // anon namespace + gimple_opt_pass * make_pass_tail_recursion (gcc::context *ctxt) { return new pass_tail_recursion (ctxt); } -static const pass_data pass_data_tail_calls = +namespace { + +const pass_data pass_data_tail_calls = { GIMPLE_PASS, /* type */ "tailc", /* name */ @@ -1141,7 +1147,7 @@ static const pass_data pass_data_tail_calls = 0, /* todo_flags_finish */ }; -class pass_tail_calls GCC_FINAL : public gimple_opt_pass +class pass_tail_calls : public gimple_opt_pass { public: pass_tail_calls (gcc::context *ctxt) @@ -1154,6 +1160,8 @@ public: }; // class pass_tail_calls +} // anon namespace + gimple_opt_pass * make_pass_tail_calls (gcc::context *ctxt) { diff --git a/gcc/tree-vect-generic.c b/gcc/tree-vect-generic.c index 8fe71afba05..be3d27fbdf3 100644 --- a/gcc/tree-vect-generic.c +++ b/gcc/tree-vect-generic.c @@ -1705,7 +1705,9 @@ expand_vector_operations (void) return cfg_changed ? TODO_cleanup_cfg : 0; } -static const pass_data pass_data_lower_vector = +namespace { + +const pass_data pass_data_lower_vector = { GIMPLE_PASS, /* type */ "veclower", /* name */ @@ -1718,7 +1720,7 @@ static const pass_data pass_data_lower_vector = TODO_update_ssa, /* todo_flags_finish */ }; -class pass_lower_vector GCC_FINAL : public gimple_opt_pass +class pass_lower_vector : public gimple_opt_pass { public: pass_lower_vector (gcc::context *ctxt) @@ -1738,13 +1740,17 @@ public: }; // class pass_lower_vector +} // anon namespace + gimple_opt_pass * make_pass_lower_vector (gcc::context *ctxt) { return new pass_lower_vector (ctxt); } -static const pass_data pass_data_lower_vector_ssa = +namespace { + +const pass_data pass_data_lower_vector_ssa = { GIMPLE_PASS, /* type */ "veclower2", /* name */ @@ -1758,7 +1764,7 @@ static const pass_data pass_data_lower_vector_ssa = | TODO_cleanup_cfg ), /* todo_flags_finish */ }; -class pass_lower_vector_ssa GCC_FINAL : public gimple_opt_pass +class pass_lower_vector_ssa : public gimple_opt_pass { public: pass_lower_vector_ssa (gcc::context *ctxt) @@ -1774,6 +1780,8 @@ public: }; // class pass_lower_vector_ssa +} // anon namespace + gimple_opt_pass * make_pass_lower_vector_ssa (gcc::context *ctxt) { diff --git a/gcc/tree.c b/gcc/tree.c index 92b95a6a5b4..3c2c20a82b4 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -5948,7 +5948,9 @@ free_lang_data (void) } -static const pass_data pass_data_ipa_free_lang_data = +namespace { + +const pass_data pass_data_ipa_free_lang_data = { SIMPLE_IPA_PASS, /* type */ "*free_lang_data", /* name */ @@ -5961,7 +5963,7 @@ static const pass_data pass_data_ipa_free_lang_data = 0, /* todo_flags_finish */ }; -class pass_ipa_free_lang_data GCC_FINAL : public simple_ipa_opt_pass +class pass_ipa_free_lang_data : public simple_ipa_opt_pass { public: pass_ipa_free_lang_data (gcc::context *ctxt) @@ -5973,6 +5975,8 @@ public: }; // class pass_ipa_free_lang_data +} // anon namespace + simple_ipa_opt_pass * make_pass_ipa_free_lang_data (gcc::context *ctxt) { diff --git a/gcc/ubsan.c b/gcc/ubsan.c index e88c367cc99..7983c930c66 100644 --- a/gcc/ubsan.c +++ b/gcc/ubsan.c @@ -1896,7 +1896,9 @@ do_ubsan_in_current_function () DECL_ATTRIBUTES (current_function_decl))); } -static const pass_data pass_data_ubsan = +namespace { + +const pass_data pass_data_ubsan = { GIMPLE_PASS, /* type */ "ubsan", /* name */ @@ -1909,7 +1911,7 @@ static const pass_data pass_data_ubsan = TODO_update_ssa, /* todo_flags_finish */ }; -class pass_ubsan GCC_FINAL : public gimple_opt_pass +class pass_ubsan : public gimple_opt_pass { public: pass_ubsan (gcc::context *ctxt) @@ -1999,6 +2001,8 @@ pass_ubsan::execute (function *fun) return 0; } +} // anon namespace + gimple_opt_pass * make_pass_ubsan (gcc::context *ctxt) { diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c index 028dc22a72b..da9de28af7b 100644 --- a/gcc/var-tracking.c +++ b/gcc/var-tracking.c @@ -10325,7 +10325,9 @@ variable_tracking_main (void) return ret; } -static const pass_data pass_data_variable_tracking = +namespace { + +const pass_data pass_data_variable_tracking = { RTL_PASS, /* type */ "vartrack", /* name */ @@ -10338,7 +10340,7 @@ static const pass_data pass_data_variable_tracking = 0, /* todo_flags_finish */ }; -class pass_variable_tracking GCC_FINAL : public rtl_opt_pass +class pass_variable_tracking : public rtl_opt_pass { public: pass_variable_tracking (gcc::context *ctxt) @@ -10358,6 +10360,8 @@ public: }; // class pass_variable_tracking +} // anon namespace + rtl_opt_pass * make_pass_variable_tracking (gcc::context *ctxt) { diff --git a/gcc/vtable-verify.c b/gcc/vtable-verify.c index 6e2b6bb6298..a8345882045 100644 --- a/gcc/vtable-verify.c +++ b/gcc/vtable-verify.c @@ -801,7 +801,9 @@ verify_bb_vtables (basic_block bb) /* Definition of this optimization pass. */ -static const pass_data pass_data_vtable_verify = +namespace { + +const pass_data pass_data_vtable_verify = { GIMPLE_PASS, /* type */ "vtable-verify", /* name */ @@ -814,7 +816,7 @@ static const pass_data pass_data_vtable_verify = TODO_update_ssa, /* todo_flags_finish */ }; -class pass_vtable_verify GCC_FINAL : public gimple_opt_pass +class pass_vtable_verify : public gimple_opt_pass { public: pass_vtable_verify (gcc::context *ctxt) @@ -843,6 +845,8 @@ pass_vtable_verify::execute (function *fun) return ret; } +} // anon namespace + gimple_opt_pass * make_pass_vtable_verify (gcc::context *ctxt) { diff --git a/gcc/web.c b/gcc/web.c index 58ae58c07a9..839b03e94a3 100644 --- a/gcc/web.c +++ b/gcc/web.c @@ -306,7 +306,9 @@ replace_ref (df_ref ref, rtx reg) } -static const pass_data pass_data_web = +namespace { + +const pass_data pass_data_web = { RTL_PASS, /* type */ "web", /* name */ @@ -319,7 +321,7 @@ static const pass_data pass_data_web = TODO_df_finish, /* todo_flags_finish */ }; -class pass_web GCC_FINAL : public rtl_opt_pass +class pass_web : public rtl_opt_pass { public: pass_web (gcc::context *ctxt) @@ -424,6 +426,8 @@ pass_web::execute (function *fun) return 0; } +} // anon namespace + rtl_opt_pass * make_pass_web (gcc::context *ctxt) { -- 2.30.2