This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Remove special-casing of PTR_IS_REF_ALL pointers from alias analysis
On Mon, 28 Apr 2008, Eric Botcazou wrote:
> > Sure. The PTR_IS_REF_ALL pointers alias tag aliases only call clobbered
> > tags (see finalize_ref_all_pointers), but it needs to conflict with
> > _all_ addressable variables and with all pointer targets (that are
> > dereferenced).
>
> That's not true in the sense that it aliases all addressable variables whose
> address escapes. And TYPE_REF_CAN_ALIAS_ALL pointers are deemed escape sites
> themselves (see is_escape_site, did you mean to remove this too)? The point
> was precisely to avoid making them conflicting with every single addressable
> variable at the tree level...
Huh? That would be weird semantics. Suppose
int x;
int *{ref-all} p;
...
sth takes &x
...
*p = 0;
x = 1;
&x address doesn't need to escape to cause *p conflict with the store
to x.
Can you give a formal specification of TYPE_REF_CAN_ALIAS_ALL please?
The way it is "implemented" in alias.c:get_alias_set it is just a
pointer to memory with alias set zero.
> > No, Ada uses it. And I think TYPE_REF_CAN_ALIAS_ALL is the most sane
> > way to represent what it tries to represent.
>
> Maybe PTR_IS_REF_ALL is overkill now though, testing TYPE_REF_CAN_ALIAS_ALL
> directly would be more straightforward.
I'll update the patch to remove the indirection.
Thanks,
Richard.