"C" examples that benefit from Graphite optimizations

113 views
Skip to first unread message

Gary F.

unread,
Jul 21, 2012, 5:24:26 PM7/21/12
to gcc-gr...@googlegroups.com
I have been experimenting with the graphite optimizer, based on GCC trunk, and cloog-isl.  I started with the attached simple "C" program, which has this basic structure.

#define N 20000
int a[N][N], b[N], c[N];
[...]
  for (i = 0; i < N; i++)
    {
      b[i] = i;
      c[i] = i + N;
    }
  for (i = 0; i < N; i++)
    for (j = 0; j < N; j++)
      a[j][i] = b[i] + c[j];

And compiled it with: -O3  -floop-block.

Couple of questions:
1) What option should I supply to confirm that the graphite optimizer ran and determine (i) did it in fact perform any optimizations, and (ii) which optimizations did it perform?
2) If -floop-block couldn't optimize this program, what is the likely reason?
3) Would you please offer pointers to example "C" programs that highlight graphite-cloog-isl optimizations?

thanks,
- Gary
loop-block.c
Reply all
Reply to author
Forward
0 new messages