From patchwork Wed Aug 6 17:21:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Malcolm X-Patchwork-Id: 377256 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 A2DBF14001A for ; Thu, 7 Aug 2014 04:05:23 +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=LPgumzvpGIFV76p5n7o62hV0tdhKWsTwlRHnBVlzF9p6KXWL50dFa w4N8sQo9AXzpHt9La07s6FaL7AC0AwiCtHLExYwFrHHru5OYb+XeRIFxIIEn8H29 Uwb5S4HsdHIyXPF63sLCss3jlEdWumZJCRlV50kgslgQrzQbvz1HDo= 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=+o4F1n3P3CyNnjAXxM5NV7q3B70=; b=vq7ZncCb/My/mp5ZsIsy ticKjzQS4b6d9r4FUFfm9BgkdplVBd+ypVlcK9lKl5PXao0QTe6eZ3h3QG1I/kvu Vo/cK/RaXIQ7i/2qTSYyEwaKgg95SQojHoeWzdkMWug6PSxHFurBnAX9aNLkZZYV 0IYtFXck1xpFRpe4ZGeZiso= Received: (qmail 25000 invoked by alias); 6 Aug 2014 17:43:10 -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 24926 invoked by uid 89); 6 Aug 2014 17:43:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (208.118.235.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 06 Aug 2014 17:43:09 +0000 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XF4tj-0001PI-Cz for gcc-patches@gcc.gnu.org; Wed, 06 Aug 2014 13:21:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:22679) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XF4tj-0001OG-4m for gcc-patches@gcc.gnu.org; Wed, 06 Aug 2014 13:21:11 -0400 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 s76HK9rA005844 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 6 Aug 2014 13:20:10 -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 s76HJ2pV030913; Wed, 6 Aug 2014 13:20:09 -0400 From: David Malcolm To: gcc-patches@gcc.gnu.org Cc: David Malcolm Subject: [PATCH 115/236] sel-sched-ir.c: Use rtx_insn Date: Wed, 6 Aug 2014 13:21:34 -0400 Message-Id: <1407345815-14551-116-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-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 X-IsSubscribed: yes gcc/ * sel-sched-ir.c (vinsn_copy): Strengthen local "copy" from rtx to rtx_insn *. (speculate_expr): Likewise for locals "orig_insn_rtx", "spec_insn_rtx". (eq_transformed_insns): Likewise for locals "i1", "i2". (check_for_new_jump): Likewise for return type and local "end". (find_new_jump): Likewise for return type and local "jump". (sel_split_edge): Likewise for local "jump". (sel_create_recovery_block): Likewise. (sel_redirect_edge_and_branch_force): Likewise. (sel_redirect_edge_and_branch): Likewise. --- gcc/sel-sched-ir.c | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/gcc/sel-sched-ir.c b/gcc/sel-sched-ir.c index f51f4f3..9e9abad 100644 --- a/gcc/sel-sched-ir.c +++ b/gcc/sel-sched-ir.c @@ -1246,7 +1246,7 @@ vinsn_create (insn_t insn, bool force_unique_p) vinsn_t vinsn_copy (vinsn_t vi, bool reattach_p) { - rtx copy; + rtx_insn *copy; bool unique = VINSN_UNIQUE_P (vi); vinsn_t new_vi; @@ -1962,7 +1962,7 @@ int speculate_expr (expr_t expr, ds_t ds) { int res; - rtx orig_insn_rtx; + rtx_insn *orig_insn_rtx; rtx spec_pat; ds_t target_ds, current_ds; @@ -1983,7 +1983,8 @@ speculate_expr (expr_t expr, ds_t ds) case 1: { - rtx spec_insn_rtx = create_insn_rtx_from_pattern (spec_pat, NULL_RTX); + rtx_insn *spec_insn_rtx = + create_insn_rtx_from_pattern (spec_pat, NULL_RTX); vinsn_t spec_vinsn = create_vinsn_from_insn_rtx (spec_insn_rtx, false); change_vinsn_in_expr (expr, spec_vinsn); @@ -2830,8 +2831,10 @@ hash_transformed_insns (const void *p) static int eq_transformed_insns (const void *p, const void *q) { - rtx i1 = VINSN_INSN_RTX (((const struct transformed_insns *) p)->vinsn_old); - rtx i2 = VINSN_INSN_RTX (((const struct transformed_insns *) q)->vinsn_old); + rtx_insn *i1 = + VINSN_INSN_RTX (((const struct transformed_insns *) p)->vinsn_old); + rtx_insn *i2 = + VINSN_INSN_RTX (((const struct transformed_insns *) q)->vinsn_old); if (INSN_UID (i1) == INSN_UID (i2)) return 1; @@ -5439,10 +5442,10 @@ sel_split_block (basic_block bb, rtx after) /* If BB ends with a jump insn whose ID is bigger then PREV_MAX_UID, return it. Otherwise returns NULL. */ -static rtx +static rtx_insn * check_for_new_jump (basic_block bb, int prev_max_uid) { - rtx end; + rtx_insn *end; end = sel_bb_end (bb); if (end && INSN_UID (end) >= prev_max_uid) @@ -5452,10 +5455,10 @@ check_for_new_jump (basic_block bb, int prev_max_uid) /* Look for a new jump either in FROM_BB block or in newly created JUMP_BB block. New means having UID at least equal to PREV_MAX_UID. */ -static rtx +static rtx_insn * find_new_jump (basic_block from, basic_block jump_bb, int prev_max_uid) { - rtx jump; + rtx_insn *jump; /* Return immediately if no new insns were emitted. */ if (get_max_uid () == prev_max_uid) @@ -5478,7 +5481,7 @@ sel_split_edge (edge e) { basic_block new_bb, src, other_bb = NULL; int prev_max_uid; - rtx jump; + rtx_insn *jump; src = e->src; prev_max_uid = get_max_uid (); @@ -5541,7 +5544,7 @@ sel_create_recovery_block (insn_t orig_insn) { basic_block first_bb, second_bb, recovery_block; basic_block before_recovery = NULL; - rtx jump; + rtx_insn *jump; first_bb = BLOCK_FOR_INSN (orig_insn); if (sel_bb_end_p (orig_insn)) @@ -5592,7 +5595,7 @@ sel_redirect_edge_and_branch_force (edge e, basic_block to) { basic_block jump_bb, src, orig_dest = e->dest; int prev_max_uid; - rtx jump; + rtx_insn *jump; int old_seqno = -1; /* This function is now used only for bookkeeping code creation, where @@ -5636,7 +5639,7 @@ sel_redirect_edge_and_branch (edge e, basic_block to) bool latch_edge_p; basic_block src, orig_dest = e->dest; int prev_max_uid; - rtx jump; + rtx_insn *jump; edge redirected; bool recompute_toporder_p = false; bool maybe_unreachable = single_pred_p (orig_dest);