From patchwork Wed Aug 6 17:21:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Malcolm X-Patchwork-Id: 377132 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id D676F1400AA for ; Thu, 7 Aug 2014 03:30:52 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references; q=dns; s= default; b=fDOgf+bBUFy87ZRSMeyWapVDNJ+wXVZQtHL+ZFbqvBYmgsZIBJLeC FxtfLw3MzDxKr2lNgtczkLxCzgwTWOwOiYob+5iditDY7pTw7TIQ/WXiUP2waqtc 64xpKzFJ0e0C49Vf2N/8L+GD8LUuyeG1+HLEcnYLGMvB6SGs9hVAXQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references; s= default; bh=LPui7BQbI4PGSA0xhfoeJpD4FZk=; b=S+zw7vmHL3CYOk0nbQsX at0o8+z1Vqsq1uAUyTUWkb+VqrElqOocEVoWCu8TJtPREhSCBcFdAwyMh1DdoaA3 F7l8tfxjuvWcUS+y8GsaemnxmMhoq5A+3hUbyxNMo4IRks7Ay8buQ84i3lqAX/Xf /grcSCAyMvVfNIpVN98CREQ= Received: (qmail 4284 invoked by alias); 6 Aug 2014 17:20:34 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 3268 invoked by uid 89); 6 Aug 2014 17:20:23 -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:20:22 +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 s76HKJIP024565 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 6 Aug 2014 13:20:19 -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 s76HJ2pm030913; Wed, 6 Aug 2014 13:20:19 -0400 From: David Malcolm To: gcc-patches@gcc.gnu.org Cc: David Malcolm Subject: [PATCH 132/236] config/epiphany: Use rtx_insn Date: Wed, 6 Aug 2014 13:21:51 -0400 Message-Id: <1407345815-14551-133-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 gcc/ * config/epiphany/epiphany-protos.h (epiphany_final_prescan_insn): Strengthen first param "insn" from rtx to rtx_insn *. * config/epiphany/epiphany.c (epiphany_final_prescan_insn): Likewise. (frame_insn): Likewise for return type. Introduce local "insn" for use in place of local "x" for use as an rtx_insn *. (frame_move_insn): Strengthen return type from rtx to rtx_insn *. (epiphany_expand_prologue): Likewise for local "insn". * config/epiphany/mode-switch-use.c (insert_uses): Likewise. * config/epiphany/resolve-sw-modes.c (pass_resolve_sw_modes::execute): Likewise for locals "insn" and "seq". --- gcc/config/epiphany/epiphany-protos.h | 2 +- gcc/config/epiphany/epiphany.c | 20 +++++++++++--------- gcc/config/epiphany/mode-switch-use.c | 2 +- gcc/config/epiphany/resolve-sw-modes.c | 5 +++-- 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/gcc/config/epiphany/epiphany-protos.h b/gcc/config/epiphany/epiphany-protos.h index bfa4802..de2ea40 100644 --- a/gcc/config/epiphany/epiphany-protos.h +++ b/gcc/config/epiphany/epiphany-protos.h @@ -27,7 +27,7 @@ extern struct rtx_def *gen_compare_reg (enum machine_mode, enum rtx_code, #endif /* Declarations for various fns used in the .md file. */ -extern void epiphany_final_prescan_insn (rtx, rtx *, int); +extern void epiphany_final_prescan_insn (rtx_insn *, rtx *, int); extern bool epiphany_is_long_call_p (rtx); extern bool epiphany_small16 (rtx); bool epiphany_uninterruptible_p (tree decl); diff --git a/gcc/config/epiphany/epiphany.c b/gcc/config/epiphany/epiphany.c index 598f61b..1f0bba1 100644 --- a/gcc/config/epiphany/epiphany.c +++ b/gcc/config/epiphany/epiphany.c @@ -75,7 +75,7 @@ static tree epiphany_handle_forwarder_attribute (tree *, tree, tree, int, bool *); static bool epiphany_pass_by_reference (cumulative_args_t, enum machine_mode, const_tree, bool); -static rtx frame_insn (rtx); +static rtx_insn *frame_insn (rtx); /* defines for the initialization of the GCC target structure. */ #define TARGET_ATTRIBUTE_TABLE epiphany_attribute_table @@ -1439,7 +1439,7 @@ epiphany_print_operand_address (FILE *file, rtx addr) } void -epiphany_final_prescan_insn (rtx insn ATTRIBUTE_UNUSED, +epiphany_final_prescan_insn (rtx_insn *insn ATTRIBUTE_UNUSED, rtx *opvec ATTRIBUTE_UNUSED, int noperands ATTRIBUTE_UNUSED) { @@ -1544,11 +1544,12 @@ frame_subreg_note (rtx set, int offset) return set; } -static rtx +static rtx_insn * frame_insn (rtx x) { int i; rtx note = NULL_RTX; + rtx_insn *insn; if (GET_CODE (x) == PARALLEL) { @@ -1583,14 +1584,14 @@ frame_insn (rtx x) note = gen_rtx_PARALLEL (VOIDmode, gen_rtvec (2, frame_subreg_note (x, 0), frame_subreg_note (x, UNITS_PER_WORD))); - x = emit_insn (x); - RTX_FRAME_RELATED_P (x) = 1; + insn = emit_insn (x); + RTX_FRAME_RELATED_P (insn) = 1; if (note) - add_reg_note (x, REG_FRAME_RELATED_EXPR, note); - return x; + add_reg_note (insn, REG_FRAME_RELATED_EXPR, note); + return insn; } -static rtx +static rtx_insn * frame_move_insn (rtx to, rtx from) { return frame_insn (gen_rtx_SET (VOIDmode, to, from)); @@ -1818,7 +1819,8 @@ epiphany_expand_prologue (void) register save. */ if (current_frame_info.last_slot >= 0) { - rtx ip, mem2, insn, note; + rtx ip, mem2, note; + rtx_insn *insn; gcc_assert (current_frame_info.last_slot != GPR_FP || (!current_frame_info.need_fp diff --git a/gcc/config/epiphany/mode-switch-use.c b/gcc/config/epiphany/mode-switch-use.c index cc80d10..b3f2b86 100644 --- a/gcc/config/epiphany/mode-switch-use.c +++ b/gcc/config/epiphany/mode-switch-use.c @@ -49,7 +49,7 @@ insert_uses (void) for (e = N_ENTITIES - 1; e >= 0; e--) { int no_mode = num_modes[e]; - rtx insn; + rtx_insn *insn; int mode; if (!OPTIMIZE_MODE_SWITCHING (e)) diff --git a/gcc/config/epiphany/resolve-sw-modes.c b/gcc/config/epiphany/resolve-sw-modes.c index f65fe2a..b89f708 100644 --- a/gcc/config/epiphany/resolve-sw-modes.c +++ b/gcc/config/epiphany/resolve-sw-modes.c @@ -78,7 +78,8 @@ unsigned pass_resolve_sw_modes::execute (function *fun) { basic_block bb; - rtx insn, src; + rtx_insn *insn; + rtx src; vec todo; sbitmap pushed; bool need_commit = false; @@ -156,7 +157,7 @@ pass_resolve_sw_modes::execute (function *fun) FOR_EACH_EDGE (e, ei, bb->succs) { basic_block succ = e->dest; - rtx seq; + rtx_insn *seq; if (!REGNO_REG_SET_P (DF_LIVE_IN (succ), jilted_reg)) continue;