isl_ast_build_ast_from_schedule: coalesce input schedule
[isl.git] / isl_schedule_private.h
blob4e12724c2e7ddb86b446a663aacc954dd11d407a
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_coincidence,
11 isl_edge_condition,
12 isl_edge_conditional_validity,
13 isl_edge_proximity,
14 isl_edge_last = isl_edge_proximity
17 /* The constraints that need to be satisfied by a schedule on "domain".
19 * "validity" constraints map domain elements i to domain elements
20 * that should be scheduled after i. (Hard constraint)
21 * "proximity" constraints map domain elements i to domains elements
22 * that should be scheduled as early as possible after i (or before i).
23 * (Soft constraint)
25 * "condition" and "conditional_validity" constraints map possibly "tagged"
26 * domain elements i -> s to "tagged" domain elements j -> t.
27 * The elements of the "conditional_validity" constraints, but without the
28 * tags (i.e., the elements i -> j) are treated as validity constraints,
29 * except that during the construction of a tilable band,
30 * the elements of the "conditional_validity" constraints may be violated
31 * provided that all adjacent elements of the "condition" constraints
32 * are local within the band.
33 * A dependence is local within a band if domain and range are mapped
34 * to the same schedule point by the band.
36 struct isl_schedule_constraints {
37 isl_union_set *domain;
39 isl_union_map *constraint[isl_edge_last + 1];
42 /* The schedule for an individual domain, plus information about the bands
43 * and scheduling dimensions.
44 * In particular, we keep track of the number of bands and for each
45 * band, the starting position of the next band. The first band starts at
46 * position 0.
47 * For each scheduling dimension, we keep track of whether it satisfies
48 * the coincidence constraints (within its band).
50 struct isl_schedule_node {
51 isl_multi_aff *sched;
52 int n_band;
53 int *band_end;
54 int *band_id;
55 int *coincident;
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