1# 2# /**-------------------------------------------------------------------** 3# ** CLooG ** 4# **-------------------------------------------------------------------** 5# ** The Chunky Loop Generator ** 6# **-------------------------------------------------------------------** 7# ** First version of this file: january 22th 2002 ** 8# **-------------------------------------------------------------------**/ 9# 10 11For complete informations about this software, how to build and use it, 12please see the postscript file in the ./doc subdirectory (a pdf version 13is available in the web site). 14 15Overview : 16I. Description 17II. Building CLooG 18III. Options 19IV. Running CLooG 20V. General Questions 21 22# **-------------------------------------------------------------------** 23# ** I. Description ** 24# **-------------------------------------------------------------------**/ 25 26CLooG is a software which generates loops for scanning Z-polyhedra. That is, 27CLooG finds the code or pseudo-code where each integral point of one or more 28parametrized polyhedron or parametrized polyhedra union is reached. CLooG is 29designed to avoid control overhead and to produce a very efficient code. 30 31Its input is some data on the polyhedra to scan, basically the system of 32affine inequalities that define them, and a context that defines some 33properties known on the parameters if any. The output is the pseudo scanning 34code. Many facilities are provided to generate a near-to-be-compileable code, 35and every useful functions to generate the code may be called from the CLooG 36library. 37 38 INPUT | OUTPUT 39(fortunately not exactly the input, | (the real one, with default options) 40 check test/readme.cloog for the | 41 real input for that problem !) | 42 | 43 j^ i>=2 | 44 | | j<=n+2-i | 45 | |\ | i<=n | 46 | | \ | | 47 m-+-****---+-j<=m | for (i=2;i<=n;i++) { 48 | ***** | | for (j=2;j<=min(m,-i+n+2);j++) { 49 | ****** | ==> S1 ; 50 | *******| | } 51 2-+-********-j>=2 | } 52 | | |\ | 53 0-+-+------+--->i | 54 | | | | 55 0 2 n | 56 | 57 Context : n>=2 | 58 m>=2 | 59 System : 2<=i<=n | 60 2<=j<=m | 61 j<=n+2-i | 62 63# **-------------------------------------------------------------------** 64# ** II. Building CLooG ** 65# **-------------------------------------------------------------------**/ 66 67If you obtained CLooG from the git repository, then you first 68need to obtain the submodules and create a configure script. 69 70 ./get_submodules.sh 71 ./autogen.sh 72 73The first step is only needed if you plan on using the isl backend. 74 75The configure shell script attempts to guess correct values for various 76system-dependent variables used during compilation. It uses those values to 77create a Makefile. The file configure.ac is used to create configure by a 78program called autoconf. You only need configure.ac if you want to change 79it or regenerate configure using a newer version of autoconf. 80 81The simplest way to compile this package is: 82cd to the directory containing the package's source code and type 83 84 ./configure 85 86to configure the package for your system (while running, configure prints 87some messages telling which features it is checking for). To compile the 88package, type 89 90 make 91 92 93to install the program and/or the library, type 94 95 make install 96 97you can remove the program binaries and object files from the source code 98directory by typing 99 100 make clean 101 102To also remove the files that configure created (so you can compile the 103package for a different kind of computer) type 104 105 make distclean 106 107# **-------------------------------------------------------------------** 108# ** III. Options ** 109# **-------------------------------------------------------------------**/ 110 111By default, make will install the package's files in /usr/local/bin, 112/usr/local/lib, etc. You can specify an installation prefix other than 113/usr/local by giving onfigure the option --prefix=PATH. 114 115By default, configure will use the isl that comes bundled with CLooG. 116Using the --with-isl option of configure the user can specify that "no" isl, 117a previously installed ("system") isl or a "build" isl should be used. 118In the latter case, the user should also specify the build location 119using --with-isl-builddir=PATH. In case of an installed isl, 120the installation location can be specified using the 121--with-isl-prefix=PATH and --with-isl-exec-prefix=PATH options of configure. 122 123By default, configure will seek the PolyLib in standard locations. 124If necessary, you can specify the PolyLib's path by giving configure the 125option --with-polylib-prefix=PATH and/or --with-polylib-exec-prefix=PATH. 126 127By default, configure will seek the GMP library in standard locations. 128If necessary, you can specify the GMP's path by giving configure the 129option --with-gmp-prefix=PATH and/or --with-gmp-exec-prefix=PATH. 130 131By default, when using the PolyLib backend, 132CLooG and its library are built using 64 bits integer 133representation. You can choose to specify explicitly others integer 134representations by using: 135--with-bits=32 for 32 bits integers, 136--with-bits=64 for 64 bits integers (default), 137--with-bits=gmp for multiple precision integers. 138 139# **-------------------------------------------------------------------** 140# ** IV. Running CLooG ** 141# **-------------------------------------------------------------------**/ 142 143To run CLooG, simply type 'cloog', optionally followed by the name of an 144input file. You can type 'cloog -h' or 'cloog --help' for some help. 145For more informations, please check the ./doc subdirectory. 146 147# **-------------------------------------------------------------------** 148# ** V. General Questions ** 149# **-------------------------------------------------------------------**/ 150 1511. What does CLooG means ? 152 153CLooG is the Chunky LOOp Generator, Chunky is an automatic loop optimizer for 154data locality. CLooG is a completely independent part of the Chunky project. 155Pronounce 'CLooG' as 'klug', which means 'sly' in german :-). 156 1572. CLooG do not compile, what should I do ? 158 159CLooG should compile everywhere (assuming that PolyLib is still there), thus 160there is a problem or the documentation is not clear, in both case it is 161necessary to ask the author(s) ! 162 1633. I need a feature that CLooG do not implement, what should I do ? 164 165There are two ways. First, CLooG is a LGPL software and library. So you 166are welcome to improve it yourself ;-) ! Many project have been successful, it 167is -maybe- a sign that this is not too hard to put your hands inside the 168source. Second, just ask the author(s) :-) ! Maybe a lot of people would be 169interessed by such feature, maybe many people asked for it before, maybe it's 170trivial to implement (and even)... Please just never hesitate to ask the 171author(s) ! 172 1734. I implemented a cool feature, can I submit it ? 174 175Obviously you are welcome to send the author(s) any improvement. But obviously 176we are quite careful with readability, correctness and stability, and the 177author(s) will read, check and check again any contribution before including it. 178Thus, it can take time... There are few basic rules to write contributions: 179- (1) Do never change the indentation of any part of the code that is not yours. 180- (2) Do never send codes that use more than 80 columns. 181- (3) Do never send codes without a lot of comments in (bad or good) english. 182- (4) Do never send codes with obscure and/or non-english variable names. 183- (5) Use C89, just C, only C (note: "//" comments are not C89, 184 variable declaration elsewhere than at the beginning of a block, is not C89). 185- (6) Read doc/SubmittingPatches 186Please understand that in order to live for a long time, and to be used in many 187projects the very first priority for CLooG is to be readable and documented. 188 1895. Is CLooG bug free ? 190 191No, who can ? ClooG is a complex program, and we do not pretend it to be bug 192free. Nevertheless because it has been tested and tested, we are fairly sure 193that CLooG results with default options have good chances to be satisfactory. 194If you find a result that looks strange, inadequate or incorrect, please send: 195- (1) The input file to the author(s). 196- (2) The output. 197- (3) The first line given by typing 'cloog -v'. 198- (4) All your command line options to achieve the result. 199We will try to explain the result or to fix the problem as soon as possible. 200 2016. How can I contact the author(s) ? 202 203Just send a mail to cloog-development@googlegroups.com 204