From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 70394 invoked by alias); 12 Oct 2016 10:50:14 -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 70380 invoked by uid 89); 12 Oct 2016 10:50:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:646, oof 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 ESMTP; Wed, 12 Oct 2016 10:50:12 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D4E7785540 for ; Wed, 12 Oct 2016 10:50:11 +0000 (UTC) Received: from localhost.localdomain (vpn1-7-139.ams2.redhat.com [10.36.7.139]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u9CAoAXH028216; Wed, 12 Oct 2016 06:50:11 -0400 Subject: Re: [PATCH] print_rtx_function: integrate dumping of the CFG into the insn chain To: David Malcolm , gcc-patches@gcc.gnu.org References: <0f83ea7f-136b-0b66-9068-f693e7b2f8d9@redhat.com> <1476270943-53751-1-git-send-email-dmalcolm@redhat.com> From: Bernd Schmidt Message-ID: Date: Wed, 12 Oct 2016 10:50:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <1476270943-53751-1-git-send-email-dmalcolm@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016-10/txt/msg00851.txt.bz2 On 10/12/2016 01:15 PM, David Malcolm wrote: > +/* Determine if INSN is of a kind that can have a basic block. */ > + > +static bool > +can_have_basic_block_p (const rtx_insn *insn) > +{ > + return GET_RTX_FORMAT (GET_CODE (insn))[2] == 'B'; > +} Oof. I suppose they're all at least that long, but still - we're looking only for barriers, right? Might be better to encode this expectation using an assert, like so: rtx_code code = GET_CODE (insn); if (code == BARRIER) return false; gcc_assert (GET_RTX_FORMAT (code)[2] == 'B'); Otherwise, nice, and ok. Bernd