22 #ifndef GCC_GRAPHITE_POLY_H
23 #define GCC_GRAPHITE_POLY_H
188 #define PDR_ID(PDR) (PDR->id)
189 #define PDR_NB_REFS(PDR) (PDR->nb_refs)
190 #define PDR_CDR(PDR) (PDR->compiler_dr)
191 #define PDR_PBB(PDR) (PDR->pbb)
192 #define PDR_TYPE(PDR) (PDR->type)
193 #define PDR_ACCESSES(PDR) (NULL)
194 #define PDR_BASE_OBJECT_SET(PDR) (PDR->dr_base_object_set)
195 #define PDR_NB_SUBSCRIPTS(PDR) (PDR->nb_subscripts)
356 #define PBB_BLACK_BOX(PBB) ((gimple_bb_p) PBB->black_box)
357 #define PBB_SCOP(PBB) (PBB->scop)
358 #define PBB_DOMAIN(PBB) (NULL)
359 #define PBB_DRS(PBB) (PBB->drs)
360 #define PBB_ORIGINAL(PBB) (PBB->_original)
361 #define PBB_ORIGINAL_SCATTERING(PBB) (NULL)
362 #define PBB_TRANSFORMED(PBB) (PBB->_transformed)
363 #define PBB_TRANSFORMED_SCATTERING(PBB) (NULL)
364 #define PBB_SAVED(PBB) (PBB->_saved)
368 #define PBB_NB_LOCAL_VARIABLES(PBB) (0)
369 #define PBB_NB_SCATTERING_TRANSFORM(PBB) (isl_map_n_out (PBB->transformed))
370 #define PBB_IS_REDUCTION(PBB) (PBB->is_reduction)
377 extern void print_pbb (FILE *, poly_bb_p,
int);
383 extern void print_pdrs (FILE *, poly_bb_p,
int);
419 for (i = 0;
PBB_DRS (pbb).iterate (i, &pdr); i++)
436 static inline poly_bb_p
488 return isl_set_dim (pbb->
domain, isl_dim_set);
690 #define LST_LOOP_P(LST) ((LST)->loop_p)
691 #define LST_LOOP_FATHER(LST) ((LST)->loop_father)
692 #define LST_PBB(LST) ((LST)->node.pbb)
693 #define LST_SEQ(LST) ((LST)->node.seq)
694 #define LST_LOOP_MEMORY_STRIDES(LST) ((LST)->memory_strides)
706 lst_p
lst = XNEW (
struct lst);
716 for (i = 0; seq.iterate (i, &l); i++)
727 lst_p lst = XNEW (
struct lst);
748 for (i = 0;
LST_SEQ (lst).iterate (i, &l); i++)
773 for (i = 0;
LST_SEQ (lst).iterate (i, &l); i++)
866 return LST_SEQ (father)[dewey - 1];
884 if (
LST_SEQ (father).length () == (
unsigned) dewey + 1)
887 return LST_SEQ (father)[dewey + 1];
905 for (i = 0;
LST_SEQ (lst).iterate (i, &l); i++)
945 for (i = 0;
LST_SEQ (lst).iterate (i, &l); i++)
978 for (i = 0;
LST_SEQ (lst).iterate (i, &l); i++)
1027 seq.quick_push (loop);
1044 LST_SEQ (father).ordered_remove (dewey);
1058 LST_SEQ (father).ordered_remove (dewey);
1063 LST_SEQ (father).safe_insert (dewey + i, l);
1088 isl_space *d = isl_map_get_space (pbb->
transformed);
1089 isl_space *
d1 = isl_space_range (d);
1090 unsigned i, n = isl_space_dim (d1, isl_dim_out);
1091 isl_space *
d2 = isl_space_add_dims (d1, isl_dim_in, n);
1092 isl_map *x = isl_map_universe (d2);
1094 x = isl_map_fix_si (x, isl_dim_out, sched, dewey);
1096 for (i = 0; i < n; i++)
1098 x = isl_map_equate (x, isl_dim_in, i, isl_dim_out, i);
1112 gcc_assert (lst && level >= 0 && dewey >= 0);
1115 for (i = 0;
LST_SEQ (lst).iterate (i, &l); i++)
1139 gcc_assert (lst && father && dewey >= 0 && level >= 0);
1141 for (i = dewey;
LST_SEQ (father).iterate (i, &l); i++)
1146 for (i = 0;
LST_SEQ (lst).iterate (i, &l); i++)
1168 LST_SEQ (father).safe_insert (before ? dewey : dewey + 1, lst1);
1186 LST_SEQ (father)[dewey] = lst2;
1209 for (i = 0;
LST_SEQ (root).iterate (i, &l); i++)
1254 for (i = 0;
LST_SEQ (loop).iterate (i, &l);)
1259 if (
LST_SEQ (l).length () == 0)
1261 LST_SEQ (loop).ordered_remove (i);
1274 LST_SEQ (loop).ordered_remove (i);
1280 LST_SEQ (loop).ordered_remove (i);
1303 for (i = 0;
LST_SEQ (loop).iterate (i, &l);)
1308 if (
LST_SEQ (l).length () == 0)
1310 LST_SEQ (loop).ordered_remove (i);
1319 if (before &&
LST_PBB (l) != pbb)
1321 LST_SEQ (loop).ordered_remove (i);
1329 before = before ?
false :
true;
1384 #define SCOP_BBS(S) (S->bbs)
1385 #define SCOP_REGION(S) ((sese) S->region)
1386 #define SCOP_CONTEXT(S) (NULL)
1387 #define SCOP_ORIGINAL_SCHEDULE(S) (S->original_schedule)
1388 #define SCOP_TRANSFORMED_SCHEDULE(S) (S->transformed_schedule)
1389 #define SCOP_SAVED_SCHEDULE(S) (S->saved_schedule)
1390 #define POLY_SCOP_P(S) (S->poly_scop_p)
1433 static inline poly_scattering_p
1453 static inline poly_scattering_p
1468 isl_map_free (pbb->
saved);
1502 for (i = 0;
SCOP_BBS (scop).iterate (i, &pbb); i++)
1527 for (i = 0;
SCOP_BBS (scop).iterate (i, &pbb); i++)
1536 __isl_give isl_union_map *
extend_schedule (__isl_take isl_union_map *);
1541 isl_union_map **must_raw,
1542 isl_union_map **may_raw,
1543 isl_union_map **must_raw_no_source,
1544 isl_union_map **may_raw_no_source,
1545 isl_union_map **must_war,
1546 isl_union_map **may_war,
1547 isl_union_map **must_war_no_source,
1548 isl_union_map **may_war_no_source,
1549 isl_union_map **must_waw,
1550 isl_union_map **may_waw,
1551 isl_union_map **must_waw_no_source,
1552 isl_union_map **may_waw_no_source);