From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 46262 invoked by alias); 3 Sep 2019 10:27:58 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 46095 invoked by uid 89); 3 Sep 2019 10:27:58 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-10.3 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,KAM_ASCII_DIVIDERS,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 03 Sep 2019 10:27:56 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 73BDEAD46 for ; Tue, 3 Sep 2019 10:27:54 +0000 (UTC) Date: Tue, 03 Sep 2019 10:27:00 -0000 From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: [PATCH] Remove dead code Message-ID: User-Agent: Alpine 2.20 (LSU 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-SW-Source: 2019-09/txt/msg00100.txt.bz2 I am testing the following. Richard. 2019-09-03 Richard Biener * 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,