This is the mail archive of the gcc-bugs@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]

[Bug middle-end/23411] New: [data deps] Distance on outer loops for self output deps


The most frequent case that shows up when bootstrapping autovect branch 
with BOOT_CFLAGS="-O2 -fcheck-data-deps" is the following:

Dist vectors from the first dependence analyzer:
   1    0 
Omega dist vectors are not the same:
   0    0 
Data dependence relation is:
(Data Dep: 
  access_fn_A: {0, +, 1}_3
  access_fn_B: {0, +, 1}_3

 (subscript 
  iterations_that_access_an_element_twice_in_A: 0
  last_conflict: scev_not_known;
  iterations_that_access_an_element_twice_in_B: 0
  last_conflict: scev_not_known;
  (Subscript distance: 0
  )
 )
  distance_vect:      0    0 
  direction_vect:     =    =
)

This is caused by a loop containing a data ref like the following:
loop_2
  loop_3
    A[{0, +, 1}_3] = ...
  endloop_3
endloop_2

For this pattern, tree-data-ref.c says the following:

  /* There is a distance of 1 on all the outer loops: 
     
     Example: there is a dependence of distance 1 on loop_1 for the array A.
     | loop_1
     |   A[5] = ...
     | endloop
  */

But now that Omega says that dist is (0, 0) I'm not sure anymore whether
this is the standard meaning of distance vectors.

Allen&Kennedy book states:
Definition 2.9. Suppose that there is a dependence from statement
S1 on iteration i of a loop nest and statement S2 on iteration j, then
the dependence distance vector d(i,j) is defined as a vector of
length n such that d(i,j) = j - i.

-- 
           Summary: [data deps] Distance on outer loops for self output deps
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sebastian dot pop at cri dot ensmp dot fr
                CC: gcc-bugs at gcc dot gnu dot org


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


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