Proposed standard scheme for maintainers' debugging code

Sebastian Pop sebastian.pop@cri.ensmp.fr
Wed Mar 17 18:11:00 GMT 2004


For my part, I like this approach.

Some developers prefer the debugging info to be exclusively written
into the dump_file when the compiler is asked for -fdump-...-details
or -stats or other.  Maybe all these -fdump-* flags could be handled
through a preprocessor as in your proposal.

Here is a basic condition that could be rewritten into a more
efficient one:

  if (tree_dump_file && (tree_dump_flags & TDF_STATS))
    dump_chrecs_stats (tree_dump_file);

vs.

  if (DEBUGGING (scev) && tree_dump_file && (tree_dump_flags & TDF_STATS))
    dump_chrecs_stats (tree_dump_file);

or even better: 

  if (DEBUGGING_STATS (scev))
    dump_chrecs_stats (tree_dump_file);



More information about the Gcc mailing list