This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Language-independent functions-as-trees representation
Jason Merrill writes:
> >>>>> "Diego" == Diego Novillo <dnovillo@redhat.com> writes:
>
> > On Sat, 20 Jul 2002, Jason Merrill wrote:
> >> I'd like to return to the discussion of a language-independent
> >> functions-as-trees representation that was going on in January. At this
> >> point I'd like to ignore the question of representation within a particular
> >> frontend (INITIAL?), and focus on what the frontend hands off to the
> >> middle-end (GENERIC?) and the simplified form which is used in
> >> optimization (SIMPLE).
> >>
> > I'm curious about GENERIC. Currently we are making each front
> > end do an INITIAL->SIMPLE pass via the simplify_function_tree
> > hook. What advantage do you see in having INITIAL->GENERIC->SIMPLE?
>
> Modularity, mainly. The idea is that by the time we get to the
> simplification stage there won't be any language-specific trees to worry
> about.
>
> On the other hand, going from INITIAL to GENERIC will use a lot of the same
> functionality as from GENERIC to SIMPLE, so perhaps it would be simpler
> just to go straight to SIMPLE, using a langhook to handle language-specific
> trees.
>
> Any other opinions?
WRT Java, It's not clear to me whether going from INITIAL to GENERIC
will be much easier than going from INITIAL to SIMPLE. It certainly
could be, but that depends on the design of GENERIC. If it is easier
then I'm in favour; the less language-specific code the better.
Andrew.