[patch] Reorganization of dump flags

Zdenek Dvorak rakdver@kam.mff.cuni.cz
Wed Sep 26 17:16:00 GMT 2007


Hello,

> On 22-Sep-07, at 17:46 , Zdenek Dvorak wrote:
> 
> >Whether or not the information corresponding to a given dump keyword
> >will be shown may be specified by an option, e.g., if I would like to
> >see just scev-related information of medium importance or higher, I
> >would use
> >
> >-fdump-tree-all-scev/2
> 
> Wouldn't this be -fdump-tree-scev/2?

no -- "scev" determines the type of the information, while "all"
specifies the pass -- so I could also use

-fdump-tree-ivopts-scev/2
-fdump-tree-cunroll-scev/2
etc., if I only wanted to affect the dump files corresponding to the
concrete passes
(my main motivation is that I want to be able to say
-fdump-tree-ivopts-details-scev/0 and be able to understand
ivopt dumps again, without need to delete the scev analysis
information first).

> >Additionally, there are some options that do not specify what
> >information will be dumped, but affect its formating (TDF_BLOCKS,
> >TDF_VOPS, TDF_STMTADDR and such).  We do not use keywords for  
> >these, but
> >instead we just keep their bitmap as we do now (so they do not have  
> >the
> >four levels, they can be just on or off) -- I will call these "dump
> >qualifiers". This makes it possible to use the qualifiers in the same
> >way as it is done now, pass their sets as function arguments, alter it
> >locally, etc.  The dump flags that are only used internally (TDF_TREE,
> >TDF_RTL, ...) are handled the same way, except that we do not  
> >assign any
> >option for setting them.
> 
> Sorry, I'm lost.  You are saying that these qualifiers are specified  
> exactly as before?

yes.

> So, if I want medium-level details on scev and blocks and vops I say:
> 
> -fdump-tree-scev-blocks-vops/2?

-fdump-tree-name_of_the_pass-scev/2-blocks-vops

You cannot specify the level of details for blocks and vops -- they will
either be set or not, as they are qualifiers.

> I like the idea of this patch quite a bit, but I think that we need  
> to sanitize the syntax we use to specify dump options.  It's gotten  
> to be a bit bizarre. How about a more structured syntax?
> 
> -fdump-tree-<pass>[-level={0,1,2,3}][-options= 
> {blocks,vops,stmtaddr,...}]
>
> Where 'pass' is 'all' or any of the names of the individual passes we  
> have today.
> 'level' is one of the three levels of details that you introduced in  
> this patch.

I do not set levels for passes, only for the kinds of the information
(the keywords -- currently "optimization", "stats", "scev", "data_dep").

I can implement the more complicated syntax for specifying the options
that you propose; however, I would prefer to keep things simple and
compatible with the current state (so that I do not have to rewrite
hundreds of tests in the testsuite, and do not confuse everyone).

Zdenek



More information about the Gcc-patches mailing list