#include <graphite-poly.h>
Field Documentation
isl_map* poly_dr::accesses |
The access polyhedron contains the polyhedral space this data
reference will access.
The polyhedron contains these dimensions:
- The alias set (a):
Every memory access is classified in at least one alias set.
- The subscripts (s_0, ..., s_n):
The memory is accessed using zero or more subscript dimensions.
- The iteration domain (variables and parameters)
Do not hardcode the dimensions. Use the following accessor functions:
- pdr_alias_set_dim
- pdr_subscript_dim
- pdr_iterator_dim
- pdr_parameter_dim
Example:
| int A[1335][123];
| int *p = malloc ();
|
| k = ...
| for i
| {
| if (unknown_function ())
| p = A;
| ... = p[?][?];
| for j
| A[i][j+k] = m;
| }
The data access A[i][j+k] in alias set "5" is described like this:
| i j k a s0 s1 1
| 0 0 0 1 0 0 -5 = 0
|-1 0 0 0 1 0 0 = 0
| 0 -1 -1 0 0 1 0 = 0
| 0 0 0 0 1 0 0 >= 0 # The last four lines describe the
| 0 0 0 0 0 1 0 >= 0 # array size.
| 0 0 0 0 -1 0 1335 >= 0
| 0 0 0 0 0 -1 123 >= 0
The pointer "*p" in alias set "5" and "7" is described as a union of
polyhedron:
| i k a s0 1
| 0 0 1 0 -5 = 0
| 0 0 0 1 0 >= 0
"or"
| i k a s0 1
| 0 0 1 0 -7 = 0
| 0 0 0 1 0 >= 0
"*p" accesses all of the object allocated with 'malloc'.
The scalar data access "m" is represented as an array with zero subscript
dimensions.
| i j k a 1
| 0 0 0 -1 15 = 0
The difference between the graphite internal format for access data and
the OpenSop format is in the order of columns.
Instead of having:
| i j k a s0 s1 1
| 0 0 0 1 0 0 -5 = 0
|-1 0 0 0 1 0 0 = 0
| 0 -1 -1 0 0 1 0 = 0
| 0 0 0 0 1 0 0 >= 0 # The last four lines describe the
| 0 0 0 0 0 1 0 >= 0 # array size.
| 0 0 0 0 -1 0 1335 >= 0
| 0 0 0 0 0 -1 123 >= 0
In OpenScop we have:
| a s0 s1 i j k 1
| 1 0 0 0 0 0 -5 = 0
| 0 1 0 -1 0 0 0 = 0
| 0 0 1 0 -1 -1 0 = 0
| 0 1 0 0 0 0 0 >= 0 # The last four lines describe the
| 0 0 1 0 0 0 0 >= 0 # array size.
| 0 -1 0 0 0 0 1335 >= 0
| 0 0 -1 0 0 0 123 >= 0
The OpenScop access function is printed as follows:
| 1 # The number of disjunct components in a union of access functions.
| R C O I L P # Described bellow.
| a s0 s1 i j k 1
| 1 0 0 0 0 0 -5 = 0
| 0 1 0 -1 0 0 0 = 0
| 0 0 1 0 -1 -1 0 = 0
| 0 1 0 0 0 0 0 >= 0 # The last four lines describe the
| 0 0 1 0 0 0 0 >= 0 # array size.
| 0 -1 0 0 0 0 1335 >= 0
| 0 0 -1 0 0 0 123 >= 0
Where:
- R: Number of rows.
- C: Number of columns.
- O: Number of output dimensions = alias set + number of subscripts.
- I: Number of input dimensions (iterators).
- L: Number of local (existentially quantified) dimensions.
- P: Number of parameters.
In the example, the vector "R C O I L P" is "7 7 3 2 0 1".
void* poly_dr::compiler_dr |
A pointer to compiler's data reference description.
int poly_dr::dr_base_object_set |
Data reference's base object set number, we must assure 2 pdrs are in the
same base object set before dependency checking.
An identifier for this PDR.
The number of data refs identical to this one in the PBB.
The number of subscripts.
A pointer to the PBB that contains this data reference.
The documentation for this struct was generated from the following file: