This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] pointer arguments should not be value escaping initial when -fargument-noalias-global used
- From: Diego Novillo <dnovillo at redhat dot com>
- To: Andrew Pinski <pinskia at physics dot uc dot edu>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 27 Jan 2006 09:14:20 -0500
- Subject: Re: [PATCH] pointer arguments should not be value escaping initial when -fargument-noalias-global used
- References: <245166a5b89a0bafebf98edc74faff3b@physics.uc.edu>
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.