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: Wed, 18 Sep 2019 12:42:00 -0000	[thread overview]
Message-ID: <nycvar.YFH.7.76.1909181441560.5566@zhemvz.fhfr.qr> (raw)


This removes dead code from the vectorizer and makes a function static.

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

Richard.

2019-09-18  Richard Biener  <rguenther@suse.de>

	* tree-vectorizer.h (get_initial_def_for_reduction): Remove.
	* tree-vect-loop.c (get_initial_def_for_reduction): Make
	static.
	(vect_create_epilog_for_reduction): Remove dead code.

Index: gcc/tree-vect-loop.c
===================================================================
--- gcc/tree-vect-loop.c	(revision 275873)
+++ gcc/tree-vect-loop.c	(working copy)
@@ -4203,7 +4203,7 @@ vect_model_induction_cost (stmt_vec_info
 
    A cost model should help decide between these two schemes.  */
 
-tree
+static tree
 get_initial_def_for_reduction (stmt_vec_info stmt_vinfo, tree init_val,
                                tree *adjustment_def)
 {
@@ -4585,7 +4585,6 @@ vect_create_epilog_for_reduction (vec<tr
      (in case of SLP, do it for all the phis). */
 
   /* Get the loop-entry arguments.  */
-  enum vect_def_type initial_def_dt = vect_unknown_def_type;
   if (slp_node)
     {
       unsigned vec_num = SLP_TREE_NUMBER_OF_VEC_STMTS (slp_node);
@@ -4623,7 +4622,6 @@ vect_create_epilog_for_reduction (vec<tr
 	{
 	  /* Do not use an adjustment def as that case is not supported
 	     correctly if ncopies is not one.  */
-	  vect_is_simple_use (initial_def, loop_vinfo, &initial_def_dt);
 	  vec_initial_def = vect_get_vec_def_for_operand (initial_def,
 							  stmt_info);
 	}
Index: gcc/tree-vectorizer.h
===================================================================
--- gcc/tree-vectorizer.h	(revision 275873)
+++ gcc/tree-vectorizer.h	(working copy)
@@ -1645,7 +1645,6 @@ extern bool vectorizable_reduction (stmt
 extern bool vectorizable_induction (stmt_vec_info, gimple_stmt_iterator *,
 				    stmt_vec_info *, slp_tree,
 				    stmt_vector_for_cost *);
-extern tree get_initial_def_for_reduction (stmt_vec_info, tree, tree *);
 extern bool vect_worthwhile_without_simd_p (vec_info *, tree_code);
 extern int vect_get_known_peeling_cost (loop_vec_info, int, int *,
 					stmt_vector_for_cost *,

             reply	other threads:[~2019-09-18 12:42 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-18 12:42 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
2020-06-09 14:01 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.1909181441560.5566@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).