This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFC/PATCH] Minor tree dump file simplification


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
--

Attachment: patchD.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]