This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] vdefs question (to make vectorizer pass verify ssa)
- From: Diego Novillo <dnovillo at redhat dot com>
- To: Dorit Naishlos <DORIT at il dot ibm dot com>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Thu, 08 Jan 2004 12:38:52 -0500
- Subject: Re: [tree-ssa] vdefs question (to make vectorizer pass verify ssa)
- Organization: Red Hat Canada
- References: <OFD3D4DD40.0029100A-ONC2256E0D.0062AD2B-C2256E0D.006928CC@il.ibm.com>
On Wed, 2003-12-31 at 14:08, Dorit Naishlos wrote:
> > Question: is your transformation removing *all* references to variable
> > 'a'?
>
> not necessarily, just those that are vectorized. Within the loop that is
> vectorized all the references to 'a' are replaced with references via
> pointers.
>
But 'a' itself is not aliased, right?
> > If so, then all you need to do is mark 'a' for renaming and call
> > rewrite_into_ssa, which will DTRT.
> > If 'a' is still referenced somewhere in the code, then you ought to add
> > 'a' to the may-alias set for the memory tag of _vect_a.117 (I assume it
> > has one, right?).
>
> So how do I add a memory tag to a pointer and a variable to its may-alias
> set? basically, what are the things I need to do when I'm creating a new
> pointer? is there an example somewhere?
>
Not really, unfortunately. If 'a' is not aliased and the new pointer
can only point to 'a', then you could just create the pointer and make
'a' be its memory tag:
ptr = create_tmp_var (type, prefix);
add_referenced_tmp_var (ptr);
get_var_ann (ptr)->mem_tag = array;
That way, the next time you scan for operands, a statement like:
*p = ...;
would get a real use of 'p' and a VDEF for 'a'.
Diego.