This is the mail archive of the gcc-patches@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: [tree-ssa] must-alias fixes...


> On Fri, 2003-11-21 at 06:45, Jan Hubicka wrote:
> 
> > Did you noticed the tree-dfa code for computing ADDRESSABLE flags early
> > I sent?
> >
> No, sorry.  URL?  Are you removing the addressable computation from the
> FE completely?
Not removing yet, but making tree-ssa independent on it.
Removing it completely is next step.
> 
> >   With this, I finally get flags right, so if would be great if
> > you can look into that.  I will re-test it on clean tree once we get
> > this patch in.
> > Honza
> > 
> > 2003-11-21  Jan Hubicka  <jh@suse.cz>
> > 	* tree-dfa.c (get_expr_operands): Fix handling of CALL_EXPR.
> >
> OK
> 
> > 	* tree-must-alias.c (tree_compute_must_alias): Never promote static
> > 	vars;  promote pointers.
> >
> Hmm, I was thinking that we could do all the promotion of static
> variables except the removal of the TREE_ADDRESSABLE bit.  That is, we
> take all its aliases aways to reduce virtual operands, but just not mark
> it non-addressable.  Static variables are never optimized fully, anyway,

This is also not valid.
Other inline copy of function may take variable's address and store it
somewhere, so function called from current function may use this address
to modify the variable, so we can not promote it to not alias global
memory.  It can.
> so I don't think this should pessimize things too much.  Do you have, or
> can come up with, a test case that exposes this problem with statics? 
> It would be nice to have it in the test suite.

I can construct one.  I need inline function of something like

fun (int a)
{
static int var;
 if (a==0)
  global_pointer = &var;
 else
  {var = 0; t(); return var;}
}
t()
{
*gliobal_pointer = 1;
}

and now produce one inline copy with fun(0) and other with fun(1) and
other in different function with fun(0). 
You can not mark var as not global clobbered in the other copy.
> 
> > 	(find_addressable_vars):  Deal with complex constant expressions;
> > 	do not clear may_point_to_global_mem.
> >
> OK.

Thanks!  I will wait for Richard's response concerning nested NOPs
before commiting.
Honza
> 
> 
> Diego.


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