From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27860 invoked by alias); 8 Apr 2011 12:04:49 -0000 Received: (qmail 27851 invoked by uid 22791); 8 Apr 2011 12:04:48 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 08 Apr 2011 12:04:44 +0000 Received: from hpaq12.eem.corp.google.com (hpaq12.eem.corp.google.com [172.25.149.12]) by smtp-out.google.com with ESMTP id p38C4h5b031864 for ; Fri, 8 Apr 2011 05:04:43 -0700 Received: from ywa1 (ywa1.prod.google.com [10.192.1.1]) by hpaq12.eem.corp.google.com with ESMTP id p38C4f7a022939 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Fri, 8 Apr 2011 05:04:42 -0700 Received: by ywa1 with SMTP id 1so2901267ywa.25 for ; Fri, 08 Apr 2011 05:04:41 -0700 (PDT) Received: by 10.91.198.11 with SMTP id a11mr1844198agq.184.1302264280926; Fri, 08 Apr 2011 05:04:40 -0700 (PDT) Received: from [172.16.117.133] (dhcp-172-29-42-149.tor.corp.google.com [172.29.42.149]) by mx.google.com with ESMTPS id w6sm2874338anf.32.2011.04.08.05.04.40 (version=SSLv3 cipher=OTHER); Fri, 08 Apr 2011 05:04:40 -0700 (PDT) Message-ID: <4D9EF9D7.8090302@google.com> Date: Fri, 08 Apr 2011 12:04:00 -0000 From: Diego Novillo User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8 MIME-Version: 1.0 To: Xinliang David Li CC: GCC Patches Subject: Re: Simple enhancement to -dA dump References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-System-Of-Record: true X-IsSubscribed: yes 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 X-SW-Source: 2011-04/txt/msg00617.txt.bz2 On 04/03/2011 08:54 PM, Xinliang David Li wrote: > + > + fprintf (file, "# BLOCK %d", bb->index); > + if (bb->frequency) > + fprintf (file, " freq:%d", bb->frequency); > + if (bb->count) > + fprintf (file, " count:" HOST_WIDEST_INT_PRINT_DEC, > + bb->count); > + fprintf (file, " seq:%d", bb_seqn++); What is this sequence number useful for? > /* Output the insns. */ > for (insn = first; insn;) > { > @@ -1721,8 +1788,19 @@ final (rtx first, FILE *file, int optimi > insn_current_address = INSN_ADDRESSES (INSN_UID (insn)); > #endif /* HAVE_ATTR_length */ > > + dump_basic_block_info (file, insn); Pass start_to_bb, end_to_bb and bb_seqn++ as arguments. No need to have globals. You may want to convert start_to_bb and end_to_bb to VEC(), but in the way you're using them, it may not make much difference in clarity. > - if (flag_debug_asm) > - fprintf (asm_out_file, "\t%s basic block %d\n", > - ASM_COMMENT_START, NOTE_BASIC_BLOCK (insn)->index); > - There's a good number of test cases that use -dA. I suppose that removing this and adding the new output did not cause new regresions? OK with those changes. Diego.