This is the mail archive of the
mailing list for the GCC project.
Re: [autovect] [patch] vectorize in cases when number of iterations may be zero
- From: Daniel Berlin <dberlin at dberlin dot org>
- To: Victor Kaplansky <VICTORK at il dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 15 Jun 2006 15:03:59 -0400
- Subject: Re: [autovect] [patch] vectorize in cases when number of iterations may be zero
- References: <OF12B44E81.7529D809-ONC225718E.00672639-C225718E.0067CADF@il.ibm.com>
Victor Kaplansky wrote:
> firstname.lastname@example.org wrote on 15.06.2006 21:38:02:
>> Victor Kaplansky wrote:
>>>>> 2. The patch makes expr_invariant_in_loop_p to consider DECL
>>> expressions to
>>>>> consider as loop-invariant.
>>>> Uh, well that would be very wrong :)
>>>> You'd need to verify it's not actually set in the loop.
>>> Probably I'll need some help to do it right way. The actuall expression
>>> which is passed to expr_invariant_in_loop_p looks like this:
>>> at /home/victork/autovect/gcc/gcc/tree-data-ref.c:1036
>>> 1036 if (!expr_invariant_in_loop_p (loop, init))
>>> (gdb) p debug_generic_expr (init)
>>> &input_bufD.1868[(<unnamed type>) lagD.18880_550]
>> This is not invariant if lag is not invariant.
>> Otherwise, it is, but only because it's an address expression.
> lag is invariant, but expr_invariant_in_loop_p returns false for whole
> The problem is with input_buf:
> 1372 if (is_gimple_min_invariant (expr))
> (gdb) p debug_generic_expr (expr)
> $7 = void
input_buf itself is not invariant, but the ADDR_EXPR is invariant
regardless, assuming all the index expressions are invariant.
The base expression doesn't matter :)