[patch]Fix the aliasing on vector replacements to match the original scalar array

Zdenek Dvorak rakdver@atrey.karlin.mff.cuni.cz
Tue May 10 07:24:00 GMT 2005


Hello,

> 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
routines?

Zdenek

> Keith
> 
> Changelog:
> 
>       2005-05-10  Keith Besaw  <kbesaw@us.ibm.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.
> 
> Patch:
> 




More information about the Gcc-patches mailing list