[RFC/PATCH] Minor tree dump file simplification

roger@eyesopen.com roger@eyesopen.com
Wed Dec 20 18:19:00 GMT 2006


The following is a proposal to simplify and reduce the size of tree dump
files by omitting the output of the else branch of a COND_EXPR when it
only contains an empty statement.  Currently we produce large dump files
containing constructs like:

        if ((*temp.1)[count1.5])
          {
            (*a)[S.7 + D.916] = 1;
          }
        else
          {
            (void) 0;
          }

where the addditional four lines for the "(void) 0;" often make the
source slightly trickier to read, and personally provide little added
value.  One option might be to provide a new TDF_* option, so that those
folks that need to distinguish between NULL_TREE and IS_EMPTY_STMT aren't
inconvenienced.  However, I suspect no-one really cares, which is why I
post this RFC to double check.

The following patch has been tested on i686-pc-linux-gnu, with a full
"make bootstrap", all default languages including Ada, and regression
tested with a top-level "make -k check" with no new failures.

Any objections for mainline?  Thoughts?

2006-12-20  Roger Sayle  <roger@eyesopen.com>

        * tree-pretty-print.c (dump_generic_node): Avoid outputing "(void)
0;"
        as the else branch of a COND_EXPR.

Roger
--
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patchD.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20061220/641ef160/attachment.txt>


More information about the Gcc-patches mailing list