This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: SIMPLE: A language-independent tree IR
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 ;-)
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. 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.
--
Fergus Henderson <fjh@cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.