From patchwork Sat May 2 21:01:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tbsaunde+gcc@tbsaunde.org X-Patchwork-Id: 467343 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 A20A11402B4 for ; Sun, 3 May 2015 07:05:22 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass reason="1024-bit key; unprotected key" header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=HviExSYq; dkim-adsp=none (unprotected policy); dkim-atps=neutral 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:subject:date:message-id:in-reply-to:references; q=dns; s= default; b=ZgwRaOLVWCehFQMlBtdyH13ZdGiITCWkZ9NJ1bVyz+uNUcByg9m6x Ytri0kwNZqPXXbzVKS998UfIZF71ienDYnisIiuy1lP9FfDcJdtRgiF6mMugj6ti mf3Xauc0F/zTO76Vx649nhjcukfXl+vakcq9WerCgAXWZEmU+VViv0= 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:subject:date:message-id:in-reply-to:references; s=default; bh=WJ/zH96ttAstnd0ZexEH0zoV8vk=; b=HviExSYqJw9l6FBwuwO0Gjbp1+yG 7LA91JgOImj2so0OhtWOQGE1hfr1vRBd0bYZD/cNfK8gEiGWzmCLEZyxsxHRn9M2 Dola75b+h8ZVlnJBScxmfdysRZnIm17pP+IwPIpHjMd6F4fJX83v8kh/pAfKUa+3 r3oLS9AmqX3xO4g= Received: (qmail 23246 invoked by alias); 2 May 2015 21:02:39 -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 23159 invoked by uid 89); 2 May 2015 21:02:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.3 required=5.0 tests=AWL, BAYES_05, KAM_LAZY_DOMAIN_SECURITY, T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: paperclip.tbsaunde.org Received: from tbsaunde.org (HELO paperclip.tbsaunde.org) (66.228.47.254) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 02 May 2015 21:02:38 +0000 Received: from iceball.corp.tor1.mozilla.com (unknown [23.233.68.71]) by paperclip.tbsaunde.org (Postfix) with ESMTPSA id BFCC9C072 for ; Sat, 2 May 2015 21:02:37 +0000 (UTC) From: tbsaunde+gcc@tbsaunde.org To: gcc-patches@gcc.gnu.org Subject: [PATCH 13/13] make emit_partition_copy return a rtx_insn * Date: Sat, 2 May 2015 17:01:43 -0400 Message-Id: <1430600503-14069-14-git-send-email-tbsaunde+gcc@tbsaunde.org> In-Reply-To: <1430600503-14069-1-git-send-email-tbsaunde+gcc@tbsaunde.org> References: <1430600503-14069-1-git-send-email-tbsaunde+gcc@tbsaunde.org> X-IsSubscribed: yes From: Trevor Saunders gcc/ChangeLog: 2015-05-02 Trevor Saunders * tree-outof-ssa.c (emit_partition_copy): Return rtx_insn *. (insert_partition_copy_on_edge): Adjust. (insert_rtx_to_part_on_edge): Likewise. (insert_part_to_rtx_on_edge): Likewise. --- gcc/ChangeLog | 7 +++++++ gcc/tree-outof-ssa.c | 31 +++++++++++++------------------ 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ea48607..56d9d5d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,12 @@ 2015-05-02 Trevor Saunders + * tree-outof-ssa.c (emit_partition_copy): Return rtx_insn *. + (insert_partition_copy_on_edge): Adjust. + (insert_rtx_to_part_on_edge): Likewise. + (insert_part_to_rtx_on_edge): Likewise. + +2015-05-02 Trevor Saunders + * function.c (set_return_jump_label): Change type of argument to rtx_insn *. * function.h (set_return_jump_label): Adjust. diff --git a/gcc/tree-outof-ssa.c b/gcc/tree-outof-ssa.c index e6310cd..e23bc0b 100644 --- a/gcc/tree-outof-ssa.c +++ b/gcc/tree-outof-ssa.c @@ -242,11 +242,9 @@ set_location_for_edge (edge e) SRC/DEST might be BLKmode memory locations SIZEEXP is a tree from which we deduce the size to copy in that case. */ -static inline rtx +static inline rtx_insn * emit_partition_copy (rtx dest, rtx src, int unsignedsrcp, tree sizeexp) { - rtx seq; - start_sequence (); if (GET_MODE (src) != VOIDmode && GET_MODE (src) != GET_MODE (dest)) @@ -259,7 +257,7 @@ emit_partition_copy (rtx dest, rtx src, int unsignedsrcp, tree sizeexp) else emit_move_insn (dest, src); - seq = get_insns (); + rtx_insn *seq = get_insns (); end_sequence (); return seq; @@ -271,7 +269,6 @@ static void insert_partition_copy_on_edge (edge e, int dest, int src, source_location locus) { tree var; - rtx seq; if (dump_file && (dump_flags & TDF_DETAILS)) { fprintf (dump_file, @@ -291,10 +288,10 @@ insert_partition_copy_on_edge (edge e, int dest, int src, source_location locus) set_curr_insn_location (locus); var = partition_to_var (SA.map, src); - seq = emit_partition_copy (copy_rtx (SA.partition_to_pseudo[dest]), - copy_rtx (SA.partition_to_pseudo[src]), - TYPE_UNSIGNED (TREE_TYPE (var)), - var); + rtx_insn *seq = emit_partition_copy (copy_rtx (SA.partition_to_pseudo[dest]), + copy_rtx (SA.partition_to_pseudo[src]), + TYPE_UNSIGNED (TREE_TYPE (var)), + var); insert_insn_on_edge (seq, e); } @@ -365,7 +362,6 @@ static void insert_rtx_to_part_on_edge (edge e, int dest, rtx src, int unsignedsrcp, source_location locus) { - rtx seq; if (dump_file && (dump_flags & TDF_DETAILS)) { fprintf (dump_file, @@ -387,9 +383,9 @@ insert_rtx_to_part_on_edge (edge e, int dest, rtx src, int unsignedsrcp, mems. Usually we give the source. As we result from SSA names the left and right size should be the same (and no WITH_SIZE_EXPR involved), so it doesn't matter. */ - seq = emit_partition_copy (copy_rtx (SA.partition_to_pseudo[dest]), - src, unsignedsrcp, - partition_to_var (SA.map, dest)); + rtx_insn *seq = emit_partition_copy (copy_rtx (SA.partition_to_pseudo[dest]), + src, unsignedsrcp, + partition_to_var (SA.map, dest)); insert_insn_on_edge (seq, e); } @@ -401,7 +397,6 @@ static void insert_part_to_rtx_on_edge (edge e, rtx dest, int src, source_location locus) { tree var; - rtx seq; if (dump_file && (dump_flags & TDF_DETAILS)) { fprintf (dump_file, @@ -420,10 +415,10 @@ insert_part_to_rtx_on_edge (edge e, rtx dest, int src, source_location locus) set_curr_insn_location (locus); var = partition_to_var (SA.map, src); - seq = emit_partition_copy (dest, - copy_rtx (SA.partition_to_pseudo[src]), - TYPE_UNSIGNED (TREE_TYPE (var)), - var); + rtx_insn *seq = emit_partition_copy (dest, + copy_rtx (SA.partition_to_pseudo[src]), + TYPE_UNSIGNED (TREE_TYPE (var)), + var); insert_insn_on_edge (seq, e); }