privately export pet_stmt_is_affine_assume
[pet.git] / README
blobd2cf277fa8cac8314087e767f184f3c3fdca919b
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.8).
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         from source, make sure you also install LLVM
19         (through "make install").  You may want to specify an installation
20         directory using the CMAKE_INSTALL_PREFIX cmake option.
21         You may also want to set the LLVM_BUILD_LLVM_DYLIB option
22         to enable the creation of a single shared library.
24         If you configure older versions of LLVM using cmake, you may end up
25         with clang libraries that have been compiled with -fno-rtti without
26         this option appearing in the output of "llvm-config --cxxflags".
27         You may then run into errors about undefined reference to the
28         'typeinfo' of some classes.
29         You will then have to add this option manually to CXXFLAGS while
30         configuring pet.
32         If you want to use the ubuntu package libclang-dev, then you need
33         version 3.2 (ubuntu raring) or later.
34         Older versions of this package did not include the required libraries.
36 Preparing:
38 Grab the latest release and extract it or get the source from
39 the git repository as follows.  This process requires autoconf,
40 automake and libtool.
42         git clone git://repo.or.cz/pet.git
43         cd pet
44         ./get_submodules.sh
45         ./autogen.sh
47 Compilation:
49         ./configure
50         make
51         make check
53 Use:
55 The main entry point is pet_scop_extract_from_C_source.
56 This function extracts a scop from the C source file with the given name
57 and returns it as a pet_scop.  The scop corresponds to the piece
58 of code delimited by
60     #pragma scop
62 and
64     #pragma endscop
66 The code in between needs to consist only of expression statements,
67 if statements and for statements.  All access relations and loop initializations
68 need to be piecewise quasi-affine.  Conditions are allowed to be non-affine,
69 in which case a separate statement is constructed to evaluate the condition.
71 If the autodetect option has been set, pet will try to automatically
72 detect a scop and no pragmas are required.  On the other hand, pet
73 will not produce any warnings in this case as any code that does not
74 satisfy the requirements is considered to lie outside of the scop.
76 The layout of pet_scop is documented in include/pet.h.
79 New releases are announced on http://freecode.com/projects/libpet
81 If you use pet, you can let me know by stacking
82 https://www.ohloh.net/p/libpet on ohloh.
84 For bug reports, feature requests and questions,
85 contact isl-development@googlegroups.com
87 If you use pet for your research, you are invited to cite
88 the following paper.
90 @InProceedings{Verdoolaege2012pet,
91     author = {Sven Verdoolaege and Tobias Grosser},
92     title = {Polyhedral Extraction Tool},
93     booktitle = {Second Int. Workshop on Polyhedral Compilation Techniques
94                 (IMPACT'12)},
95     address = {Paris, France},
96     month = jan,
97     year = {2012}