[patch] RFA: slim RTL printing cleanups

Richard Biener richard.guenther@gmail.com
Tue Nov 27 13:07:00 GMT 2012


On Tue, Nov 27, 2012 at 12:20 AM, Steven Bosscher <stevenb.gcc@gmail.com> wrote:
> Hello,
>
> This patch performs some necessary TLC on slim RTL printing in sched-vis.c:
>
> * Make it independent of the scheduler. Actually it already was,
> mostly. This patch completes the job.
>
> * Harmonize dumping templates for INSN_UID.
>
> * Always print the pattern of a CALL_INSN.
>
> * Don't print "jump" for sched dumps only.
>
> * Harmonize function names:
>   - print_* print to a "char *" buffer
>   - dump_* print to a given "FILE *"
>   - debug_* print to stderr.
>
> Some of the ideas come from Richard S.'s
> http://gcc.gnu.org/ml/gcc-patches/2012-11/msg00284.html.
>
> The next patch addresses a bigger problem: The print_* variants should
> use something better than a fixed-size buffer. I plan to use
> pretty-print. An obstack would also work; but I'd like to keep one
> layer of abstraction between the file output and the printers, so that
> users can post-process the string if necessary (the case I'm thinking
> of, is the graph dumpers, which need to escape some characters before
> writing to a file). Any thoughts on this from anyone?
>
> Bootstrapped&tested on powerpc64-unknown-linux-gnu. OK for trunk?
> (Yes, I know it's stage3, but look at it this way: the patch does no
> harm, and good dumps help for debugging real bugs ;-)

Ok!

Thanks,
Richard.

> Ciao!
> Steven



More information about the Gcc-patches mailing list