1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
| #ifndef ISL_AST_GRAFT_PRIVATE_H
#define ISL_AST_GRAFT_PRIVATE_H
#include <isl/ast.h>
#include <isl/set.h>
#include <isl/list.h>
#include <isl/printer.h>
struct isl_ast_graft;
typedef struct isl_ast_graft isl_ast_graft;
/* Representation of part of an AST ("node") with some additional polyhedral
* information about the tree.
*
* "guard" contains conditions that should still be enforced by
* some ancestor of the current tree. In particular, the already
* generated tree assumes that these conditions hold, but may not
* have enforced them itself.
* The guard should not contain any unknown divs as it will be used
* to generate an if condition.
*
* "enforced" expresses constraints that are already enforced by the for
* nodes in the current tree and that therefore do not need to be enforced
* by any ancestor.
* The constraints only involve outer loop iterators.
*/
struct isl_ast_graft {
int ref;
isl_ast_node *node;
isl_set *guard;
isl_basic_set *enforced;
};
ISL_DECLARE_LIST(ast_graft)
#undef EL
#define EL isl_ast_graft
#include <isl_list_templ.h>
isl_ctx *isl_ast_graft_get_ctx(__isl_keep isl_ast_graft *graft);
__isl_give isl_ast_graft *isl_ast_graft_alloc(
__isl_take isl_ast_node *node, __isl_keep isl_ast_build *build);
__isl_give isl_ast_graft *isl_ast_graft_alloc_from_children(
__isl_take isl_ast_graft_list *list, __isl_take isl_set *guard,
__isl_take isl_basic_set *enforced, __isl_keep isl_ast_build *build,
__isl_keep isl_ast_build *sub_build);
__isl_give isl_ast_graft_list *isl_ast_graft_list_fuse(
__isl_take isl_ast_graft_list *children,
__isl_keep isl_ast_build *build);
__isl_give isl_ast_graft *isl_ast_graft_alloc_domain(
__isl_take isl_map *schedule, __isl_keep isl_ast_build *build);
__isl_null isl_ast_graft *isl_ast_graft_free(__isl_take isl_ast_graft *graft);
__isl_give isl_ast_graft_list *isl_ast_graft_list_sort_guard(
__isl_take isl_ast_graft_list *list);
__isl_give isl_ast_graft_list *isl_ast_graft_list_merge(
__isl_take isl_ast_graft_list *list1,
__isl_take isl_ast_graft_list *list2,
__isl_keep isl_ast_build *build);
__isl_give isl_ast_node *isl_ast_graft_get_node(
__isl_keep isl_ast_graft *graft);
__isl_give isl_basic_set *isl_ast_graft_get_enforced(
__isl_keep isl_ast_graft *graft);
__isl_give isl_set *isl_ast_graft_get_guard(__isl_keep isl_ast_graft *graft);
__isl_give isl_ast_graft *isl_ast_graft_insert_for(
__isl_take isl_ast_graft *graft, __isl_take isl_ast_node *node);
__isl_give isl_ast_graft *isl_ast_graft_add_guard(
__isl_take isl_ast_graft *graft,
__isl_take isl_set *guard, __isl_keep isl_ast_build *build);
__isl_give isl_ast_graft *isl_ast_graft_enforce(
__isl_take isl_ast_graft *graft, __isl_take isl_basic_set *enforced);
__isl_give isl_ast_graft *isl_ast_graft_insert_mark(
__isl_take isl_ast_graft *graft, __isl_take isl_id *mark);
__isl_give isl_ast_graft_list *isl_ast_graft_list_unembed(
__isl_take isl_ast_graft_list *list, int product);
__isl_give isl_ast_graft_list *isl_ast_graft_list_preimage_multi_aff(
__isl_take isl_ast_graft_list *list, __isl_take isl_multi_aff *ma);
__isl_give isl_ast_graft_list *isl_ast_graft_list_insert_pending_guard_nodes(
__isl_take isl_ast_graft_list *list, __isl_keep isl_ast_build *build);
__isl_give isl_ast_node *isl_ast_node_from_graft_list(
__isl_take isl_ast_graft_list *list, __isl_keep isl_ast_build *build);
__isl_give isl_basic_set *isl_ast_graft_list_extract_shared_enforced(
__isl_keep isl_ast_graft_list *list, __isl_keep isl_ast_build *build);
__isl_give isl_set *isl_ast_graft_list_extract_hoistable_guard(
__isl_keep isl_ast_graft_list *list, __isl_keep isl_ast_build *build);
__isl_give isl_ast_graft_list *isl_ast_graft_list_gist_guards(
__isl_take isl_ast_graft_list *list, __isl_take isl_set *context);
__isl_give isl_printer *isl_printer_print_ast_graft(__isl_take isl_printer *p,
__isl_keep isl_ast_graft *graft);
#endif
|