What's new?

What's CLooG?

CLooG is a free software and library to generate code for scanning Z-polyhedra. That is, it finds a code (e.g. in C, FORTRAN...) that reaches each integral point of one or more parameterized polyhedra. CLooG has been originally written to solve the code generation problem for optimizing compilers based on the polytope model. Nevertheless it is used now in various area e.g. to build control automata for high-level synthesis or to find the best polynomial approximation of a function. CLooG may help in any situation where scanning polyhedra matters. While the user has full control on generated code quality, CLooG is designed to avoid control overhead and to produce a very effective code.

Polyhedral Domains to Scan Scanning Code Optimized for Size Scanning Code Optimized for Control
  for (i=1;i<=8;i++) {
    for (j=i-1;j<=7;j++) {
      S1(i,j);
    }
    if ((i>=2)&&(i<=6)) {
      for (j=0;j<=4;j++) {
        S2(i,j);
      }
    }
  }
  for (j=0;j<=7;j++) {
    S1(1,j);
  }
  for (i=2;i<=5;i++) {
    for (j=0;j<=i-2;j++) {
      S2(i,j) ;
    }
    for (j=i-1;j<=4;j++) {
      S1(i,j);
      S2(i,j) ;
    }
    for (j=5;j<=7;j++) {
      S1(i,j);
    }
  }
  for (j=0;j<=4;j++) {
    S2(6,j) ;
  }
  for (j=5;j<=7;j++) {
    S1(6,j);
  }
  for (i=7;i<=8;i++) {
    for (j=i-1;j<=7;j++) {
      S1(i,j);
    }
  }

CLooG stands for Chunky Loop Generator: it is a part of the Chunky project, a research tool for data locality improvement. It is designed to be also the back-end of automatic parallelizers like LooPo. Thus it is very 'compilable code oriented' and provides powerful program transformation facilities. Mainly, it allows the user to specify very general schedules, e.g. where unimodularity or invertibility doesn't matter.


Disclaimer