d9477ca192ac13b173255318e7d69be3dc443e67
[isl.git] / isl_schedule_private.h
blobd9477ca192ac13b173255318e7d69be3dc443e67
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_proximity,
11 isl_edge_last = isl_edge_proximity
14 /* The constraints that need to be satisfied by a schedule on "domain".
16 * "validity" constraints map domain elements i to domain elements
17 * that should be scheduled after i. (Hard constraint)
18 * "proximity" constraints map domain elements i to domains elements
19 * that should be scheduled as early as possible after i (or before i).
20 * (Soft constraint)
22 struct isl_schedule_constraints {
23 isl_union_set *domain;
25 isl_union_map *constraint[isl_edge_last + 1];
28 /* The schedule for an individual domain, plus information about the bands
29 * and scheduling dimensions.
30 * In particular, we keep track of the number of bands and for each
31 * band, the starting position of the next band. The first band starts at
32 * position 0.
33 * For each scheduling dimension, we keep track of whether it result
34 * in zero dependence distances (within its band) with respect
35 * to the proximity edges.
37 struct isl_schedule_node {
38 isl_multi_aff *sched;
39 int n_band;
40 int *band_end;
41 int *band_id;
42 int *zero;
45 /* Information about the computed schedule.
46 * n is the number of nodes/domains/statements.
47 * n_band is the maximal number of bands.
48 * n_total_row is the number of coordinates of the schedule.
49 * dim contains a description of the parameters.
50 * band_forest points to a band forest representation of the schedule
51 * and may be NULL if the forest hasn't been created yet.
53 struct isl_schedule {
54 int ref;
56 int n;
57 int n_band;
58 int n_total_row;
59 isl_space *dim;
61 isl_band_list *band_forest;
63 struct isl_schedule_node node[1];
66 #endif