From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30105 invoked by alias); 6 Aug 2014 17:19:33 -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 29772 invoked by uid 89); 6 Aug 2014 17:19:31 -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:19:29 +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 s76HJRPK008115 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 6 Aug 2014 13:19:27 -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 s76HJ2oI030913; Wed, 6 Aug 2014 13:19:27 -0400 From: David Malcolm To: gcc-patches@gcc.gnu.org Cc: David Malcolm Subject: [PATCH 042/236] try_split returns an rtx_insn Date: Wed, 06 Aug 2014 17:19:00 -0000 Message-Id: <1407345815-14551-43-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/msg00501.txt.bz2 gcc/ * rtl.h (try_split): Strengthen return type from rtx to rtx_insn *. * emit-rtl.c (try_split): Likewise, also for locals "before" and "after". For now, don't strengthen param "trial", which requires adding checked casts when returning it. --- gcc/emit-rtl.c | 12 ++++++------ gcc/rtl.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index b64b276..05b787b 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -3538,11 +3538,11 @@ mark_label_nuses (rtx x) replacement insn depending on the value of LAST. Otherwise, it returns TRIAL. If the insn to be returned can be split, it will be. */ -rtx +rtx_insn * try_split (rtx pat, rtx trial, int last) { - rtx before = PREV_INSN (trial); - rtx after = NEXT_INSN (trial); + rtx_insn *before = PREV_INSN (trial); + rtx_insn *after = NEXT_INSN (trial); int has_barrier = 0; rtx note, seq, tem; int probability; @@ -3552,7 +3552,7 @@ try_split (rtx pat, rtx trial, int last) /* We're not good at redistributing frame information. */ if (RTX_FRAME_RELATED_P (trial)) - return trial; + return as_a (trial); if (any_condjump_p (trial) && (note = find_reg_note (trial, REG_BR_PROB, 0))) @@ -3572,7 +3572,7 @@ try_split (rtx pat, rtx trial, int last) } if (!seq) - return trial; + return as_a (trial); /* Avoid infinite loop if any insn of the result matches the original pattern. */ @@ -3581,7 +3581,7 @@ try_split (rtx pat, rtx trial, int last) { if (INSN_P (insn_last) && rtx_equal_p (PATTERN (insn_last), pat)) - return trial; + return as_a (trial); if (!NEXT_INSN (insn_last)) break; insn_last = NEXT_INSN (insn_last); diff --git a/gcc/rtl.h b/gcc/rtl.h index a97a81e..f28a62a 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -2442,7 +2442,7 @@ extern rtx delete_related_insns (rtx); extern rtx *find_constant_term_loc (rtx *); /* In emit-rtl.c */ -extern rtx try_split (rtx, rtx, int); +extern rtx_insn *try_split (rtx, rtx, int); extern int split_branch_probability; /* In unknown file */ -- 1.8.5.3