store ppcg_options in ppcg_scop
[ppcg.git] / ppcg.h
blobec4f7d14c695da7fc5cbede78fdd8ef8740e2b9d
1 #ifndef PPCG_H
2 #define PPCG_H
4 #include <isl/set.h>
5 #include <isl/union_set.h>
6 #include <isl/union_map.h>
7 #include <pet.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 read accesses.
23 * "live_in" contains read accesses that have no corresponding
24 * writes in the scop.
25 * "writes" contains all write accesses.
26 * "kills" contains all kill accesses.
27 * "dep_flow" represents the flow dependences.
28 * "dep_false" represents the false (anti and output) dependences.
29 * "schedule" represents the (original) schedule.
31 * "arrays" and "stmts" are copies of the corresponding elements
32 * of the original pet_scop.
34 struct ppcg_scop {
35 struct ppcg_options *options;
37 unsigned start;
38 unsigned end;
40 isl_set *context;
41 isl_union_set *domain;
42 isl_union_set *call;
43 isl_union_map *reads;
44 isl_union_map *live_in;
45 isl_union_map *writes;
46 isl_union_map *kills;
47 isl_union_map *dep_flow;
48 isl_union_map *dep_false;
49 isl_union_map *schedule;
51 int n_array;
52 struct pet_array **arrays;
53 int n_stmt;
54 struct pet_stmt **stmts;
57 int ppcg_transform(isl_ctx *ctx, const char *input, FILE *out,
58 struct ppcg_options *options,
59 __isl_give isl_printer *(*fn)(__isl_take isl_printer *p,
60 struct ppcg_scop *scop, void *user), void *user);
62 #endif