From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16871 invoked by alias); 13 Aug 2014 17:53:02 -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 16848 invoked by uid 89); 13 Aug 2014 17:52:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 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, 13 Aug 2014 17:52:55 +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 s7DHqrik017737 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 13 Aug 2014 13:52:54 -0400 Received: from stumpy.slc.redhat.com (ovpn-113-24.phx2.redhat.com [10.3.113.24]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s7DHqrIB002983; Wed, 13 Aug 2014 13:52:53 -0400 Message-ID: <53EBA5F5.40508@redhat.com> Date: Wed, 13 Aug 2014 17:53:00 -0000 From: Jeff Law User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0 MIME-Version: 1.0 To: David Malcolm , gcc-patches@gcc.gnu.org Subject: Re: [PATCH 032/236] emit_* functions return rtx_insn References: <1407345815-14551-1-git-send-email-dmalcolm@redhat.com> <1407345815-14551-33-git-send-email-dmalcolm@redhat.com> In-Reply-To: <1407345815-14551-33-git-send-email-dmalcolm@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-08/txt/msg01340.txt.bz2 On 08/06/14 11:20, David Malcolm wrote: > More scaffolding: strengthen the return types from the various emit_ > functions from rtx to rtx_insn * (or to the rtx_barrier * subclass in a > few cases). > > These will ultimately have their params strengthened also, but we > postpone that until much later in the patch series. So for now there > are also various checked casts to ensure we really got an insn when > returning such params back. > > Doing so requires a minor tweak to config/sh/sh.c > > gcc/ > * emit-rtl.h (emit_copy_of_insn_after): Strengthen return type > from rtx to rtx_insn *. > > * rtl.h (emit_insn_before): Likewise. > (emit_insn_before_noloc): Likewise. > (emit_insn_before_setloc): Likewise. > (emit_jump_insn_before): Likewise. > (emit_jump_insn_before_noloc): Likewise. > (emit_jump_insn_before_setloc): Likewise. > (emit_call_insn_before): Likewise. > (emit_call_insn_before_noloc): Likewise. > (emit_call_insn_before_setloc): Likewise. > (emit_debug_insn_before): Likewise. > (emit_debug_insn_before_noloc): Likewise. > (emit_debug_insn_before_setloc): Likewise. > (emit_label_before): Likewise. > (emit_insn_after): Likewise. > (emit_insn_after_noloc): Likewise. > (emit_insn_after_setloc): Likewise. > (emit_jump_insn_after): Likewise. > (emit_jump_insn_after_noloc): Likewise. > (emit_jump_insn_after_setloc): Likewise. > (emit_call_insn_after): Likewise. > (emit_call_insn_after_noloc): Likewise. > (emit_call_insn_after_setloc): Likewise. > (emit_debug_insn_after): Likewise. > (emit_debug_insn_after_noloc): Likewise. > (emit_debug_insn_after_setloc): Likewise. > (emit_label_after): Likewise. > (emit_insn): Likewise. > (emit_debug_insn): Likewise. > (emit_jump_insn): Likewise. > (emit_call_insn): Likewise. > (emit_label): Likewise. > (gen_clobber): Likewise. > (emit_clobber): Likewise. > (gen_use): Likewise. > (emit_use): Likewise. > (emit): Likewise. > > (emit_barrier_before): Strengthen return type from rtx to > rtx_barrier *. > (emit_barrier_after): Likewise. > (emit_barrier): Likewise. > > * emit-rtl.c (emit_pattern_before_noloc): Strengthen return type > from rtx to rtx_insn *. Add checked casts for now when converting > "last" from rtx to rtx_insn *. > (emit_insn_before_noloc): Likewise for return type. > (emit_jump_insn_before_noloc): Likewise. > (emit_call_insn_before_noloc): Likewise. > (emit_debug_insn_before_noloc): Likewise. > (emit_barrier_before): Strengthen return type and local "insn" > from rtx to rtx_barrier *. > (emit_label_before): Strengthen return type from rtx to > rtx_insn *. Add checked cast for now when returning param > (emit_pattern_after_noloc): Strengthen return type from rtx to > rtx_insn *. Add checked casts for now when converting "last" from > rtx to rtx_insn *. > (emit_insn_after_noloc): Strengthen return type from rtx to > rtx_insn *. > (emit_jump_insn_after_noloc): Likewise. > (emit_call_insn_after_noloc): Likewise. > (emit_debug_insn_after_noloc): Likewise. > (emit_barrier_after): Strengthen return type from rtx to > rtx_barrier *. > (emit_label_after): Strengthen return type from rtx to rtx_insn *. > Add checked cast for now when converting "label" from rtx to > rtx_insn *. > (emit_pattern_after_setloc): Strengthen return type from rtx to > rtx_insn *. Add checked casts for now when converting "last" from > rtx to rtx_insn *. > (emit_pattern_after): Strengthen return type from rtx to > rtx_insn *. > (emit_insn_after_setloc): Likewise. > (emit_insn_after): Likewise. > (emit_jump_insn_after_setloc): Likewise. > (emit_jump_insn_after): Likewise. > (emit_call_insn_after_setloc): Likewise. > (emit_call_insn_after): Likewise. > (emit_debug_insn_after_setloc): Likewise. > (emit_debug_insn_after): Likewise. > (emit_pattern_before_setloc): Likewise. Add checked casts for now > when converting "last" from rtx to rtx_insn *. > (emit_pattern_before): Strengthen return type from rtx to > rtx_insn *. > (emit_insn_before_setloc): Likewise. > (emit_insn_before): Likewise. > (emit_jump_insn_before_setloc): Likewise. > (emit_jump_insn_before): Likewise. > (emit_call_insn_before_setloc): Likewise. > (emit_call_insn_before): Likewise. > (emit_debug_insn_before_setloc): Likewise. > (emit_debug_insn_before): Likewise. > (emit_insn): Strengthen return type and locals "last", "insn", > "next" from rtx to rtx_insn *. Add checked cast to rtx_insn > within cases where we know we have an insn. > (emit_debug_insn): Likewise. > (emit_jump_insn): Likewise. > (emit_call_insn): Strengthen return type and local "insn" from rtx > to rtx_insn *. > (emit_label): Strengthen return type from rtx to rtx_insn *. Add > a checked cast to rtx_insn * for now on "label". > (emit_barrier): Strengthen return type from rtx to rtx_barrier *. > (emit_clobber): Strengthen return type from rtx to rtx_insn *. > (emit_use): Likewise. > (gen_use): Likewise, also for local "seq". > (emit): Likewise for return type and local "insn". > (rtx_insn): Likewise for return type and local "new_rtx". > > * cfgrtl.c (emit_barrier_after_bb): Strengthen local "barrier" > from rtx to rtx_barrier *. > > * config/sh/sh.c (output_stack_adjust): Since emit_insn has > changed return type from rtx to rtx_insn *, we must update > "emit_fn" type, and this in turn means updating... > (frame_insn): ...this. Strengthen return type from rtx to > rtx_insn *. Introduce a new local "insn" of the appropriate type. OK. This will require the obvious updates for the nullable change. jeff