4f46daf72a7756b15e0c87cbae64d6d2f30f5b9e
[isl.git] / isl_schedule_private.h
blob4f46daf72a7756b15e0c87cbae64d6d2f30f5b9e
1 #ifndef ISL_SCHEDLUE_PRIVATE_H
2 #define ISL_SCHEDLUE_PRIVATE_H
4 #include <isl/aff.h>
5 #include <isl/schedule.h>
7 enum isl_edge_type {
8 isl_edge_validity = 0,
9 isl_edge_first = isl_edge_validity,
10 isl_edge_condition,
11 isl_edge_conditional_validity,
12 isl_edge_proximity,
13 isl_edge_last = isl_edge_proximity
16 /* The constraints that need to be satisfied by a schedule on "domain".
18 * "validity" constraints map domain elements i to domain elements
19 * that should be scheduled after i. (Hard constraint)
20 * "proximity" constraints map domain elements i to domains elements
21 * that should be scheduled as early as possible after i (or before i).
22 * (Soft constraint)
24 * "condition" and "conditional_validity" constraints map possibly "tagged"
25 * domain elements i -> s to "tagged" domain elements j -> t.
26 * The elements of the "conditional_validity" constraints, but without the
27 * tags (i.e., the elements i -> j) are treated as validity constraints,
28 * except that during the construction of a tilable band,
29 * the elements of the "conditional_validity" constraints may be violated
30 * provided that all adjacent elements of the "condition" constraints
31 * are local within the band.
32 * A dependence is local within a band if domain and range are mapped
33 * to the same schedule point by the band.
35 struct isl_schedule_constraints {
36 isl_union_set *domain;
38 isl_union_map *constraint[isl_edge_last + 1];
41 /* The schedule for an individual domain, plus information about the bands
42 * and scheduling dimensions.
43 * In particular, we keep track of the number of bands and for each
44 * band, the starting position of the next band. The first band starts at
45 * position 0.
46 * For each scheduling dimension, we keep track of whether it result
47 * in zero dependence distances (within its band) with respect
48 * to the proximity edges.
50 struct isl_schedule_node {
51 isl_multi_aff *sched;
52 int n_band;
53 int *band_end;
54 int *band_id;
55 int *zero;
58 /* Information about the computed schedule.
59 * n is the number of nodes/domains/statements.
60 * n_band is the maximal number of bands.
61 * n_total_row is the number of coordinates of the schedule.
62 * dim contains a description of the parameters.
63 * band_forest points to a band forest representation of the schedule
64 * and may be NULL if the forest hasn't been created yet.
66 struct isl_schedule {
67 int ref;
69 int n;
70 int n_band;
71 int n_total_row;
72 isl_space *dim;
74 isl_band_list *band_forest;
76 struct isl_schedule_node node[1];
79 #endif