From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22532 invoked by alias); 26 Aug 2014 15:54:54 -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 22521 invoked by uid 89); 26 Aug 2014 15:54:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 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; Tue, 26 Aug 2014 15:54:53 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s7QFspJE006910 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 26 Aug 2014 11:54:51 -0400 Received: from c64.redhat.com (vpn-226-49.phx2.redhat.com [10.3.226.49]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s7QFsoUj026101; Tue, 26 Aug 2014 11:54:50 -0400 From: David Malcolm To: Jeff Law Cc: Richard Henderson , gcc-patches@gcc.gnu.org, David Malcolm Subject: [PATCH 0/3] Updated patches to eliminate need for rtx_expr_list::insn (was Re: [PATCH 221/236] Add insn method to rtx_expr_list) Date: Tue, 26 Aug 2014 15:54:00 -0000 Message-Id: <1409068812-3313-1-git-send-email-dmalcolm@redhat.com> In-Reply-To: <53FB4691.1080501@redhat.com> References: <53FB4691.1080501@redhat.com> X-IsSubscribed: yes X-SW-Source: 2014-08/txt/msg02410.txt.bz2 On Mon, 2014-08-25 at 08:22 -0600, Jeff Law wrote: On 08/19/14 14:41, Richard Henderson wrote: > > On 08/06/2014 10:23 AM, David Malcolm wrote: > >> gcc/ > >> * rtl.h (rtx_expr_list::insn): New method. > >> --- > >> gcc/rtl.h | 9 +++++++++ > >> 1 file changed, 9 insertions(+) > >> > >> diff --git a/gcc/rtl.h b/gcc/rtl.h > >> index d028be1..d5811c2 100644 > >> --- a/gcc/rtl.h > >> +++ b/gcc/rtl.h > >> @@ -414,6 +414,10 @@ public: > >> > >> /* Get at the underlying rtx. */ > >> rtx element () const; > >> + > >> + /* Get at the rtx, casting to rtx_insn *. */ > >> + rtx_insn *insn () const; > >> + > >> }; > >> > >> template <> > >> @@ -1287,6 +1291,11 @@ inline rtx rtx_expr_list::element () const > >> return XEXP (this, 0); > >> } > >> > >> +inline rtx_insn *rtx_expr_list::insn () const > >> +{ > >> + return as_a (XEXP (this, 0)); > >> +} > >> + > > > > Even with the current code base we aren't *supposed* to be putting insns into > > an EXPR_LIST -- that's what INSN_LIST is for. Note the horribleness with which > > anything doing this will have in the rtl dumps. > > > > Can we please fix these uses instead of adding this accessor? > I'd be OK with that as a follow-up. > > jeff It turned out there were two places in the tree where I was using the unloved rtx_expr_list::insn method: * nonlocal_goto_handler_labels * forced_labels. These are both currently EXPR_LIST, and both of them are set up by the patch series leading up to #221 to be rtx_expr_list. However, given that they contain CODE_LABELs and are handled as insns, presumably they should be INSN_LIST, rather than EXPR_LIST. So I had a go at cleaning this up. The first two patches take the place of patch #221, by converting them from EXPR_LIST to INSN_LIST, updating the relevant vars from rtx_expr_list * to rtx_insn_list *. The third patch is a rewrite of patch #222, using the new types. I've successfully bootstrapped each progressively on top of trunk+the relevant patches of the patch series (trunk is currently at #171, so thats #172-#220). OK for trunk? David Malcolm (3): Convert nonlocal_goto_handler_labels from an EXPR_LIST to an INSN_LIST Convert forced_labels from an EXPR_LIST to an INSN_LIST Use rtx_insn in more places in dwarf2cfi.c gcc/builtins.c | 2 +- gcc/cfgbuild.c | 8 ++++---- gcc/cfgrtl.c | 6 +++--- gcc/dwarf2cfi.c | 33 +++++++++++++++++---------------- gcc/except.c | 2 +- gcc/function.h | 6 +++--- gcc/jump.c | 6 +++--- gcc/reload1.c | 12 ++++++------ gcc/rtl.h | 1 + gcc/rtlanal.c | 29 +++++++++++++++++++++++++++++ gcc/stmt.c | 10 +++++----- 11 files changed, 73 insertions(+), 42 deletions(-) -- 1.8.5.3