On Fri, Apr 8, 2011 at 5:04 AM, Diego Novillo <dnovi...@google.com> wrote: > 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?
Keep track of the physical order of BBs laid out in the object file -- good for diagnosing bb reorder problems. > > >> /* 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. Those are used to keep global states, not for the purpose parameter passing. > > >> - 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? > No. The change has been in google's internal compiler for a long time. Thanks, David > > OK with those changes. > > > Diego. >