Query : Tiling of loop with parametric loop bounds

42 views
Skip to first unread message

abhilash bhandari

unread,
May 9, 2014, 5:01:17 AM5/9/14
to gcc-gr...@googlegroups.com
 Hi All,

 I'm trying to tile a loop with parametric loop bounds. The loop is as follows:

   for(i=0; i<k; i++){
        for(j=0; j<k; j++){
             a[i][j] = (a[i][j]*a[j][i])+i+j;
        }
   }

 i, j, k are unsigned integer variables.

 Command used : g++ -O3 -g -fgraphite -floop-block --param loop-block-tile-size=4 testscop22d_parametric.cpp

 The graphite scop detection algorithm fails to detect the above loop nest as a scop.
 Upon premature diagnosis, I found out that "graphite_can_represent_loop()" function fails and hence result.difficult is set to true.
 "graphite_can_represent_loop()" fails because "niter_desc.control.no_overflow" is false.

 What is the significance of "niter_desc.control.no_overflow"?
 Why cannot the above loop nest be a scop?
 How to modify the above loop nest so that it can be tiled?

 
 Thanks and Regards,
 Abhilash Bhandari
 MS Scholar
 IIT Madras

Tobias Grosser

unread,
May 9, 2014, 5:04:39 AM5/9/14
to abhilash bhandari, gcc-gr...@googlegroups.com
Use signed loop induction variables. unsigned loop induction variables
can wrap around. Modeling their semantics is difficult.

Tobias

abhilash bhandari

unread,
May 12, 2014, 6:20:41 AM5/12/14
to gcc-gr...@googlegroups.com, abhilash bhandari
Thanks a lot Tobias. The problem is solved :)

---
Abhilash
Reply all
Reply to author
Forward
0 new messages