codegen_test.sh: remove test output file on success
[pet.git] / README
blob304f6bc1309e2a3412794fd6b0a323e2fd4aa77c
1 Requirements:
3 - pkg-config (http://www.freedesktop.org/wiki/Software/pkg-config)
4         (not needed when compiling a release using the included isl)
5 - gmp (http://gmplib.org/)
6 - libyaml (http://pyyaml.org/wiki/LibYAML)
7         (only needed if you want to compile the pet executable)
8 - LLVM/clang libraries, 2.9 or higher (http://clang.llvm.org/get_started.html)
9         Unless you have some other reasons for wanting to use the svn version,
10         it's best to install the latest release (3.7).
11         The svn version occasionally introduces incompatibilities.
12         Nevertheless, if you encounter any such incompatibilities, please
13         report them so that they can be fixed.
14         However, development versions from before the latest release
15         are not supported.
17         Also, if you are following the instructions on how to build
18         the svn version, make sure you also install LLVM
19         (through "make install").  You may want to specify an installation
20         directory using the --prefix configure option.
22         If you configure older versions of LLVM using cmake, you may end up
23         with clang libraries that have been compiled with -fno-rtti without
24         this option appearing in the output of "llvm-config --cxxflags".
25         You may then run into errors about undefined reference to the
26         'typeinfo' of some classes.
27         You will then have to add this option manually to CXXFLAGS while
28         configuring pet.
30         If you want to use the ubuntu package libclang-dev, then you need
31         version 3.2 (ubuntu raring) or later.
32         Older versions of this package did not include the required libraries.
34 Preparing:
36 Grab the latest release and extract it or get the source from
37 the git repository as follows.  This process requires autoconf,
38 automake and libtool.
40         git clone git://repo.or.cz/pet.git
41         cd pet
42         git submodule init
43         git submodule update
44         ./autogen.sh
46 Compilation:
48         ./configure
49         make
50         make check
52 Use:
54 The main entry point is pet_scop_extract_from_C_source.
55 This function extracts a scop from the C source file with the given name
56 and returns it as a pet_scop.  The scop corresponds to the piece
57 of code delimited by
59     #pragma scop
61 and
63     #pragma endscop
65 The code in between needs to consist only of expression statements,
66 if statements and for statements.  All access relations and loop initializations
67 need to be piecewise quasi-affine.  Conditions are allowed to be non-affine,
68 in which case a separate statement is constructed to evaluate the condition.
70 If the autodetect option has been set, pet will try to automatically
71 detect a scop and no pragmas are required.  On the other hand, pet
72 will not produce any warnings in this case as any code that does not
73 satisfy the requirements is considered to lie outside of the scop.
75 The layout of pet_scop is documented in include/pet.h.
78 New releases are announced on http://freecode.com/projects/libpet
80 If you use pet, you can let me know by stacking
81 https://www.ohloh.net/p/libpet on ohloh.
83 For bug reports, feature requests and questions,
84 contact isl-development@googlegroups.com
86 If you use pet for your research, you are invited to cite
87 the following paper.
89 @InProceedings{Verdoolaege2012pet,
90     author = {Sven Verdoolaege and Tobias Grosser},
91     title = {Polyhedral Extraction Tool},
92     booktitle = {Second Int. Workshop on Polyhedral Compilation Techniques
93                 (IMPACT'12)},
94     address = {Paris, France},
95     month = jan,
96     year = {2012}