This is the mail archive of the
mailing list for the GCC project.
Re: XML dumping and GraphViz/VCG in the GCC ast-optimizer-branch
On Tue, Oct 15, 2002 at 11:04:52AM -0700, James Michael DuPont wrote:
> Now, if we look at the problem of communication, how can the gcc safely
> communicate the asts to the vcg for layout.
> You will see that any form of communcation is subject to a
> man-in-the-middle attack that can dump the data out to a pipe.
> Now you also need the ability to focus the results on something
> visible, to search and filter the ast nodes. Others will want to
> transform the trees selecting certain attributes and turning those
> into graph nodes.
> If the asts are put into an libxml dom structure, those transformations
> can be done by a simple xslt style sheet, or perl script linked in, and
> the passed on to the visualizer, all without leaving main memory.
> So you see that to do anything usefull with this information, it must
> run the risk to be intercepted.
This is silly.
The relevant policy goal of the FSF in this context is to prevent
people from writing front ends, optimization modules, or back ends for
GCC which are not free software. Rendering the AST, or the CFG, or
whatever, in a form suitable for graphing will not facilitate any of
these goals. In fact, we already *have* code to generate VCG graphs
from the debugging dumps.
So just write your graph to a file in whatever format seems sensible
to you. (We are unlikely to take the patch if it is a format readable
only by proprietary software, but then until just now that was true of
the existing graph dumper.)