From: David Malcolm Date: Mon, 27 Jun 2022 21:00:33 +0000 (-0400) Subject: Add 'final' and 'override' on dom_walker vfunc impls X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=894ddeacdaeacbd29e5ebcfd51f423050ae8d56b;p=platform%2Fupstream%2Fgcc.git Add 'final' and 'override' on dom_walker vfunc impls gcc/ChangeLog: * compare-elim.cc: Add "final" and "override" to dom_walker vfunc implementations, removing redundant "virtual" as appropriate. * gimple-ssa-strength-reduction.cc: Likewise. * ipa-prop.cc: Likewise. * rtl-ssa/blocks.cc: Likewise. * tree-into-ssa.cc: Likewise. * tree-ssa-dom.cc: Likewise. * tree-ssa-math-opts.cc: Likewise. * tree-ssa-phiopt.cc: Likewise. * tree-ssa-propagate.cc: Likewise. * tree-ssa-sccvn.cc: Likewise. * tree-ssa-strlen.cc: Likewise. * tree-ssa-uncprop.cc: Likewise. Signed-off-by: David Malcolm --- diff --git a/gcc/compare-elim.cc b/gcc/compare-elim.cc index e869d9d..4a23202 100644 --- a/gcc/compare-elim.cc +++ b/gcc/compare-elim.cc @@ -283,7 +283,7 @@ public: find_comparison_dom_walker (cdi_direction direction) : dom_walker (direction) {} - virtual edge before_dom_children (basic_block); + edge before_dom_children (basic_block) final override; }; /* Return true if conforming COMPARE with EH_NOTE is redundant with comparison diff --git a/gcc/gimple-ssa-strength-reduction.cc b/gcc/gimple-ssa-strength-reduction.cc index 2b559e9..fb2bb9f 100644 --- a/gcc/gimple-ssa-strength-reduction.cc +++ b/gcc/gimple-ssa-strength-reduction.cc @@ -1729,7 +1729,7 @@ class find_candidates_dom_walker : public dom_walker public: find_candidates_dom_walker (cdi_direction direction) : dom_walker (direction) {} - virtual edge before_dom_children (basic_block); + edge before_dom_children (basic_block) final override; }; /* Find strength-reduction candidates in block BB. */ diff --git a/gcc/ipa-prop.cc b/gcc/ipa-prop.cc index e1fc481..7791563 100644 --- a/gcc/ipa-prop.cc +++ b/gcc/ipa-prop.cc @@ -3008,7 +3008,7 @@ public: analysis_dom_walker (struct ipa_func_body_info *fbi) : dom_walker (CDI_DOMINATORS), m_fbi (fbi) {} - virtual edge before_dom_children (basic_block); + edge before_dom_children (basic_block) final override; private: struct ipa_func_body_info *m_fbi; @@ -5655,7 +5655,7 @@ public: : dom_walker (CDI_DOMINATORS), m_fbi (fbi), m_descriptors (descs), m_aggval (av), m_something_changed (sc) {} - virtual edge before_dom_children (basic_block); + edge before_dom_children (basic_block) final override; bool cleanup_eh () { return gimple_purge_all_dead_eh_edges (m_need_eh_cleanup); } diff --git a/gcc/rtl-ssa/blocks.cc b/gcc/rtl-ssa/blocks.cc index 959fad8..6b03dd0 100644 --- a/gcc/rtl-ssa/blocks.cc +++ b/gcc/rtl-ssa/blocks.cc @@ -85,8 +85,8 @@ class function_info::bb_walker : public dom_walker { public: bb_walker (function_info *, build_info &); - virtual edge before_dom_children (basic_block); - virtual void after_dom_children (basic_block); + edge before_dom_children (basic_block) final override; + void after_dom_children (basic_block) final override; private: // Information about the function we're building. diff --git a/gcc/tree-into-ssa.cc b/gcc/tree-into-ssa.cc index 46df57a..9631d8c 100644 --- a/gcc/tree-into-ssa.cc +++ b/gcc/tree-into-ssa.cc @@ -1462,8 +1462,8 @@ public: rewrite_dom_walker (cdi_direction direction) : dom_walker (direction, ALL_BLOCKS, NULL) {} - virtual edge before_dom_children (basic_block); - virtual void after_dom_children (basic_block); + edge before_dom_children (basic_block) final override; + void after_dom_children (basic_block) final override; }; /* SSA Rewriting Step 1. Initialization, create a block local stack @@ -2148,8 +2148,8 @@ public: rewrite_update_dom_walker (cdi_direction direction) : dom_walker (direction, ALL_BLOCKS, NULL) {} - virtual edge before_dom_children (basic_block); - virtual void after_dom_children (basic_block); + edge before_dom_children (basic_block) final override; + void after_dom_children (basic_block) final override; }; /* Initialization of block data structures for the incremental SSA @@ -2300,7 +2300,7 @@ public: mark_def_dom_walker (cdi_direction direction); ~mark_def_dom_walker (); - virtual edge before_dom_children (basic_block); + edge before_dom_children (basic_block) final override; private: /* Notice that this bitmap is indexed using variable UIDs, so it must be diff --git a/gcc/tree-ssa-dom.cc b/gcc/tree-ssa-dom.cc index e282123..dcaf467 100644 --- a/gcc/tree-ssa-dom.cc +++ b/gcc/tree-ssa-dom.cc @@ -670,8 +670,8 @@ public: m_threader = threader; } - virtual edge before_dom_children (basic_block); - virtual void after_dom_children (basic_block); + edge before_dom_children (basic_block) final override; + void after_dom_children (basic_block) final override; private: diff --git a/gcc/tree-ssa-math-opts.cc b/gcc/tree-ssa-math-opts.cc index fe9f37b..a4492c9 100644 --- a/gcc/tree-ssa-math-opts.cc +++ b/gcc/tree-ssa-math-opts.cc @@ -4918,7 +4918,7 @@ public: /* The actual actions performed in the walk. */ - virtual void after_dom_children (basic_block); + void after_dom_children (basic_block) final override; /* Set of results of chains of multiply and add statement combinations that were not transformed into FMAs because of active deferring. */ diff --git a/gcc/tree-ssa-phiopt.cc b/gcc/tree-ssa-phiopt.cc index 7efcc07..2f4bebe 100644 --- a/gcc/tree-ssa-phiopt.cc +++ b/gcc/tree-ssa-phiopt.cc @@ -2978,8 +2978,8 @@ public: : dom_walker (direction), m_nontrapping (ps), m_seen_refs (128) {} - virtual edge before_dom_children (basic_block); - virtual void after_dom_children (basic_block); + edge before_dom_children (basic_block) final override; + void after_dom_children (basic_block) final override; private: diff --git a/gcc/tree-ssa-propagate.cc b/gcc/tree-ssa-propagate.cc index 5983f02..163b24f 100644 --- a/gcc/tree-ssa-propagate.cc +++ b/gcc/tree-ssa-propagate.cc @@ -679,8 +679,8 @@ public: BITMAP_FREE (need_eh_cleanup); } - virtual edge before_dom_children (basic_block); - virtual void after_dom_children (basic_block bb) + edge before_dom_children (basic_block) final override; + void after_dom_children (basic_block bb) final override { substitute_and_fold_engine->post_fold_bb (bb); } diff --git a/gcc/tree-ssa-sccvn.cc b/gcc/tree-ssa-sccvn.cc index ee5b95c..ef833f5 100644 --- a/gcc/tree-ssa-sccvn.cc +++ b/gcc/tree-ssa-sccvn.cc @@ -2493,8 +2493,8 @@ public: eliminate_dom_walker (cdi_direction, bitmap); ~eliminate_dom_walker (); - virtual edge before_dom_children (basic_block); - virtual void after_dom_children (basic_block); + edge before_dom_children (basic_block) final override; + void after_dom_children (basic_block) final override; virtual tree eliminate_avail (basic_block, tree op); virtual void eliminate_push_avail (basic_block, tree op); diff --git a/gcc/tree-ssa-strlen.cc b/gcc/tree-ssa-strlen.cc index 2cceba6..7b3e389 100644 --- a/gcc/tree-ssa-strlen.cc +++ b/gcc/tree-ssa-strlen.cc @@ -243,8 +243,8 @@ public: ~strlen_pass (); - virtual edge before_dom_children (basic_block); - virtual void after_dom_children (basic_block); + edge before_dom_children (basic_block) final override; + void after_dom_children (basic_block) final override; bool check_and_optimize_stmt (bool *cleanup_eh); bool check_and_optimize_call (bool *zero_write); diff --git a/gcc/tree-ssa-uncprop.cc b/gcc/tree-ssa-uncprop.cc index 510f831..900bf33 100644 --- a/gcc/tree-ssa-uncprop.cc +++ b/gcc/tree-ssa-uncprop.cc @@ -298,8 +298,8 @@ class uncprop_dom_walker : public dom_walker public: uncprop_dom_walker (cdi_direction direction) : dom_walker (direction) {} - virtual edge before_dom_children (basic_block); - virtual void after_dom_children (basic_block); + edge before_dom_children (basic_block) final override; + void after_dom_children (basic_block) final override; private: