This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] Fix function body estimation
> On Saturday 18 October 2003 6:01 pm, Steven Bosscher wrote:
> > Op za 18-10-2003, om 18:47 schreef Jan Hubicka:
> > > stupid question how does GENERIC differ from langauge specific trees
> > > when it still has language specific nodes?
> >
> > Dunno in general. For Fortran, we were happy that we can produce more
> > complex expressions than just "a = b op c" ;-)
>
> My impression was the GENERIC does not include language specific nodes. Ie.
> the C frontends never actually generate generic. They go straight from C
> trees to GIMPLE.
>
> Whereas fortran has its own parse trees, and generates GENERIC trees from
> those. Originally we did generate GIMPLE directly, but that was too much
> like hard work.
Yes, that is what I tought it is supposed to work.
>
> I'm not sure if it's still true, but the nearest I've heard to a definition
> of GENERIC is "Anything that's in tree.def".
I see, why do we genericize C trees by gimplifying it? Should not we
keep C nodes as they are and gimplify them when we are asked to
gimplify?
(It probably won't work directly, I attempted to call genericize hook
from cgraph_analyze_function instead from finish_function so we don't
genericize functions we never use and it didn't work dying in very
strange self referencing trees, not at all sure why)
Honza
>
> I struggle to see how any meaningful optimizations can be done on GENERIC if
> its definition includes language specific nodes.
>
> Paul