From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31587 invoked by alias); 25 Aug 2014 17:22:03 -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 31567 invoked by uid 89); 25 Aug 2014 17:22:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 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; Mon, 25 Aug 2014 17:22:01 +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 s7PHLxV3032133 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 25 Aug 2014 13:21:59 -0400 Received: from stumpy.slc.redhat.com (ovpn-113-40.phx2.redhat.com [10.3.113.40]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s7PHLwnF021961; Mon, 25 Aug 2014 13:21:59 -0400 Message-ID: <53FB70B6.7080100@redhat.com> Date: Mon, 25 Aug 2014 17:22: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: Trevor Saunders CC: David Malcolm , gcc-patches@gcc.gnu.org Subject: Re: [PATCH 204/236] final.c: Use rtx_sequence References: <1407345815-14551-1-git-send-email-dmalcolm@redhat.com> <1407345815-14551-205-git-send-email-dmalcolm@redhat.com> <53EE88B1.3090505@redhat.com> <20140815223848.GA6268@tsaunders-iceball.corp.tor1.mozilla.com> In-Reply-To: <20140815223848.GA6268@tsaunders-iceball.corp.tor1.mozilla.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-08/txt/msg02340.txt.bz2 On 08/15/14 16:38, Trevor Saunders wrote: > 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. Ah. Nevermind my concerns then :-) jeff