PetScan::extract_for: explicitly keep track of when iterator is virtual
[pet.git] / README
blobb7ed5bb115a8ba7404ed235ab568cf077a044768
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 - LLVM/clang libraries, 2.9 or higher (http://clang.llvm.org/get_started.html)
8         Unless you have some other reasons for wanting to use the svn version,
9         it's best to install the latest release (3.0).
10         The svn version occasionally introduces incompatibilities.
11         Nevertheless, if you encounter any such incompatibilities, please
12         report them so that they can be fixed.
13         Also, if you are following the instructions on how to build
14         the svn version, make sure you also install LLVM
15         (through "make install").  You may want to specify an installation
16         directory using the --prefix configure option.
18         If you configure LLVM using cmake, you may end up with clang libraries
19         that have been compiled with -fno-rtti without this option appearing
20         in the output of "llvm-config --cxxflags".  You may then run into
21         errors about undefined reference to the 'typeinfo' of some classes.
22         You will then have to add this option manually to CXXFLAGS while
23         configuring pet.
25         The ubuntu package libclang-dev (3.0-3) is not sufficient as it does
26         not contain the required libraries.
28 Preparing:
30 Grab the latest release and extract it or get the source from
31 the git repository as follows.  This process requires autoconf,
32 automake and libtool.
34         git clone git://repo.or.cz/pet.git
35         cd pet
36         git submodule init
37         git submodule update
38         ./autogen.sh
40 Compilation:
42         ./configure
43         make
44         make check
46 Use:
48 The main entry point is pet_scop_extract_from_C_source.
49 This function extracts a scop from the C source file with the given name
50 and returns it as a pet_scop.  The scop corresponds to the piece
51 of code delimited by
53     #pragma scop
55 and
57     #pragma endscop
59 The code in between needs to consist only of expression statements,
60 if statements and for statements.  All access relations, loop initializations
61 and conditions need to be piecewise quasi-affine.
63 If the autodetect option has been set, pet will try to automatically
64 detect a scop and no pragmas are required.  On the other hand, pet
65 will not produce any warnings in this case as any code that does not
66 satisfy the requirements is considered to lie outside of the scop.
68 The layout of pet_scop is documented in include/pet.h.