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: [PATCH] pointer arguments should not be value escaping initial when -fargument-noalias-global used


Andrew Pinski wrote:
> We currently mark pointer arguments as initial value escaping but with
> flag_argument_noalias being greater than 1, we should not mark them
> as the value could not have escaped anywhere.  This is because the
> value could not be pointer to globals or any other argument with that
> option supplied.
> 
Your description is very confusing.  But from what I think I understand,
your patch is wrong.  It's doing the opposite of what you describe here
 (the test should be <= 1).

> This is still does not cause the arguments to become not call clobbered
> but that is a different issue, relating to name tags and type tags being
> call clobbered by default.
> 
I have no idea what you are trying to say here.

With -fargument-noalias-global, the only thing you can mark
non-clobbered for certain is the name tag for the default name of the
argument.  The type tag may still be clobbered, assume for whatever
reason that we lose track of x_3's name tag in the fragment below:

foo (type *ptr)
{
   type *x_3 = (rand ()) ? &j : ptr_1;
   j = ...
   baz (ptr_1, x_3);
   <  ... use j, *ptr_1, *x_3 ... >
}

ptr_1's name tag need not be clobbered, but its type tag had better be.


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