Re: [PATCH] JSON dumping for GENERIC trees

2024-09-13 Thread Richard Biener
On Fri, Sep 13, 2024 at 8:32 AM Thor Preimesberger wrote: > > > There are three oddities I immediately notice: > > > > The PLUS_EXPR operands are in a array "operands" while the RETURN_EXPR > > "operand" or "child pointer" is refered to from "return_expr". I think > > both are > > tcc_expression

Re: [PATCH] JSON dumping for GENERIC trees

2024-09-12 Thread Thor Preimesberger
> There are three oddities I immediately notice: > > The PLUS_EXPR operands are in a array "operands" while the RETURN_EXPR > "operand" or "child pointer" is refered to from "return_expr". I think both > are > tcc_expression trees and the operands are in exp.operands. Ideally the > JSON would mo

Re: [PATCH] JSON dumping for GENERIC trees

2024-09-12 Thread Richard Biener
On Thu, Sep 12, 2024 at 12:51 PM David Malcolm wrote: > > On Wed, 2024-09-11 at 20:49 -0500, tcpreimesber...@gmail.com wrote: > > From: Thor C Preimesberger > > > > This patch allows the compiler to dump GENERIC trees as JSON objects. > > > > The dump flag -fdump-tree-original-json dumps each fnd

Re: [PATCH] JSON dumping for GENERIC trees

2024-09-12 Thread Richard Biener
On Thu, Sep 12, 2024 at 4:04 AM Andrew Pinski wrote: > > On Wed, Sep 11, 2024 at 6:51 PM wrote: > > > > From: Thor C Preimesberger > > > > This patch allows the compiler to dump GENERIC trees as JSON objects. > > > > The dump flag -fdump-tree-original-json dumps each fndecl node in the > > C fro

Re: [PATCH] JSON dumping for GENERIC trees

2024-09-12 Thread David Malcolm
On Wed, 2024-09-11 at 20:49 -0500, tcpreimesber...@gmail.com wrote: > From: Thor C Preimesberger > > This patch allows the compiler to dump GENERIC trees as JSON objects. > > The dump flag -fdump-tree-original-json dumps each fndecl node in the > C frontend's gimplifier as a JSON object and trav

Re: [PATCH] JSON dumping for GENERIC trees

2024-09-11 Thread Andrew Pinski
On Wed, Sep 11, 2024 at 6:51 PM wrote: > > From: Thor C Preimesberger > > This patch allows the compiler to dump GENERIC trees as JSON objects. > > The dump flag -fdump-tree-original-json dumps each fndecl node in the > C frontend's gimplifier as a JSON object and traverses related nodes > in an