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: SIMPLE: A language-independent tree IR


On Tue, 2002-01-08 at 22:17, Fergus Henderson wrote:
> On 07-Jan-2002, Diego Novillo <dnovillo@redhat.com> wrote:
> > On Mon, 2002-01-07 at 04:45, Fergus Henderson wrote:
> > > Just to clarify:
> > > 
> > > 	The idea of a language-independent tree IR in which all side-effects
> > > 	are *_STMT nodes rather than *_EXPR nodes ("SIMPLE trees") sounds fine,
> > > 	but I don't think language front-ends should use that tree IR;
> > > 	instead they should generate a different form of tree IR
> > > 	which allows *_EXPR nodes with side effects ("INITIAL trees")
> > > 	and then some language-independent pass can convert from
> > > 	INITIAL trees to SIMPLE trees.
> > > 
> > > Is that what you all had in mind?
> >
> > Absolutely.
> > 
> > Front-ends generate their own trees.  A subsequent pass converts those
> > into li-trees.  This pass will be very similar to the current tree->rtl
> > pass.
> 
> Hmm, you say "Absolutely", but then what you write below it seems to
> differ a little from what I said ;-)
> 
Indeed.  My apologies.  I completely mis-read what you were proposing.


> In particular you seem to be suggesting that the INITIAL trees be
> language-dependent, and that there be some language-dependent pass that
> converts them into language-independent SIMPLE trees.
>
Yes.  The idea is to preserve the status quo of the existing
front-ends.  Let them generate ld-trees.  An additional pass will
simplify them and make them language-independent.


> But I think there
> should be a language-independent tree form at a higher level than SIMPLE
> trees; either the INITIAL trees should be language-independent (as I
> implied above), or there should be another language-independent form of
> trees that is used after the INITIAL trees but before the SIMPLE trees.
> 
Now I think I understand what you're proposing.  I'm not sure I can find
specific advantages of having the INITIAL trees be language-independent.
Do you have anything specific in mind?


Sorry for confusing things.


Diego.


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