From ac03d822d0874c56a74148437fc65da4f2522f26 Mon Sep 17 00:00:00 2001 From: law Date: Thu, 2 Nov 2017 14:54:58 +0000 Subject: [PATCH] * gimple-ssa-sprintf.c (sprintf_dom_walker): Remove virtual keyword on FINAL OVERRIDE members. * tree-ssa-propagate.h (ssa_propagation_engine): Group virtuals together. Add virtual destructor. (substitute_and_fold_engine): Similarly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@254345 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 9 +++++++++ gcc/gimple-ssa-sprintf.c | 2 +- gcc/tree-ssa-propagate.h | 12 ++++++++---- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 067164afb71..56aaf549ce9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2017-11-02 Jeff Law + + * gimple-ssa-sprintf.c (sprintf_dom_walker): Remove + virtual keyword on FINAL OVERRIDE members. + + * tree-ssa-propagate.h (ssa_propagation_engine): Group + virtuals together. Add virtual destructor. + (substitute_and_fold_engine): Similarly. + 2017-11-02 Jan Hubicka * x86-tune.def (X86_TUNE_USE_INCDEC): Enable for Haswell+. diff --git a/gcc/gimple-ssa-sprintf.c b/gcc/gimple-ssa-sprintf.c index 74154138fc9..35ceb2cfb75 100644 --- a/gcc/gimple-ssa-sprintf.c +++ b/gcc/gimple-ssa-sprintf.c @@ -120,7 +120,7 @@ class sprintf_dom_walker : public dom_walker sprintf_dom_walker () : dom_walker (CDI_DOMINATORS) {} ~sprintf_dom_walker () {} - virtual edge before_dom_children (basic_block) FINAL OVERRIDE; + edge before_dom_children (basic_block) FINAL OVERRIDE; bool handle_gimple_call (gimple_stmt_iterator *); struct call_info; diff --git a/gcc/tree-ssa-propagate.h b/gcc/tree-ssa-propagate.h index 629ae770ee8..be4500bc83a 100644 --- a/gcc/tree-ssa-propagate.h +++ b/gcc/tree-ssa-propagate.h @@ -81,14 +81,16 @@ class ssa_propagation_engine { public: - /* Main interface into the propagation engine. */ - void ssa_propagate (void); + virtual ~ssa_propagation_engine (void) { } /* Virtual functions the clients must provide to visit statements and phi nodes respectively. */ virtual enum ssa_prop_result visit_stmt (gimple *, edge *, tree *) = 0; virtual enum ssa_prop_result visit_phi (gphi *) = 0; + /* Main interface into the propagation engine. */ + void ssa_propagate (void); + private: /* Internal implementation details. */ void simulate_stmt (gimple *stmt); @@ -100,10 +102,12 @@ class ssa_propagation_engine class substitute_and_fold_engine { public: - bool substitute_and_fold (void); - bool replace_uses_in (gimple *); + virtual ~substitute_and_fold_engine (void) { } virtual bool fold_stmt (gimple_stmt_iterator *) { return false; } virtual tree get_value (tree) { return NULL_TREE; } + + bool substitute_and_fold (void); + bool replace_uses_in (gimple *); bool replace_phi_args_in (gphi *); }; -- 2.11.4.GIT