This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Preparatory PATCH for pretty-print
- From: Diego Novillo <dnovillo at redhat dot com>
- To: Devang Patel <dpatel at apple dot com>
- Cc: Gabriel Dos Reis <gdr at integrable-solutions dot net>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: 30 Jul 2002 09:05:11 -0400
- Subject: Re: Preparatory PATCH for pretty-print
- References: <D716C79E-A379-11D6-9D1A-00039362EF82@apple.com>
On Tue, 2002-07-30 at 01:04, Devang Patel wrote:
>
> On Monday, July 29, 2002, at 06:06 PM, Gabriel Dos Reis wrote:
>
> > The goal actually is two-fold: (1) make it possible to visualize the
> > effects of various tree-level transformations on program sources;
> > (2) improve the C/C++ diagnostics reporter.
>
> Mike Stump explained me what it is and it's primary use (2).
> But, I am more interested in (1) goal.
>
If you take a look at tree-ssa-20020619-branch, you will find an earlier
version of the pretty printer that is used for this purpose. If you
compile with the switch -fdump-tree-all-ssa, you get an output dump
after each tree transformation.
The initial idea is to be able to diff successive dumps to visualize
what changed in each stage.
> > Well, the intent isn't to build an "indent"-clone into GCC although
>
> That's what I was afraid of, hence I asked the question.
>
So far we have found it tricky to produce compilable code. The problem
is pointer arithmetic. The parser turns offsets into byte offsets. At
the moment, the pretty printer just prints byte offsets. There are
other tree nodes (like SAVE_EXPRs or nodes for complex types) that the
parser builds that we just print out as-is.
Diego.