From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22761 invoked by alias); 21 Aug 2014 07:50:58 -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 22686 invoked by uid 89); 21 Aug 2014 07:50:57 -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; Thu, 21 Aug 2014 07:50:56 +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 s7L7otVr005118 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 21 Aug 2014 03:50:55 -0400 Received: from [10.3.225.122] (vpn-225-122.phx2.redhat.com [10.3.225.122]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s7L7osYB027169; Thu, 21 Aug 2014 03:50:54 -0400 Message-ID: <1408607264.2473.162.camel@surprise> Subject: Re: [PATCH 040/236] Use rtx_insn internally within generated functions From: David Malcolm To: Jeff Law Cc: gcc-patches@gcc.gnu.org Date: Thu, 21 Aug 2014 07:50:00 -0000 In-Reply-To: <53EBA868.9050204@redhat.com> References: <1407345815-14551-1-git-send-email-dmalcolm@redhat.com> <1407345815-14551-41-git-send-email-dmalcolm@redhat.com> <53EBA868.9050204@redhat.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-08/txt/msg02087.txt.bz2 On Wed, 2014-08-13 at 12:03 -0600, Jeff Law wrote: > On 08/06/14 11:20, David Malcolm wrote: > > With this patch, "insn" and "curr_insn" as used from C++ fragments in .md > > files are strengthened from rtx to rtx_insn *, allowing numerous > > target-specific functions to have their params be similiar strengthened. > > > > The top-level interfaces ("recog", "split", "peephole2") continue to take > > a plain rtx for "insn", to avoid introducing dependencies on other > > patches. > > > > gcc/ > > * recog.h (insn_output_fn): Update this function typedef to match > > the changes below to the generated output functions, strengthening > > the 2nd param from rtx to rtx_insn *. > > > > * final.c (get_insn_template): Add a checked cast to rtx_insn * on > > insn when invoking an output function, to match the new signature > > of insn_output_fn with a stronger second param. > > > > * genconditions.c (write_header): In the generated code for > > gencondmd.c, strengthen the global "insn" from rtx to rtx_insn * > > to match the other changes in this patch. > > > > * genemit.c (gen_split): Strengthen the 1st param "curr_insn" of > > the generated "gen_" functions from rtx to rtx_insn * within their > > implementations. > > > > * genrecog.c (write_subroutine): Strengthen the 2nd param "insn" of > > the subfunctions within the generated "recog_", "split", "peephole2" > > function trees from rtx to rtx_insn *. For now, the top-level > > generated functions ("recog", "split", "peephole2") continue to > > take a plain rtx for "insn", to avoid introducing dependencies on > > other patches. Rename this 2nd param from "insn" to > > "uncast_insn", and reintroduce "insn" as a local variable of type > > rtx_insn *, initialized at the top of the generated function with > > a checked cast on "uncast_insn". > > (make_insn_sequence): Strengthen the 1st param "curr_insn" of > > the generated "gen_" functions from rtx to rtx_insn * within their > > prototypes. > > > > * genoutput.c (process_template): Strengthen the 2nd param within > > the generated "output_" functions "insn" from rtx to rtx_insn *. > OK. Thanks; bootstrapped and committed to trunk as r214257, with a trivial fixup of the as_a_nullable to safe_as_a.