This is the mail archive of the
mailing list for the GCC project.
Re: [patch]Fix the aliasing on vector replacements to match the original scalar array
- From: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- To: Keith Besaw <kbesaw at us dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Dorit Naishlos <DORIT at il dot ibm dot com>,Ira Rosen <IRAR at il dot ibm dot com>, dnovillo at redhat dot com
- Date: Tue, 10 May 2005 09:24:42 +0200
- Subject: Re: [patch]Fix the aliasing on vector replacements to match the original scalar array
- References: <OFE71B2BFD.FBD11AD5-ON86256FFD.0022CA01-86256FFD.firstname.lastname@example.org>
> When an indirect vector reference replaced an array element reference that
> had no
> associated type tag then an existing type tag was being used and the array
> was added.
> For example, an automatic array may have no aliases and therefore no type
> tag that
> could be used for the indirect vector replacement. Using an existing type
> tag with the
> automatic array added results in aliases that didn't originally exist. It
> also results in
> errors out of verify_ssa because the vectorizer was attempting to update
> the ssa form
> without considering the new aliases.
> This patch adds a new routine new_type_alias that can be used to create a
> new type tag
> for an unaliased declaration and uses the type tag in pointer to vector
> declarations used
> in indirect vector references that replace array element references.
> tested on ppc
> OK for mainline?
can you check whether there is not some code duplication with
tree-ssa-loop-ivopts.c:rewrite_address_base and possibly merge the
> 2005-05-10 Keith Besaw <email@example.com>
> * tree-ssa-alias.c (new_type_alias): New procedure to
> create a type memory tag for a pointer with a may-alias
> set determined from a variable declaration.
> * tree-flow.h: export declaration of new_type_alias
> * tree-vect-transform (vect_create_data_ref_ptr): Call
> new_type_alias when an type memory tag isn't available
> for a reference.
> (vectorizable_store): Use copy_virtual_operands to update
> virtual defs in place (so that loop_version can be called).
> Call mark_for_renaming for the virtual defs in case peeling
> is done and virtual uses outside the loop need to be updated.