From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28476 invoked by alias); 15 Aug 2014 22:39:04 -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 28466 invoked by uid 89); 15 Aug 2014 22:39:04 -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,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: smtp.mozilla.org Received: from mx2.corp.phx1.mozilla.com (HELO smtp.mozilla.org) (63.245.216.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 15 Aug 2014 22:39:02 +0000 Received: from tsaunders-iceball.corp.tor1.mozilla.com (unknown [64.213.68.131]) (Authenticated sender: tsaunders@mozilla.com) by mx2.mail.corp.phx1.mozilla.com (Postfix) with ESMTPSA id 56014F22AE; Fri, 15 Aug 2014 15:39:00 -0700 (PDT) Date: Fri, 15 Aug 2014 22:39:00 -0000 From: Trevor Saunders To: Jeff Law Cc: David Malcolm , gcc-patches@gcc.gnu.org Subject: Re: [PATCH 204/236] final.c: Use rtx_sequence Message-ID: <20140815223848.GA6268@tsaunders-iceball.corp.tor1.mozilla.com> References: <1407345815-14551-1-git-send-email-dmalcolm@redhat.com> <1407345815-14551-205-git-send-email-dmalcolm@redhat.com> <53EE88B1.3090505@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <53EE88B1.3090505@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2014-08/txt/msg01641.txt.bz2 On Fri, Aug 15, 2014 at 04:24:49PM -0600, Jeff Law wrote: > On 08/06/14 11:23, David Malcolm wrote: > >gcc/ > > * final.c (get_attr_length_1): Replace GET_CODE check with a > > dyn_cast, introducing local "seq" and the use of methods of > > rtx_sequence. > > (shorten_branches): Likewise, introducing local "body_seq". > > Strengthen local "inner_insn" from rtx to rtx_insn *. > > (reemit_insn_block_notes): Replace GET_CODE check with a > > dyn_cast, strengthening local "body" from rtx to rtx_sequence *. > > Use methods of rtx_sequence. > > (final_scan_insn): Likewise, introducing local "seq" for when > > "body" is known to be a SEQUENCE, using its methods. > So presumably a dyn_cast isn't terribly expensive here? I guess I'm a bit > fuzzy on whether or not we agreed to allow using dynamic casts?!? Doesn't > that have to check the RTTI info which I would think would be considerably > more expensive than just checking the code. Or am I missing something here? your missing dyn_cast != dynamic_cast, the first is just a wrapper around as_a / is_a, and so doesn't use rtti. Trev > > Jeff >