This is the mail archive of the gcc@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]

Re: Semantics of -fdump-ast?


Diego Novillo wrote:
Sorry for the tardy reply

> I'm probably misinterpreting what invoke.texi says about
> -fdump-ast-<name>-<num>, but it looks as if the semantics for
> <num> are global to all the possible dump names.
Yes, primarily because it was the simplest thing to do.

> I would like to add various -fdump-ast names for the tree SSA
> passes, but I need 'num' to have different meanings according to
> the name used.  In particular, bit0 and bit1 as they're currently
> defined would be useless for the SSA or CFG dumps.
> 
> Is that feasible?  Thanks.
It's possible, but IMHO confusing. How about allocating new bits for
the functionality you want? How many flags are you anticipating? If
there are many, I'd suggest implementing name->value mapping machinery
in the option parsing, so you can say,
	-fdump-ast-optimized=3
	-fdump-ast-optimized=slim,address
	-fdump-ast-optimized=all
	-fdump-ast-optimized=christmas-tree // joke
and have the right thing happen.

nathan
-- 
Dr Nathan Sidwell   ::   http://www.codesourcery.com   ::   CodeSourcery LLC
         'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org


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