This patch only removes unused declarations and variables.

tree-into-ssa.cc:
   mark_def_sites_global_data isn't used since 4d9192b (2013).
   This comes from a dom-walker refactor into C++. See more on:
   gcc.gnu.org/pipermail/gcc-patches/2013-September/369169.html

tree-ssa-propagate.cc:
   curr_order stopped being used in 445a48a2. You can read on
   that commit message that another order strategy was used.

tree-ssa-tail-merge.cc:
   vop_at_exit, which is described as short-lived data, was
   added in c9e9316 , and removed shortly after in 643400b8.
   As I undestand it, the code was reverted to fix PR51005,
   about long compile times.

tree-vectorizer.h:
   vect_detect_hybrid_slp was removed in df86ac52 and later
   docu about it was also cleaned up in 1ca2e5df.

Successfully bootstrapped on my machine.
Have a great day,

gcc/ChangeLog:

        * tree-into-ssa.cc (struct mark_def_sites_global_data): Remove.
        * tree-ssa-propagate.cc (ssa_propagation_engine::ssa_propagate):
        Remove.
        * tree-ssa-tail-merge.cc (struct aux_bb_info): Remove
        (BB_VOP_AT_EXIT): Remove.
        * tree-vectorizer.h (vect_detect_hybrid_slp): Remove.

Signed-off-by: Léo Hardt <[email protected]>
---
 gcc/tree-into-ssa.cc       | 8 --------
 gcc/tree-ssa-propagate.cc  | 8 --------
 gcc/tree-ssa-tail-merge.cc | 4 ----
 gcc/tree-vectorizer.h      | 1 -
 4 files changed, 21 deletions(-)

diff --git a/gcc/tree-into-ssa.cc b/gcc/tree-into-ssa.cc
index 20c98264baa..f0ef5afb188 100644
--- a/gcc/tree-into-ssa.cc
+++ b/gcc/tree-into-ssa.cc
@@ -116,14 +116,6 @@ static bitmap blocks_with_phis_to_rewrite;
    NULL if they need to be initialized by create_new_def_for.  */
 static struct function *update_ssa_initialized_fn = NULL;

-/* Global data to attach to the main dominator walk structure.  */
-struct mark_def_sites_global_data
-{
-  /* This bitmap contains the variables which are set before they
-     are used in a basic block.  */
-  bitmap kills;
-};
-
 /* It is advantageous to avoid things like life analysis for variables which
    do not need PHI nodes.  This enum describes whether or not a particular
    variable may need a PHI node.  */
diff --git a/gcc/tree-ssa-propagate.cc b/gcc/tree-ssa-propagate.cc
index 5640f2c771c..a79f24a5935 100644
--- a/gcc/tree-ssa-propagate.cc
+++ b/gcc/tree-ssa-propagate.cc
@@ -124,10 +124,6 @@ static int *cfg_order_to_bb;
 static bitmap ssa_edge_worklist;
 static vec<gimple *> uid_to_stmt;

-/* Current RPO index in the iteration.  */
-static int curr_order;
-
-
 /* We have just defined a new value for VAR.  If IS_VARYING is true,
    add all immediate uses of VAR to VARYING_SSA_EDGES, otherwise add
    them to INTERESTING_SSA_EDGES.  */
@@ -435,8 +431,6 @@ ssa_propagation_engine::ssa_propagate (void)
 {
   ssa_prop_init ();

-  curr_order = 0;
-
   /* Iterate until the worklists are empty.  We iterate both blocks
      and stmts in RPO order, prioritizing backedge processing.
      Seed the algorithm by adding the successors of the entry block to the
@@ -470,7 +464,6 @@ ssa_propagation_engine::ssa_propagate (void)
          && (next_stmt_bb_order == -1
              || next_block_order <= next_stmt_bb_order))
        {
-         curr_order = next_block_order;
          bitmap_clear_bit (cfg_blocks, next_block_order);
          basic_block bb
            = BASIC_BLOCK_FOR_FN (cfun, cfg_order_to_bb [next_block_order]);
@@ -479,7 +472,6 @@ ssa_propagation_engine::ssa_propagate (void)
       /* Else simulate from the SSA edge worklist.  */
       else
        {
-         curr_order = next_stmt_bb_order;
          if (dump_file && (dump_flags & TDF_DETAILS))
            {
              fprintf (dump_file, "\nSimulating statement: ");
diff --git a/gcc/tree-ssa-tail-merge.cc b/gcc/tree-ssa-tail-merge.cc
index 323d71f132c..982ce5cb37f 100644
--- a/gcc/tree-ssa-tail-merge.cc
+++ b/gcc/tree-ssa-tail-merge.cc
@@ -271,9 +271,6 @@ struct aux_bb_info
   same_succ *bb_same_succ;
   /* The cluster that this bb is a member of.  */
   bb_cluster *cluster;
-  /* The vop state at the exit of a bb.  This is shortlived data, used to
-     communicate data between update_block_by and update_vuses.  */
-  tree vop_at_exit;
   /* The bb that either contains or is dominated by the dependencies of the
      bb.  */
   basic_block dep_bb;
@@ -284,7 +281,6 @@ struct aux_bb_info
 #define BB_SIZE(bb) (((struct aux_bb_info *)bb->aux)->size)
 #define BB_SAME_SUCC(bb) (((struct aux_bb_info *)bb->aux)->bb_same_succ)
 #define BB_CLUSTER(bb) (((struct aux_bb_info *)bb->aux)->cluster)
-#define BB_VOP_AT_EXIT(bb) (((struct aux_bb_info *)bb->aux)->vop_at_exit)
 #define BB_DEP_BB(bb) (((struct aux_bb_info *)bb->aux)->dep_bb)

 /* Valueization helper querying the VN lattice.  */
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index 4d542d57e6d..3aa60145420 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -2762,7 +2762,6 @@ extern bool vect_slp_analyze_operations (vec_info *);
 extern bool vect_schedule_slp (vec_info *, vec<slp_instance> &, bool);
 extern opt_result vect_analyze_slp (vec_info *, unsigned, bool);
 extern bool vect_make_slp_decision (loop_vec_info);
-extern bool vect_detect_hybrid_slp (loop_vec_info);
 extern void vect_optimize_slp (vec_info *);
 extern void vect_gather_slp_loads (vec_info *);
 extern tree vect_get_slp_scalar_def (slp_tree, unsigned);
--
2.47.3

Reply via email to