This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: proposal for compilation unil wide alias analyis
- From: Jan Hubicka <jh at suse dot cz>
- To: Diego Novillo <dnovillo at redhat dot com>
- Cc: Jan Hubicka <jh at suse dot cz>, Ken Zadeck <zadeck at naturalbridge dot com>,"gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>,Stuart Hastings <stuart at apple dot com>, Geoff Keating <geoffk at apple dot com>,Mark Mitchell <mark at codesourcery dot com>,Devang Patel <dpatel at apple dot com>, Daniel Berlin <dberlin at dberlin dot org>,David Edelsohn <dje at watson dot ibm dot com>,Dale Johannesen <dalej at apple dot com>, Ron Price <ronp at apple dot com>
- Date: Sat, 26 Jun 2004 12:40:03 +0200
- Subject: Re: proposal for compilation unil wide alias analyis
- References: <40DB07B2.1090108@naturalbridge.com> <20040625220852.GA17010@kam.mff.cuni.cz> <1088209471.17853.55.camel@localhost.localdomain>
> On Fri, 2004-06-25 at 18:08, Jan Hubicka wrote:
>
> > However the mainline might be good as well as we already do have
> > functions gimplified at the time cgraph_analize is called (ie when you
> > would like to do the analysis).
> >
> Really? Then why do we call the gimplifier as one of the tree
> optimization passes? That makes things easier then. But the bodies are
We call it only when GIMPLE_BEFORE_INLINING is false, but it is true for
all existing backends except for fortran, but fortran also gimplify. I
would vote to drop this code.
> still in high GIMPLE, are they not? Meaning that they still have
> nesting and scopes.
They are high gimples, but as I've mentioned in other email, I don't
think it makes too big differnce for context-insensitive analyzer.
>
> What would be Really Cool, though, is to have all the function bodies in
> the call graph already in SSA form.
Yep, we am targetting towards this on tree-profiling but Stuart
apparently has dificult enought life with low gimple for the very
moment...
>
> Now, when exactly is cgraph_analyze called? After we called t_r_o_c on
> each function body? That'd be too late. We want to do this analysis
> before we optimize the first body in the call graph.
The flow in unit-at-a-time is approximately following:
parsing...
genericizer+gimplifier
cgraph_finalize_function
at the end of compilation unit:
cgraph_finalize_compilation_unit (we build cgraph here)
cgraph_analize_function (only for reachable functions)
- We do local analysis of functions here
and I hope for early optimization + possibly going into SSA form
here too.
cgraph_optimize
We do global propagation over finished cgraph
cgraph_expand_all_function
- We apply the optimizations into function bodies
+ call tree_rest-of_compilation
>
> > Also I was under impression that doing basic IPA alias analysis should
> > be just question of hooking Daniel's points to analyzers into
> > cgraph code
> >
> This would fix some of the low hanging fruit wrt IPA analysis. I don't
> think the idea is to do a full context-sensitive analysis at first.
Yep.. Also Andersen alias analysis is told to be competetive with
context sensitive analysers in practice.
Honza
>
>
> Diego.
>