This is the mail archive of the
mailing list for the GCC project.
Re: [lno] [patch] vectorization with unknown loop bound
- From: Devang Patel <dpatel at apple dot com>
- To: Olga Golovanevsky <OLGA at il dot ibm dot com>
- Cc: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>, Sebastian Pop <sebastian dot pop at cri dot ensmp dot fr>, Dorit Naishlos <DORIT at il dot ibm dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 17 May 2004 11:01:27 -0700
- Subject: Re: [lno] [patch] vectorization with unknown loop bound
- References: <OF8E368AD4.1F723576-ONC2256E97.004574A6-C2256E97.004DE384@il.ibm.com>
On May 17, 2004, at 7:10 AM, Olga Golovanevsky wrote:
I used some static functions from tree-ssa-loop-manip.c and
cfgloopmanip.c, as well the function force_gimple_operand() from
tree-ssa-loop-ivopts.c, so I changed these functions to non-static.
Alternatively it was possible to make this loop transformation
generic, that is a question whether it is worth doing.
If tree_ssa_loop_version () is used then some of the code
duplication can be avoided. But it can be done later.
+ /* If the loop has symbolic number of iterations 'n'
+ (i.e. it's not a compile time constant),
+ then an epilog loop need to be created. We therefore duplicate
+ the initial loop. The original loop will be vectorized, and
+ (n/VF) iterations. The second copy will remain serial and
+ the remaining (n%VF) iterations. (VF is the vectorization
Any reason for not using nested loops approach here? e.g.
for (i=0; i<N; i = i + VF)
for (j=i; j < i + VF && j < N; j++)
I am just curious.