------- Comment #16 from spop at gcc dot gnu dot org  2007-06-26 18:02 -------
Subject: Re:  [4.3 Regression] Complete program optimized away (i686,
-ftree-vectorize)

Hi,

The problem comes from the fact that estimated_loop_iterations_int
returns HWI whereas the code in analyze_subscript_affine_affine is
storing that in an 'int', converting 4294967296 to 0, and then the
dependence test fails as there is no conflict if the loop does not
run at all ;-)

On the same idea, I think it would be a good idea to change the lambda
matrices types from:
  typedef int *lambda_vector;
to use HOST_WIDE_INT, is this something we want to consider Danny?

Another thing that I remarked when working on fixing this bug, is that
the data dependence analysis does not need the conservative answer
from estimated_loop_iterations_int, but just an approximation, so in
this case instead of saying that the upper bound is 4294967296, I
modified the code to use the the nb_iterations_estimate field, in this
case the non conservative answer is 101, coming from the evolution of
array indices accessed in the loop, and from the size of the data.

(gdb) p *loop
$21 = {num = 1, header = 0x2aaaaafdbe40, latch = 0x2aaaaafe06c0,
lpt_decision = {decision = LPT_NONE, times = 0}, ninsns = 0, av_ninsns
= 0, num_nodes = 2, superloops = 0x2aaaaafe29c0, inner = 0x0,
  next = 0x0, aux = 0x12aa1b0, nb_iterations = 0x2aaaaafe3e00,
estimate_state = EST_AVAILABLE, any_upper_bound = 1 '\001',
nb_iterations_upper_bound = {low = 4294967296, high = 0},
  any_estimate = 1 '\001', nb_iterations_estimate = {low = 101, high =
0}, bounds = 0x2aaaaafe2e70, exits = 0x2aaaaafdd4a0}

This non conservative approximation is also what we should use for
transforming swim.  I wonder why this did not showed up in the
testsuite when we changed the data dependence code to use the
conservative estimations...

I'm bootstrapping this patch on both amd64-linux and i686-linux.
Daniel, is it okay for trunk once it passes testing?

Sebastian


------- Comment #17 from spop at gcc dot gnu dot org  2007-06-26 18:02 -------
Created an attachment (id=13793)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13793&action=view)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32457

Reply via email to