On Wed, May 10, 2017 at 08:51:22PM +0300, Alexander Monakov wrote: > On Wed, 10 May 2017, Richard Biener wrote: > > > On Tue, May 9, 2017 at 5:41 PM, Nathan Sidwell <nat...@acm.org> wrote: > > > -fdump-translation-unit is an inscrutably opaque dump. It turned out that > > > most of the uses of the tree-dump header file was to indirectly get at > > > dumpfile.h, and the dump_function entry point it had forwarded to a dumper > > > in tree-cfg.c. The gimple dumper would use its node dumper when asked > > > for a > > > raw dump, but that was about it. > > > > > > We have prettier printers now. This patch nukes the tu dumper. ok? > > > > Ok if nobody objects within 24 hours. > > There was a reasonable IMO objection on the IRC (sadly, I can't say the same > about the responses that person received from Nathan). > > A quick search indicates that people have published .tu parsers in Perl, JS > (producing json), the person objecting on IRC apparently used Python, and I'm > aware of another Python-based parser by Bruce Merry. > > My takeaway from this is that people cared enough about this to build and > publish parsers in their language of choice, and that apparently it is or was > feature-rich enough for them to use. Despite the format being undocumented > and > formally not supported. > > The motivation put forward in the opening mail ("is an inscutably opaque > dump") > seems like a weak reason for removal.
Can it at least be taken out of -fdump-tree-all? It is huge, often larger than the sum of all the other dump files, and don't remember ever using it for anything. Instead of trying to write a parser for it and reconstructing something you can then later analyze, isn't it better to just write a plugin that can analyze it directly? Jakub