public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/guojiufu/heads/guojiufu-branch)] Remove dead code
@ 2020-06-10  3:50 Jiu Fu Guo
  0 siblings, 0 replies; 2+ messages in thread
From: Jiu Fu Guo @ 2020-06-10  3:50 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:ac22e651efe0da924925ac33a31e5c8d73e11fef

commit ac22e651efe0da924925ac33a31e5c8d73e11fef
Author: Richard Biener <rguenther@suse.de>
Date:   Tue Jun 9 16:00:43 2020 +0200

    Remove dead code
    
    This removes dead code that was left over from the reduction
    vectorization refactoring last year.
    
    2020-06-09  Richard Biener  <rguenther@suse.de>
    
            * tree-vect-stmts.c (vect_transform_stmt): Remove dead code.

Diff:
---
 gcc/tree-vect-stmts.c | 43 -------------------------------------------
 1 file changed, 43 deletions(-)

diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index b24b0fe4304..61adf7d7fa4 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -11186,12 +11186,6 @@ vect_transform_stmt (vec_info *vinfo,
   gcc_assert (slp_node || !PURE_SLP_STMT (stmt_info));
   stmt_vec_info old_vec_stmt_info = STMT_VINFO_VEC_STMT (stmt_info);
 
-  loop_vec_info loop_vinfo = dyn_cast <loop_vec_info> (vinfo);
-  bool nested_p = (loop_vinfo
-		   && nested_in_vect_loop_p
-			(LOOP_VINFO_LOOP (loop_vinfo), stmt_info));
-
-  gimple *stmt = stmt_info->stmt;
   switch (STMT_VINFO_TYPE (stmt_info))
     {
     case type_demotion_vec_info_type:
@@ -11266,13 +11260,11 @@ vect_transform_stmt (vec_info *vinfo,
     case call_vec_info_type:
       done = vectorizable_call (vinfo, stmt_info,
 				gsi, &vec_stmt, slp_node, NULL);
-      stmt = gsi_stmt (*gsi);
       break;
 
     case call_simd_clone_vec_info_type:
       done = vectorizable_simd_clone_call (vinfo, stmt_info, gsi, &vec_stmt,
 					   slp_node, NULL);
-      stmt = gsi_stmt (*gsi);
       break;
 
     case reduc_vec_info_type:
@@ -11310,41 +11302,6 @@ vect_transform_stmt (vec_info *vinfo,
     gcc_assert (!vec_stmt
 		&& STMT_VINFO_VEC_STMT (stmt_info) == old_vec_stmt_info);
 
-  /* Handle inner-loop stmts whose DEF is used in the loop-nest that
-     is being vectorized, but outside the immediately enclosing loop.  */
-  if (vec_stmt
-      && nested_p
-      && STMT_VINFO_TYPE (stmt_info) != reduc_vec_info_type
-      && (STMT_VINFO_RELEVANT (stmt_info) == vect_used_in_outer
-          || STMT_VINFO_RELEVANT (stmt_info) ==
-                                           vect_used_in_outer_by_reduction))
-    {
-      class loop *innerloop = LOOP_VINFO_LOOP (loop_vinfo)->inner;
-      imm_use_iterator imm_iter;
-      use_operand_p use_p;
-      tree scalar_dest;
-
-      if (dump_enabled_p ())
-        dump_printf_loc (MSG_NOTE, vect_location,
-                         "Record the vdef for outer-loop vectorization.\n");
-
-      /* Find the relevant loop-exit phi-node, and reord the vec_stmt there
-        (to be used when vectorizing outer-loop stmts that use the DEF of
-        STMT).  */
-      if (gimple_code (stmt) == GIMPLE_PHI)
-        scalar_dest = PHI_RESULT (stmt);
-      else
-        scalar_dest = gimple_get_lhs (stmt);
-
-      FOR_EACH_IMM_USE_FAST (use_p, imm_iter, scalar_dest)
-	if (!flow_bb_inside_loop_p (innerloop, gimple_bb (USE_STMT (use_p))))
-	  {
-	    stmt_vec_info exit_phi_info
-	      = vinfo->lookup_stmt (USE_STMT (use_p));
-	    STMT_VINFO_VEC_STMT (exit_phi_info) = vec_stmt;
-	  }
-    }
-
   if (vec_stmt)
     STMT_VINFO_VEC_STMT (stmt_info) = vec_stmt;


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [gcc(refs/users/guojiufu/heads/guojiufu-branch)] Remove dead code
@ 2020-06-10  3:50 Jiu Fu Guo
  0 siblings, 0 replies; 2+ messages in thread
From: Jiu Fu Guo @ 2020-06-10  3:50 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:ec34277611416aacdfdf3b8469b8e6ed43f623e6

commit ec34277611416aacdfdf3b8469b8e6ed43f623e6
Author: Richard Biener <rguenther@suse.de>
Date:   Tue Jun 9 18:23:22 2020 +0200

    Remove dead code
    
    This removes dead code left over from the reduction vectorization
    refactoring last year.
    
    2020-06-09  Richard Biener  <rguenther@suse.de>
    
            * tree-vect-loop.c (vectorizable_induction): Remove dead code.

Diff:
---
 gcc/tree-vect-loop.c | 42 ------------------------------------------
 1 file changed, 42 deletions(-)

diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index f2c52ae1909..5329982e4c9 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -7373,11 +7373,6 @@ vectorizable_induction (loop_vec_info loop_vinfo,
   unsigned i;
   tree expr;
   gimple_seq stmts;
-  imm_use_iterator imm_iter;
-  use_operand_p use_p;
-  gimple *exit_phi;
-  edge latch_e;
-  tree loop_arg;
   gimple_stmt_iterator si;
 
   gphi *phi = dyn_cast <gphi *> (stmt_info->stmt);
@@ -7485,9 +7480,6 @@ vectorizable_induction (loop_vec_info loop_vinfo,
   if (dump_enabled_p ())
     dump_printf_loc (MSG_NOTE, vect_location, "transform induction phi.\n");
 
-  latch_e = loop_latch_edge (iv_loop);
-  loop_arg = PHI_ARG_DEF_FROM_EDGE (phi, latch_e);
-
   step_expr = STMT_VINFO_LOOP_PHI_EVOLUTION_PART (stmt_info);
   gcc_assert (step_expr != NULL_TREE);
   tree step_vectype = get_same_sized_vectype (TREE_TYPE (step_expr), vectype);
@@ -7872,40 +7864,6 @@ vectorizable_induction (loop_vec_info loop_vinfo,
 	}
     }
 
-  if (nested_in_vect_loop)
-    {
-      /* Find the loop-closed exit-phi of the induction, and record
-         the final vector of induction results:  */
-      exit_phi = NULL;
-      FOR_EACH_IMM_USE_FAST (use_p, imm_iter, loop_arg)
-        {
-	  gimple *use_stmt = USE_STMT (use_p);
-	  if (is_gimple_debug (use_stmt))
-	    continue;
-
-	  if (!flow_bb_inside_loop_p (iv_loop, gimple_bb (use_stmt)))
-	    {
-	      exit_phi = use_stmt;
-	      break;
-	    }
-        }
-      if (exit_phi)
-	{
-	  stmt_vec_info stmt_vinfo = loop_vinfo->lookup_stmt (exit_phi);
-	  /* FORNOW. Currently not supporting the case that an inner-loop induction
-	     is not used in the outer-loop (i.e. only outside the outer-loop).  */
-	  gcc_assert (STMT_VINFO_RELEVANT_P (stmt_vinfo)
-		      && !STMT_VINFO_LIVE_P (stmt_vinfo));
-
-	  STMT_VINFO_VEC_STMT (stmt_vinfo) = new_stmt_info;
-	  if (dump_enabled_p ())
-	    dump_printf_loc (MSG_NOTE, vect_location,
-			     "vector of inductions after inner-loop:%G",
-			     new_stmt);
-	}
-    }
-
-
   if (dump_enabled_p ())
     dump_printf_loc (MSG_NOTE, vect_location,
 		     "transform induction: created def-use cycle: %G%G",


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-06-10  3:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-10  3:50 [gcc(refs/users/guojiufu/heads/guojiufu-branch)] Remove dead code Jiu Fu Guo
2020-06-10  3:50 Jiu Fu Guo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).