This is the mail archive of the 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: [tree-ssa] Re-compute TREE_ADDRESSABLE early

On Tue, 2003-12-16 at 19:11, Jan Hubicka wrote:
> > On Tue, 2003-12-16 at 18:50, Jan Hubicka wrote:
> > 
> > > I wrote this code orignally as an attempt to avoid need to compute
> > > TREE_ADDRESSABLE in the frontend.  This is not possible right now as
> > > gimplification and several other bits depends on different definitions
> > > of TREE_ADDRESABLE value.
> > > 
> > If you compute addressability in tree_rest_of_compilation() prior to
> > gimplification, you wouldn't need this.
> > 
> > I'm not sure this is needed.
> The idea is that inlining and early dead/unreachable code removal
> elliminate some address operations and this is very cheap.  But I will
> update and test the generic part too later this week.
I think I'm missing something here.  What I propose is to walk the
function tree right after we've inlined all the calls and before we're
about to gimplify the function:

tree_rest_of_compilation ()
  [ ... ]
  if (flag_inline_trees)
      timevar_push (TV_INTEGRATION);
      optimize_inline_calls (fndecl);
      timevar_pop (TV_INTEGRATION);
  <-- Walk function body to set/clear TREE_ADDRESSABLE on all DECLs -->
  /* If the function has not already been gimplified, do so now.  */
  if (!lang_hooks.gimple_before_inlining)
    gimplify_function_tree (fndecl);

Won't this guarantee that the gimplifier will only see TREE_ADDRESSABLE
on the variables that are *really* addressable?

The propagation of ADDR_EXPR and propagation of variables done by
must-alias will happen later on.


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