This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Preparatory PATCH for pretty-print


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]