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, 03 Sep 2019 10:27:00 -0000	[thread overview]
Message-ID: <alpine.LSU.2.20.1909031227300.32458@zhemvz.fhfr.qr> (raw)


I am testing the following.

Richard.

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

	* tree-ssa-sccvn.h (vn_nary_op_lookup): Remove.
	(vn_nary_op_insert): Likewise.
	* tree-ssa-sccvn.c (init_vn_nary_op_from_op): Remove.
	(vn_nary_op_lookup): Likewise.
	(vn_nary_op_insert): Likewise.

Index: gcc/tree-ssa-sccvn.c
===================================================================
--- gcc/tree-ssa-sccvn.c	(revision 275294)
+++ gcc/tree-ssa-sccvn.c	(working copy)
@@ -3325,20 +3408,6 @@ init_vn_nary_op_from_pieces (vn_nary_op_
   memcpy (&vno->op[0], ops, sizeof (tree) * length);
 }
 
-/* Initialize VNO from OP.  */
-
-static void
-init_vn_nary_op_from_op (vn_nary_op_t vno, tree op)
-{
-  unsigned i;
-
-  vno->opcode = TREE_CODE (op);
-  vno->length = TREE_CODE_LENGTH (TREE_CODE (op));
-  vno->type = TREE_TYPE (op);
-  for (i = 0; i < vno->length; ++i)
-    vno->op[i] = TREE_OPERAND (op, i);
-}
-
 /* Return the number of operands for a vn_nary ops structure from STMT.  */
 
 static unsigned int
@@ -3440,22 +3509,6 @@ vn_nary_op_lookup_pieces (unsigned int l
   return vn_nary_op_lookup_1 (vno1, vnresult);
 }
 
-/* Lookup OP in the current hash table, and return the resulting value
-   number if it exists in the hash table.  Return NULL_TREE if it does
-   not exist in the hash table or if the result field of the operation
-   is NULL. VNRESULT will contain the vn_nary_op_t from the hashtable
-   if it exists.  */
-
-tree
-vn_nary_op_lookup (tree op, vn_nary_op_t *vnresult)
-{
-  vn_nary_op_t vno1
-    = XALLOCAVAR (struct vn_nary_op_s,
-		  sizeof_vn_nary_op (TREE_CODE_LENGTH (TREE_CODE (op))));
-  init_vn_nary_op_from_op (vno1, op);
-  return vn_nary_op_lookup_1 (vno1, vnresult);
-}
-
 /* Lookup the rhs of STMT in the current hash table, and return the resulting
    value number if it exists in the hash table.  Return NULL_TREE if
    it does not exist in the hash table.  VNRESULT will contain the
@@ -3708,21 +3761,6 @@ vn_nary_op_get_predicated_value (vn_nary
   return NULL_TREE;
 }
 
-/* Insert OP into the current hash table with a value number of
-   RESULT.  Return the vn_nary_op_t structure we created and put in
-   the hashtable.  */
-
-vn_nary_op_t
-vn_nary_op_insert (tree op, tree result)
-{
-  unsigned length = TREE_CODE_LENGTH (TREE_CODE (op));
-  vn_nary_op_t vno1;
-
-  vno1 = alloc_vn_nary_op (length, result, VN_INFO (result)->value_id);
-  init_vn_nary_op_from_op (vno1, op);
-  return vn_nary_op_insert_into (vno1, valid_info->nary, true);
-}
-
 /* Insert the rhs of STMT into the current hash table with a value number of
    RESULT.  */
 
Index: gcc/tree-ssa-sccvn.h
===================================================================
--- gcc/tree-ssa-sccvn.h	(revision 275294)
+++ gcc/tree-ssa-sccvn.h	(working copy)
@@ -244,11 +244,9 @@ bool has_VN_INFO (tree);
 extern vn_ssa_aux_t VN_INFO (tree);
 tree vn_get_expr_for (tree);
 void scc_vn_restore_ssa_info (void);
-tree vn_nary_op_lookup (tree, vn_nary_op_t *);
 tree vn_nary_op_lookup_stmt (gimple *, vn_nary_op_t *);
 tree vn_nary_op_lookup_pieces (unsigned int, enum tree_code,
 			       tree, tree *, vn_nary_op_t *);
-vn_nary_op_t vn_nary_op_insert (tree, tree);
 vn_nary_op_t vn_nary_op_insert_pieces (unsigned int, enum tree_code,
 				       tree, tree *, tree, unsigned int);
 bool ao_ref_init_from_vn_reference (ao_ref *, alias_set_type, tree,

             reply	other threads:[~2019-09-03 10:27 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-03 10:27 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-18 12:42 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=alpine.LSU.2.20.1909031227300.32458@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).