21 #ifndef GCC_TREE_DATA_REF_H
22 #define GCC_TREE_DATA_REF_H
143 #define AM_LOOP_NEST(M) (M)->loop_nest
144 #define AM_NB_INDUCTION_VARS(M) (M)->nb_induction_vars
145 #define AM_PARAMETERS(M) (M)->parameters
146 #define AM_MATRIX(M) (M)->matrix
147 #define AM_NB_PARAMETERS(M) (AM_PARAMETERS(M)).length ()
148 #define AM_CONST_COLUMN_INDEX(M) (AM_NB_INDUCTION_VARS (M) + AM_NB_PARAMETERS (M))
149 #define AM_NB_COLUMNS(M) (AM_NB_INDUCTION_VARS (M) + AM_NB_PARAMETERS (M) + 1)
150 #define AM_GET_SUBSCRIPT_ACCESS_VECTOR(M, I) AM_MATRIX (M)[I]
151 #define AM_GET_ACCESS_MATRIX_ELEMENT(M, I, J) AM_GET_SUBSCRIPT_ACCESS_VECTOR (M, I)[J]
161 for (i = 0;
AM_LOOP_NEST (access_matrix).iterate (i, &l); i++)
162 if (l->
num == loop_num)
195 #define DR_STMT(DR) (DR)->stmt
196 #define DR_REF(DR) (DR)->ref
197 #define DR_BASE_OBJECT(DR) (DR)->indices.base_object
198 #define DR_UNCONSTRAINED_BASE(DR) (DR)->indices.unconstrained_base
199 #define DR_ACCESS_FNS(DR) (DR)->indices.access_fns
200 #define DR_ACCESS_FN(DR, I) DR_ACCESS_FNS (DR)[I]
201 #define DR_NUM_DIMENSIONS(DR) DR_ACCESS_FNS (DR).length ()
202 #define DR_IS_READ(DR) (DR)->is_read
203 #define DR_IS_WRITE(DR) (!DR_IS_READ (DR))
204 #define DR_BASE_ADDRESS(DR) (DR)->innermost.base_address
205 #define DR_OFFSET(DR) (DR)->innermost.offset
206 #define DR_INIT(DR) (DR)->innermost.init
207 #define DR_STEP(DR) (DR)->innermost.step
208 #define DR_PTR_INFO(DR) (DR)->alias.ptr_info
209 #define DR_ALIGNED_TO(DR) (DR)->innermost.aligned_to
210 #define DR_ACCESS_MATRIX(DR) (DR)->access_matrix
234 #define NO_DEPENDENCE 0
235 #define NOT_KNOWN (MAX_DIM + 1)
236 #define CF_NONTRIVIAL_P(CF) ((CF)->n != NO_DEPENDENCE && (CF)->n != NOT_KNOWN)
237 #define CF_NOT_KNOWN_P(CF) ((CF)->n == NOT_KNOWN)
238 #define CF_NO_DEPENDENCE_P(CF) ((CF)->n == NO_DEPENDENCE)
275 #define SUB_CONFLICTS_IN_A(SUB) SUB->conflicting_iterations_in_a
276 #define SUB_CONFLICTS_IN_B(SUB) SUB->conflicting_iterations_in_b
277 #define SUB_LAST_CONFLICT(SUB) SUB->last_conflict
278 #define SUB_DISTANCE(SUB) SUB->distance
334 #define DDR_A(DDR) DDR->a
335 #define DDR_B(DDR) DDR->b
336 #define DDR_AFFINE_P(DDR) DDR->affine_p
337 #define DDR_ARE_DEPENDENT(DDR) DDR->are_dependent
338 #define DDR_SUBSCRIPTS(DDR) DDR->subscripts
339 #define DDR_SUBSCRIPT(DDR, I) DDR_SUBSCRIPTS (DDR)[I]
340 #define DDR_NUM_SUBSCRIPTS(DDR) DDR_SUBSCRIPTS (DDR).length ()
342 #define DDR_LOOP_NEST(DDR) DDR->loop_nest
345 #define DDR_NB_LOOPS(DDR) (DDR_LOOP_NEST (DDR).length ())
346 #define DDR_INNER_LOOP(DDR) DDR->inner_loop
347 #define DDR_SELF_REFERENCE(DDR) DDR->self_reference_p
349 #define DDR_DIST_VECTS(DDR) ((DDR)->dist_vects)
350 #define DDR_DIR_VECTS(DDR) ((DDR)->dir_vects)
351 #define DDR_NUM_DIST_VECTS(DDR) \
352 (DDR_DIST_VECTS (DDR).length ())
353 #define DDR_NUM_DIR_VECTS(DDR) \
354 (DDR_DIR_VECTS (DDR).length ())
355 #define DDR_DIR_VECT(DDR, I) \
356 DDR_DIR_VECTS (DDR)[I]
357 #define DDR_DIST_VECT(DDR, I) \
358 DDR_DIST_VECTS (DDR)[I]
359 #define DDR_REVERSED_P(DDR) DDR->reversed_p
478 for (i = 0; dependence_relations.iterate (i, &ddr); i++)
489 static inline unsigned
494 for (i = 0; i < length; i++)
495 if (dist_vect[i] != 0)
503 static inline unsigned
536 #define RDGV_STMT(V) ((struct rdg_vertex *) ((V)->data))->stmt
537 #define RDGV_DATAREFS(V) ((struct rdg_vertex *) ((V)->data))->datarefs
538 #define RDGV_HAS_MEM_WRITE(V) ((struct rdg_vertex *) ((V)->data))->has_mem_write
539 #define RDGV_HAS_MEM_READS(V) ((struct rdg_vertex *) ((V)->data))->has_mem_reads
540 #define RDG_STMT(RDG, I) RDGV_STMT (&(RDG->vertices[I]))
541 #define RDG_DATAREFS(RDG, I) RDGV_DATAREFS (&(RDG->vertices[I]))
542 #define RDG_MEM_WRITE_STMT(RDG, I) RDGV_HAS_MEM_WRITE (&(RDG->vertices[I]))
543 #define RDG_MEM_READS_STMT(RDG, I) RDGV_HAS_MEM_READS (&(RDG->vertices[I]))
584 #define RDGE_TYPE(E) ((struct rdg_edge *) ((E)->data))->type
585 #define RDGE_LEVEL(E) ((struct rdg_edge *) ((E)->data))->level
586 #define RDGE_RELATION(E) ((struct rdg_edge *) ((E)->data))->relation
603 for (var_index = 0; loop_nest.iterate (var_index, &loopi);
605 if (loopi->
num == var)
620 if (TREE_CODE (
DR_REF (dr)) == COMPONENT_REF
621 && DECL_BIT_FIELD (TREE_OPERAND (
DR_REF (dr), 1)))
625 || TREE_CODE (
DR_STEP (dr)) != INTEGER_CST)
630 TYPE_SIZE_UNIT (TREE_TYPE (
DR_REF (dr))));
657 for (i = 1; i < size; i++)
658 gcd1 =
gcd (gcd1, vector[i]);
668 return (
lambda_vector) ggc_alloc_cleared_atomic (
sizeof (
int) * size);
676 memset (vec1, 0, size *
sizeof (*vec1));
687 for (i = 0; i < n; i++)
705 for (i = 0; i < size; i++)
722 for (i = 0; i < m; i++)