From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14616 invoked by alias); 6 Aug 2014 17:22:07 -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 12331 invoked by uid 89); 6 Aug 2014 17:21:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 06 Aug 2014 17:21:46 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s76HLDFX013178 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 6 Aug 2014 13:21:13 -0400 Received: from c64.redhat.com (vpn-239-139.phx2.redhat.com [10.3.239.139]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s76HJ2rM030913; Wed, 6 Aug 2014 13:21:13 -0400 From: David Malcolm To: gcc-patches@gcc.gnu.org Cc: David Malcolm Subject: [PATCH 226/236] Delete find_last_value Date: Wed, 06 Aug 2014 17:22:00 -0000 Message-Id: <1407345815-14551-227-git-send-email-dmalcolm@redhat.com> In-Reply-To: <1407345815-14551-1-git-send-email-dmalcolm@redhat.com> References: <1407345815-14551-1-git-send-email-dmalcolm@redhat.com> X-IsSubscribed: yes X-SW-Source: 2014-08/txt/msg00568.txt.bz2 Nothing in the tree appears to use this. gcc/ * rtl.h (find_last_value): Delete. * rtlanal.c (find_last_value): Delete. --- gcc/rtl.h | 1 - gcc/rtlanal.c | 46 ---------------------------------------------- 2 files changed, 47 deletions(-) diff --git a/gcc/rtl.h b/gcc/rtl.h index 613d06c..8cdb88d 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -2745,7 +2745,6 @@ extern rtx single_set_2 (const_rtx, const_rtx); extern int multiple_sets (const_rtx); extern int set_noop_p (const_rtx); extern int noop_move_p (const_rtx); -extern rtx find_last_value (rtx, rtx *, rtx, int); extern int refers_to_regno_p (unsigned int, unsigned int, const_rtx, rtx *); extern int reg_overlap_mentioned_p (const_rtx, const_rtx); extern const_rtx set_of (const_rtx, const_rtx); diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index 46a5fc1..6429906 100644 --- a/gcc/rtlanal.c +++ b/gcc/rtlanal.c @@ -1274,52 +1274,6 @@ noop_move_p (const_rtx insn) } -/* Return the last thing that X was assigned from before *PINSN. If VALID_TO - is not NULL_RTX then verify that the object is not modified up to VALID_TO. - If the object was modified, if we hit a partial assignment to X, or hit a - CODE_LABEL first, return X. If we found an assignment, update *PINSN to - point to it. ALLOW_HWREG is set to 1 if hardware registers are allowed to - be the src. */ - -rtx -find_last_value (rtx x, rtx *pinsn, rtx valid_to, int allow_hwreg) -{ - rtx p; - - for (p = PREV_INSN (*pinsn); p && !LABEL_P (p); - p = PREV_INSN (p)) - if (INSN_P (p)) - { - rtx set = single_set (p); - rtx note = find_reg_note (p, REG_EQUAL, NULL_RTX); - - if (set && rtx_equal_p (x, SET_DEST (set))) - { - rtx src = SET_SRC (set); - - if (note && GET_CODE (XEXP (note, 0)) != EXPR_LIST) - src = XEXP (note, 0); - - if ((valid_to == NULL_RTX - || ! modified_between_p (src, PREV_INSN (p), valid_to)) - /* Reject hard registers because we don't usually want - to use them; we'd rather use a pseudo. */ - && (! (REG_P (src) - && REGNO (src) < FIRST_PSEUDO_REGISTER) || allow_hwreg)) - { - *pinsn = p; - return src; - } - } - - /* If set in non-simple way, we don't have a value. */ - if (reg_set_p (x, p)) - break; - } - - return x; -} - /* Return nonzero if register in range [REGNO, ENDREGNO) appears either explicitly or implicitly in X other than being stored into. -- 1.8.5.3