5 #include <isl/union_set.h>
6 #include <isl/union_map.h>
9 #include "ppcg_options.h"
11 int ppcg_extract_base_name(char *name
, const char *input
);
13 /* Representation of the scop for use inside PPCG.
15 * "options" are the options specified by the user.
16 * Some fields in this structure may depend on some of the options.
18 * "start" and "end" are file offsets of the corresponding program text.
19 * "context" represents constraints on the parameters.
20 * "domain" is the union of all iteration domains.
21 * "call" contains the iteration domains of statements with a call expression.
22 * "reads" contains all potential read accesses.
23 * "tagged_reads" is the same as "reads", except that the domain is a wrapped
24 * relation mapping an iteration domain to a reference identifier
25 * "live_in" contains the potential read accesses that potentially
26 * have no corresponding writes in the scop.
27 * "may_writes" contains all potential write accesses.
28 * "tagged_may_writes" is the same as "may_writes", except that the domain
29 * is a wrapped relation mapping an iteration domain
30 * to a reference identifier
31 * "must_writes" contains all definite write accesses.
32 * "tagged_must_writes" is the same as "must_writes", except that the domain
33 * is a wrapped relation mapping an iteration domain
34 * to a reference identifier
35 * "live_out" contains the potential write accesses that are potentially
36 * not killed by any kills or any other writes.
37 * "tagged_must_kills" contains all definite kill accesses with
38 * a reference identifier in the domain.
40 * "tagger" maps iteration domains to the corresponding tagged
43 * "independence" is the union of all independence filters.
45 * "dep_flow" represents the potential flow dependences.
46 * "tagged_dep_flow" is the same as "dep_flow", except that both domain and
47 * range are wrapped relations mapping an iteration domain to
48 * a reference identifier. May be NULL if not computed.
49 * "dep_false" represents the potential false (anti and output) dependences.
50 * "dep_external" represents the constraints that ensure that all live-in
51 * accesses remain live-in and that all live-out accesses remain live-out.
52 * "dep_order"/"tagged_dep_order" represents the order dependences between
53 * the live range intervals in "dep_flow"/"tagged_dep_flow".
54 * It is only used if the live_range_reordering
55 * option is set. Otherwise it is NULL.
56 * If "dep_order" is used, then "dep_false" only contains a limited
57 * set of anti and output dependences.
58 * "schedule" represents the (original) schedule.
60 * "types", "arrays", "stmts" and "independences"
61 * are copies of the corresponding elements of the original pet_scop.
64 struct ppcg_options
*options
;
70 isl_union_set
*domain
;
72 isl_union_map
*tagged_reads
;
74 isl_union_map
*live_in
;
75 isl_union_map
*tagged_may_writes
;
76 isl_union_map
*may_writes
;
77 isl_union_map
*tagged_must_writes
;
78 isl_union_map
*must_writes
;
79 isl_union_map
*live_out
;
80 isl_union_map
*tagged_must_kills
;
82 isl_union_map
*tagger
;
84 isl_union_map
*independence
;
86 isl_union_map
*dep_flow
;
87 isl_union_map
*tagged_dep_flow
;
88 isl_union_map
*dep_false
;
89 isl_union_map
*dep_external
;
90 isl_union_map
*dep_order
;
91 isl_union_map
*tagged_dep_order
;
92 isl_union_map
*schedule
;
95 struct pet_type
**types
;
97 struct pet_array
**arrays
;
99 struct pet_stmt
**stmts
;
101 struct pet_independence
**independences
;
104 int ppcg_transform(isl_ctx
*ctx
, const char *input
, FILE *out
,
105 struct ppcg_options
*options
,
106 __isl_give isl_printer
*(*fn
)(__isl_take isl_printer
*p
,
107 struct ppcg_scop
*scop
, void *user
), void *user
);