This is the mail archive of the gcc@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] vdefs question (to make vectorizer pass verify ssa)


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.


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