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]

Re: [patch] Rework RTL CFG graph dumping to dump DOT format


On Mon, Nov 26, 2012 at 4:46 PM, Richard Biener wrote:
> On Fri, Nov 23, 2012 at 10:46 AM, Steven Bosscher wrote:
>> Hello,
>>
>> The graph.[ch] code to dump the CFG for viewing with VCG is quite
>> broken and hasn't been updated to follow the advances in the CFG
>> infrastructure.
>>
>> The attached patch is the first in a series of patches I have planned
>> to update the CFG-as-graph dumping code to dump GraphViz DOT input
>> instead. The attached archive is an example input/output.
>>
>> There's still quite a lot of work to be done:
>> - use pretty-print in the slim RTL dumping
>> - move the escaped-string printing into pretty-print
>> - make the basic block content dumping a cfghook
>> - make these dumps work for GIMPLE also
>>
>> For the moment, this is a good starting point.
>>
>> Obviously there are no changes in code generation due to this patch,
>> so IMHO this patch (and the rest of the series) should be safe for
>> stage3. Hopefully everyone else agrees :-)
>>
>> Bootstrapped&tested on powerpc64-unknown-linux-gnu. OK for trunk?
>
> Hmm, you are removing an (appearant) abstraction that I didn't know was
> there but remember to have asked for in the thread for dumping a late
> callgraph for Ada purposes.  Is the abstraction not working or was it simply
> a hassle to keep the VCG path working (I don't thjnk I have ever seen a
> VCG consumer ... ;)).

I'm not sure what abstraction you mean. If you're talking about the
old graph.[ch], there's nothing abstract about it, it only dumps an
RTL CFG and, indeed, that wasn't working properly. The dumps were ugly
if they work at all. Each insn was dumped as a separate node and there
was no option to dump complete translation units to a single file (my
dumper does that just fine, it dumps each CFG as a disjoint subgraph).
(Some examples of what the dumps look like are attached to this
e-mail: http://gcc.gnu.org/ml/gcc-patches/2012-11/msg01977.html)

A generic graph dumping interface would be nice (graph_traits?) but
for the moment I'm just trying to make a debugging tool available.


> Btw, I of course have my own CFG dumper (producing graphviz input)
> in my local tree - attached for reference (I'm simply using it from
> gdb sessions).

I'll integrate this in my work for a follow-up patch. Well, if you'd
OK the one from this thread first, of course ;-)

Ciao!
Steven


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