On Tue, Jul 17, 2012 at 9:40 AM, Bernhard Reutner-Fischer
<rep.dot....@gmail.com> wrote:
> s/anem/name/g

Good catch.

>>>         * tree-cfg.c (gimple_can_merge_blocks_p): Use EDGE_COMPLEX.
>
> I take it you added EDGE_ABNORMAL_CALL on purpose?

Yes.  I don't think it matters in practice because such edges will
have EDGE_EH or EDGE_ABNORMAL set also, but this flag does belong to
the set.


>>>         (dump_bb_info): Removed and re-incarnated in cfg.c.
>
> +      if (flags & TDF_COMMENT)
> +       fputs (";; ", outf);
>
> This emits an ugly trailing space, perhaps we can remove this now?

The old code had this too:

-  fprintf (outf, ";;%s basic block %d, loop depth %d, count ",

It's necessary to guarantee there's always a space between ";;" and
whatever follows next, also with ident==0.

So I've not change this.


> +         fprintf (outf, "%s prev block ", s_indent);
> +         if (bb->prev_bb)
> +           fprintf (outf, "%d, ", bb->prev_bb->index);
> +         else
> +           fprintf (outf, "(nil), ");
> +         fprintf (outf, "next block ");
> +         if (bb->next_bb)
> +           fprintf (outf, "%d", bb->next_bb->index);
> +
> +         fputs (", flags:", outf);
>
> This looks like it could emit oddly spaced output, think
> "next block , flags:\n".

This was missing for the next_bb case:
> +         else
> +           fprintf (outf, "(nil), ");

Fixed that before commit.


> It would be nice to alway have the required spaces _before_ the
> actual string in this function, imho.

Most of the function comes from old cfgrtl.c:dump_bb_info, and bits
from old gimple-pretty-print.c:dump_bb_header. I'm not really
interested in making the dumps pretty. Just complete and correct is a
good start. Aesthetically, all dumps are ugly, but I admit that some
dumps are more ugly than others. Patches welcome ;-)

Thanks for your review!

Ciao!
Steven

Reply via email to