On Wed, 2024-07-24 at 02:59 -0500, Thor Preimesberger via Gcc wrote:
> 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. 

FWIW if you're working with gcc/json.h I just pushed various
improvements; see:
  https://gcc.gnu.org/pipermail/gcc-patches/2024-July/658194.html

In particular:
  https://gcc.gnu.org/pipermail/gcc-patches/2024-July/658195.html
saves me a *lot* of typing in gdb when debugging json stuff.

Hope this is helpful
Dave

Reply via email to