[tree-ssa] RFC - tree vectorizer

Zdenek Dvorak rakdver@atrey.karlin.mff.cuni.cz
Tue Dec 30 19:38:00 GMT 2003


Hello,

> >      With respect to this last change in tree-flow.h - I added a new 
> >field
> >to stmt_ann in order to record information per stmt during 
> >vectorization.

It seems to me that adding it as PTR GTY ((skip (""))) aux; void be
a bit cleaner.

> > I
> >wanted to add a field similar to the "void *aux" in 'struct loop' for
> >example, but I guess that won't be possible as it is managed by the 
> >ggc?

I don't quite understand this; struct loop is not garbage collected,
whereas the tree annotations are.  Anyway none of this matters as long
as you only use it inside the pass and do not want the data to survive
across garbage collection.

> >The other option is to use a stmt ID; since that's currently not 
> >available,
> >I guess I'd have to add an int field and assign IDs myself / use a hash
> >table. Recommendations?

Perhaps you might use ssa name versions instead (there may be more
definitions per statement, which may make it a bit complicated,
however).

> >              /* CHECKME: better check if bb belongs to the loop?  */
> 
> I use bitmaps in the loop versioning code I've.
> 
>   bitmap blocks_in_loop_map;
>   blocks_in_loop_map = BITMAP_XMALLOC ();
> 
>   for (i = 0; i < loop->num_nodes; i++)
>       bitmap_set_bit (blocks_in_loop_map, bb[i]->index);
>   ...
>   if (!bitmap_bit_p (blocks_in_loop_map, b->index))
>    loop_entry_block = tree_split_edge (e);
>   ...
>   BITMAP_XFREE (blocks_in_loop_map);

Not sure what you want to acieve here; but flow_bb_inside_loop_p
might do what you want.

Zdenek



More information about the Gcc-patches mailing list