This is the mail archive of the gcc-patches@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: [rfc] fix iv creation in vectorizer





Richard Henderson <rth@redhat.com> wrote on 18/09/2005 00:34:39:

> ........
> (1) Minimum change is in vect_create_index_for_vector_ref; use
>     size_zero/one_node instead of integer_zero/one_node.
>
> (2) Avoid creating N loop counters, and reuse a canonical loop counter
>     variable.  I didn't immediately see a good place off which to hang
>     such a thing.  Perhaps this should still be revisited.
>
> (3) Create pointer induction variables instead of futzing around with
>     integers and multiplication.  Like, you know, real people might
>     write by hand.
>
> (4) A form of (3) could still be combined with (2), in that if you've
>     got "t1 = *p; t2 = t1 + 1; *p = t2", we'll create two induction
>     variables for the two uses of *p.  Which does get cleaned up later,
>     but it seems wasteful to create in the first place.
>

I don't think we should bother with (4) in the vectorizer if later
optimizations are able to clean this up.
Same with (2).
Between (1) and (3) - looks like both end up generating the same code
eventually, so I guess (3) is better cause it's simpler and more compact
(both in terms of the code in the vectorizer and the GIMPLE code that the
vectorizer produces)

> I chose option 3.

agreed

> Oh, and I also purged the vectorizer of all references to
> integer_type_node or unsigned_type_node.  I'm thinking perhaps we
> ought to poison these and other suspect identifiers in the tree
> optimizers.
>

cool

> Tested on alpha, ia64 and x86_64 linux.
>

I tried it on powerpc-linux

dorit


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