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: proposal for compilation unil wide alias analyis


> 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.
> 


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