On Tue, Dec 4, 2012 at 9:14 PM, Xinliang David Li wrote: > I assume the graph dump does not support multiple function dump (I > noticed that the previous function's dump gets overwritten). This > reminds me that I need to resurrect my per-function dump support, and > dump-before/after patches at some point.
Not sure what you mean with "multiple function dump"...? What my dumper does, is dump each function as a subgraph. If you dump a translation unit with more than one function, all function graphs will be in the same file. With a good DOT viewer, it's still quite readable. I have a perl scriptlet in the pipe line to split one DOT file into per-function DOT files, and to merge per-function DOT files from different passes. > Why can't the dot dumper dump the count/frequency/branch prob > information? The attached dot file is generated from an assembly file > dumped with -S -dA option. It can, and should. I just didn't get around to that yet. I want to add the count//freq/branchprob as edge labels, similar to your dump. I also want to add it to the basic blocks as well but I'm not sure how to pretty-print it such that it doesn't clobber the view of the instructions contained in the basic block. Unfortunately DOT doesn't support edge classes or layers you can toggle. I even had the dumper print the GIMPLE SSA web and DF DU/UD chains, using ports on the fields in the record nodes that I use for dumping the instructions. But that really cluttered the graph too much. I'm still going to add the ports, at least, to use in dumping the scheduler's dependence graph. The whole graph dumping infrastructure will get another overhaul for GCC 4.9 to make it easier to use for non-CFG dumps and to allow passes to add their own meta-data to the dumps. Ciao! Steven