[polly] r262607 - [DOC] Add more documentation about the different element type support
Johannes Doerfert via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 3 03:33:30 PST 2016
Author: jdoerfert
Date: Thu Mar 3 05:33:30 2016
New Revision: 262607
URL: http://llvm.org/viewvc/llvm-project?rev=262607&view=rev
Log:
[DOC] Add more documentation about the different element type support
Modified:
polly/trunk/docs/ReleaseNotes.rst
Modified: polly/trunk/docs/ReleaseNotes.rst
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/docs/ReleaseNotes.rst?rev=262607&r1=262606&r2=262607&view=diff
==============================================================================
--- polly/trunk/docs/ReleaseNotes.rst (original)
+++ polly/trunk/docs/ReleaseNotes.rst Thu Mar 3 05:33:30 2016
@@ -26,6 +26,29 @@ can model and optimize such code.
}
}
+
+If the accesses are not aligned with the size of the access type we model them
+as multiple accesses to an array of smaller elements. This is especially
+usefull for structs containing different typed elements as accesses to them are
+represented using only one base pointer, namely the ``struct`` itself. In the
+example below the accesses to ``s`` are all modeled as if ``s`` was a single
+char array because the accesses to ``s->A`` and ``s->B`` are not aligned with
+their respective type size (both are off-by-one due to the ``char`` field in
+the ``struct``).
+
+.. code-block:: c
+
+ struct S {
+ char Offset;
+ int A[100];
+ double B[100];
+ };
+
+ void struct_accesses(struct S *s) {
+ for (long i = 0; i < 100; i++)
+ s->B[i] += s->A[i];
+ }
+
Update of the isl math library
------------------------------
More information about the llvm-commits
mailing list