This is the mail archive of the 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: [tree-ssa] Organization of tree-ssa optimization passes

On Thu, Nov 27, 2003 at 02:41:19AM +0100, Zdenek Dvorak wrote:
> currently the information about the order of tree-ssa passes needs to be
> synchronized on three places (tree.h, tree-dump.c, tree-optimize.c); I
> believe it is a better idea to have this just on a single place, so that
> things like changing the order of passes or adding a new pass are
> easier.

The thing that I do not like about this is that it's all macro based.
I completely disbelieve that this is necessary.  Only the existing
poor structure of the current code leads you to believe that it is.

I would be more inclined to accept a structure in which a pass is
described by one struct that contains all of implementation function,
dump info, gateing flags and so forth.  This structure would be 
private to tree-optimize.c/toplev.c or wherever all of this nonsesnse
winds up.

In particular, I'll note that the mere existance of tree_dump_index
is a mistake.  Likewise for dump_files.  I'm not sure what to do about
flag_tree_foo, but I'd be surprised if we want a flag for *every* pass.
I think the fact that they currently exist has more to do with the fact
that it's all still experimental, and that makes it easy to figure out
if the new pass works and how well.

> 	* tree-must-alias.c (tree_compute_must_alias): Take a pointer to
> 	sbitmap as a parameter.
> 	* tree-ssa-ccp.c (tree_ssa_ccp): Ditto.
> 	* tree-ssa-dom.c (tree_ssa_dominator_optimize): Ditto.

More commonality in the interface to the passes themselves is welcome.


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