Add check-polly-tests build target.
[polly-mirror.git] / docs / ReleaseNotes.rst
blob780b6e3d43754d590eb904c51a782876c7a9d1da
1 ========================
2 Release Notes (upcoming)
3 ========================
5 In Polly 3.9 the following important changes have been incorporated.
7 .. warning::
9   These releaes notes are for the next release of Polly and describe
10   the new features that have recently been committed to our development
11   branch.
13 Polly directly available in clang/opt/bugpoint
14 ----------------------------------------------
16 Polly supported since a long time to be directly linked into tools such as
17 opt/clang/bugpoint. Since this release, the default for a source checkout that
18 contains Polly is to provide Polly directly through these tools, rather than as
19 an additional module. This makes using Polly significantly easier.
21 Instead of
23 .. code-block:: bash
25     opt -load lib/LLVMPolly.so -O3 -polly file.ll
26     clang -Xclang -load -Xclang lib/LLVMPolly.so -O3 -mllvm -polly file.ll
28 one can now use
30 .. code-block:: bash
32     opt -O3 -polly file.ll
33     clang -O3 -mllvm -polly file.c
36 Increased analysis coverage
37 ---------------------------
39 Polly's modeling has been improved to increase the applicability of Polly. The
40 following code pieces are newly supported:
42 Arrays accessed through different types
43 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
45 It is not uncommon that one array stores elements of different types. Polly now
46 can model and optimize such code.
48 .. code-block:: c
50     void multiple_types(char *Short, char *Float, char *Double) {
51       for (long i = 0; i < 100; i++) {
52         Short[i] = *(short *)&Short[2 * i];
53         Float[i] = *(float *)&Float[4 * i];
54         Double[i] = *(double *)&Double[8 * i];
55       }
56     }
59 If the accesses are not aligned with the size of the access type we model them
60 as multiple accesses to an array of smaller elements. This is especially
61 useful for structs containing different typed elements as accesses to them are
62 represented using only one base pointer, namely the ``struct`` itself.  In the
63 example below the accesses to ``s`` are all modeled as if ``s`` was a single
64 char array because the accesses to ``s->A`` and ``s->B`` are not aligned with
65 their respective type size (both are off-by-one due to the ``char`` field in
66 the ``struct``).
68 .. code-block:: c
70     struct S {
71       char Offset;
72       int A[100];
73       double B[100];
74     };
76     void struct_accesses(struct S *s) {
77       for (long i = 0; i < 100; i++)
78         s->B[i] += s->A[i];
79     }
83 Function calls with known side effects
84 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
86 Function calls that have only known memory effects can be represented as
87 accesses in the polyhedral model. While calls without side effects were
88 supported before, we now allow and model two other kinds. The first are
89 intrinsic calls to ``memcpy``, ``memmove`` and ``memset``. These calls can be
90 represented precisely if the pointers involved are known and the given length
91 is affine. Additionally, we allow to over-approximate function calls that are
92 known only to read memory, read memory accessible through pointer arguments or
93 access only memory accessible through pointer arguments. See also the function
94 attributes ``readonly`` and ``argmemonly`` for more information.
96 Fine-grain dependences analysis
97 -------------------------------
99 In addition of the ScopStmt wise dependences analysis, now the "polly-dependence"
100 pass provides dependences analysis at memory reference wise and memory access wise.
101 The memory reference wise analysis distinguishes the accessed references in the
102 same statement, and generates dependences relationships between (statement, reference)
103 pairs. The memory access wise analysis distinguishes accesses in the same statement,
104 and generates dependences relationships between (statement, access) pairs. These
105 fine-grain dependences are enabled by "-polly-dependences-analysis-level=reference-wise"
106 and "-polly-dependences-analysis-level=access-wise", respectively.
108 Update of the isl math library
109 ------------------------------
111 We imported the latest version of the isl math library into Polly.