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 18:24:31 +0200 (CEST)	[thread overview]
Message-ID: <nycvar.YFH.7.76.2006091824140.4397@zhemvz.fhfr.qr> (raw)

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

Bootstrapped on x86_64-unknown-linux-gnu, testing in progress.

Richard.

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

	* tree-vect-loop.c (vectorizable_induction): Remove dead code.
---
 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",
-- 
2.25.1

             reply	other threads:[~2020-06-09 16:24 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-09 16:24 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 14:01 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.2006091824140.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).