public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <rguenther@suse.de>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH] Remove dead code
Date: Tue, 9 Jun 2020 16:01:56 +0200 (CEST)	[thread overview]
Message-ID: <nycvar.YFH.7.76.2006091601360.4397@zhemvz.fhfr.qr> (raw)

This removes dead code that was left over from the reduction
vectorization refactoring last year.

Bootstrapped / tested on x86_64-unknown-linux-gnu, applied.

Richard.

2020-06-09  Richard Biener  <rguenther@suse.de>

	* tree-vect-stmts.c (vect_transform_stmt): Remove dead code.
---
 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;
 
-- 
2.25.1

             reply	other threads:[~2020-06-09 14:01 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-09 14:01 Richard Biener [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-11-08  8:45 Martin Liška
2021-11-08  8:59 ` Jakub Jelinek
2021-11-08 14:19   ` Jeff Law
2021-11-12 14:27     ` Martin Liška
2021-11-12 14:41       ` H.J. Lu
2021-11-12 14:44         ` Martin Liška
2021-11-12 15:00           ` H.J. Lu
2021-11-12 19:14         ` Richard Biener
2021-11-12 19:18           ` H.J. Lu
2021-11-12 19:52             ` Richard Biener
2020-06-09 16:24 Richard Biener
2019-09-18 12:42 Richard Biener
2019-09-03 10:27 Richard Biener
2015-05-04 11:50 Dominik Vogt
2015-05-04 17:13 ` Jeff Law
2013-01-16 14:51 Richard Biener

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=nycvar.YFH.7.76.2006091601360.4397@zhemvz.fhfr.qr \
    --to=rguenther@suse.de \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).