This is the mail archive of the 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: [autovect] [patch] vectorize in cases when number of iterations may be zero

Victor Kaplansky wrote:
> 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
> expression.
> The problem is with input_buf:
> 1372      if (is_gimple_min_invariant (expr))
> (gdb) p debug_generic_expr (expr)
> input_bufD.1868
> $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 :)

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