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]
Other format: [Raw text]

Re: [tree-ssa] Use of build_binary_op


On Thu, Sep 26, 2002 at 12:06:44PM +0200, Steven Bosscher wrote:
> Op do 26-09-2002, om 10:40 schreef Pop Sébastian:
> > 
> > G95 uses is_simple_* functions.  That means that for building valid trees 
> > they have to keep track of the lowering stuff as well, when they would
> > just need a generic tree interface.
> 
> Well, we mostly use them for debugging purposes, just to make sure that
> our tree is a valid SIMPLE tree. Only four or five of them are really
> necessary.
> 
> > I think that we have to define an interface on both lowered and 
> > non lowered GIMPLE.  Then we'd have:
> > - a build_* interface for front-end specific trees,
> > - a generic_build_* interface for building non lowered GIMPLE trees,
> > - a simple_build_* interface for transformations on lowered trees,
> > - an expand_* interface for translating GIMPLE to RTL,
> > (and get rid of genrtl_* interface that works on statements).
> 
> If the C-family front ends need a translation from C trees to GIMPLE,
> then why can't lowering of expressions be done on GIMPLE stmt trees.
> That way, the front ends can share the expression simplification
> interface, and they would only have to deal with side effects in
> language specific trees.
> 
> So we'd have:
> - a build_* interface for building generic trees
>   (goes/stays in tree.*)
I don't like this build_* interface since it has lot of constraints comming
from parsers.  I think we should define a new interface with a unique 
constraint: be generic.

> - a build_<lang>_* interface for language specific trees
>   (goes/stays in <lang>-tree.* and c-common.*).
ok.

> - a build_gimple_* interface for building GIMPLE stmt trees, that is,
>   expressions are *not* lowered here.
I'd like build_generic_*

> - a gimple_expand_* interface for lowering expressions in GIMPLE trees.
maybe generic_expand_*
or even generic_simplify_* 

> - a gimple_expand_body() to optimize a function body and expand to RTL.
yes, as an entry point in the middle/back-end.



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