Sure - we actually already emit json in optinfo-emit-json.cc, and there are implementations of json and pretty-printing/dumping it out also. I got a hacky version of our current raw dump working with json objects, but using the functions and data structures in tree-dump.* "as is" would require further processing of the dump's output (and I think some further modification) in order to make linking related nodes possible - I think, at least. This seems expensive computationally, so I'm currently re-implementing the function dump_generic_nodes from tree-pretty-print.cc so that it emits JSON instead. tree-dump.cc doesn't currently handle all the current tree codes in dequeue_and_dump. This approach does unfortunately lead us to having another spot in the code base that needs to be synced with the tree data structure. (I didn't take a long look at tree-streamer* to see if anything there would be helpful, but it looks like we'd have to enumerate over the codes anyways to get JSON output.)
No patch yet - I'll submit one once the JSON dumping is ready, and others that process it as appropriate. I've been pushing to get as much done before Wednesday, so I'll have to get around to pushing onto the git fork what I've done so far tomorrow / later today. I wanna emphasize that I started a bit late on this since my academic term didn't end until around a month after the coding period began. We've already extended the project to accommodate for that, but it places the mid point review to three weeks in a project that is expected to take 12 weeks. We can still address the rate of progress if you still feel trepidacious about the pace of things. Thor On Mon, Jul 22, 2024 at 3:26 AM Richard Biener <richard.guent...@gmail.com> wrote: > > Hi, > > we're having our bi-weekly call this Wednesday; I'd like to see you write a > summary of what you were doing for the first half of the project and post > that to me and the GCC mailing list. Please also send, if appropriate, a > patch that shows what you have done sofar. > > Thanks a lot, > Richard.