[ast-optimizer-branch] [patch]: SSA for trees

Daniel Berlin dan@cgsoftware.com
Mon Jul 23 13:08:00 GMT 2001


>> * should we call these files ast-foo.c, rather than tree-foo.c?
>>   tree-opt.h is a bad name (options or optimization), just ast.h
>>   would be fine I think.
>>
> Sure.  Similarly, should we change the internal identifiers that
> are now named tree_*?
If this is what should happen, i'll just let you do the commit, and redo my 
changes, rather than cause conflicts.
Unless you want me to do all the renames, too, which i'd be happy to.

However, I'm kinda against naming these things AST, when our tree 
structure, which it operates on, is named tree, not AST.
AST implies it works on any ol abstract syntax tree form. This is incorrect.
RTL is a form of AST as well (Trees just more directly reprsent the parse 
tree).
If we have a new middle level RTL, it'll be an AST too.

AST: A data structure representing something which has been parsed, often 
used as a compiler or interpreter's internal representation of a program 
while it is being optimised and from which code generation is performed. 
The range of all possible such structures is described by the abstract 
syntax.

These optimizations operate on trees, and thus, should be called tree 
optimizations.

You could argue RTL isn't an AST, using a different definition of AST (this 
one is from the free dictionary of online computing).  That would just 
further my point.  If it's confusing exactly what an AST is, we should make 
clear that these optimizations operate on the trees.

>
>
>> * optimize_tree is not a good name for an ssa specific optimization
>>
> OK.  I'll think of a better name.

Well, IMHO, optimize_tree is a good name for the main interface to 
optimizing trees.
It just shouldn't do ssa stuff unless flag_tree_opt_ssa is on.


>
>
> Diego.




More information about the Gcc-patches mailing list