97 fprintf(stderr,
"%d -> %d; ", *src, *dst);
115 for (i = 0; i < scc_graph->
n; ++i) {
117 fprintf(stderr,
", ");
118 fprintf(stderr,
"%d", scc_graph->
graph_scc[i]);
120 fprintf(stderr,
"\n");
121 for (i = 0; i < scc_graph->
n; ++i) {
125 fprintf(stderr,
"\n");
126 for (i = 0; i < scc_graph->
n; ++i) {
130 fprintf(stderr,
"\n");
145 for (i = 0; i < scc_graph->
n; ++i)
149 for (i = 0; i < scc_graph->
n; ++i)
156 free(scc_graph->
size);
157 free(scc_graph->
pos);
203 int src,
int dst,
int reserve)
209 ctx = scc_graph->
ctx;
237 ctx = scc_graph->
ctx;
270static int cmp_int(
const void *
a,
const void *
b,
void *data)
354 while (edge_table[
pos]->
n == 1) {
367 if (edge_table[
pos]->
n == 0)
370 ctx =
data->scc_graph->ctx;
430 for (j = n_next - 2; j >= 0; --j)
552 for (i = 0; i <
n; ++i) {
629 int dst, sub_dst, sub_src;
635 sub_src = scc_graph->
pos[data->
src];
636 sub_dst = scc_graph->
pos[dst];
668 for (i = 0; i <
n; ++i)
671 for (i = 0; i <
n; ++i)
676 for (i = 0; i <
n; ++i) {
705 int (*el)(
int i,
void *
user),
void *
user,
int n,
712 for (i = 0; i <
n; ++i)
716 return isl_union_set_list_add(list, dom);
777 filters = isl_union_set_list_add(filters, dom);
814 filters = isl_union_set_list_alloc(scc_graph->
ctx, scc_graph->
n);
815 for (i = 0; i < scc_graph->
n; ++i) {
817 filters = isl_union_set_list_add(filters, dom);
822 for (i = 0; i < scc_graph->
n; ++i) {
866 for (i = 0; i < scc_graph->
n; ++i)
933 if (dst >= data->
end)
952 data.
end = first +
n;
953 for (i = 0; i <
n; ++i) {
954 data.
src = first + i;
998 for (i = 0; i <
n; ++i) {
1000 if (component[first + i] == first + i)
1003 component[first + i] = component[component[first + i]];
1004 size[component[first + i]]++;
1009 for (j = 0; j < n_component; ++j) {
1010 while (
size[first + i] == 0)
1012 pos[first + i] = sum;
1013 sum +=
size[first + i];
1014 size[first + j] =
size[first + i++];
1016 for (i = 0; i <
n; ++i)
1017 sorted[
pos[component[first + i]]++] = first + i;
1041 filters = isl_union_set_list_alloc(ctx, n_component);
1043 for (i = 0; i < n_component; ++i) {
1046 n =
size[first + i];
1048 &sorted[sum],
n, filters);
1089 if (n_component == 1)
1096 for (i = 0; i < n_component; ++i) {
1099 n =
size[first + i];
1139 int split_score = -1;
1146 if (n_fwd <= 1 && n_bwd <= 1)
1148 if (split_score >= n_fwd + n_bwd)
1151 split_score = n_fwd + n_bwd;
for(int c0=1;c0< 3 *M - 1;c0+=3)
void isl_ctx_deref(struct isl_ctx *ctx)
#define isl_alloc_array(ctx, type, n)
#define isl_calloc_array(ctx, type, n)
#define isl_alloc_type(ctx, type)
void isl_ctx_ref(struct isl_ctx *ctx)
isl_bool isl_bool_not(isl_bool b)
struct isl_hash_table_entry * isl_hash_table_entry_none
#define isl_hash_builtin(h, l)
void isl_hash_table_remove(struct isl_ctx *ctx, struct isl_hash_table *table, struct isl_hash_table_entry *entry)
void isl_hash_table_free(struct isl_ctx *ctx, struct isl_hash_table *table)
isl_stat isl_hash_table_foreach(isl_ctx *ctx, struct isl_hash_table *table, isl_stat(*fn)(void **entry, void *user), void *user)
struct isl_hash_table_entry * isl_hash_table_find(struct isl_ctx *ctx, struct isl_hash_table *table, uint32_t key_hash, isl_bool(*eq)(const void *entry, const void *val), const void *val, int reserve)
struct isl_hash_table * isl_hash_table_alloc(struct isl_ctx *ctx, int min_size)
__isl_export __isl_give ISL_HMAP __isl_take ISL_KEY __isl_take ISL_VAL * val
isl_stat isl_stat(*) void user)
void GMPZAPI() sub(mp_int rop, mp_int op1, mp_int op2)
struct isl_hash_table_entry * isl_hash_table_first(struct isl_hash_table *table)
static unsigned pos(__isl_keep isl_space *space, enum isl_dim_type type)
@ isl_edge_conditional_validity
__isl_give isl_schedule_node * isl_schedule_node_compute_finish_band(__isl_take isl_schedule_node *node, struct isl_sched_graph *graph, int initialized)
__isl_give isl_union_set * isl_sched_graph_extract_scc(isl_ctx *ctx, struct isl_sched_graph *graph, int scc)
static void isl_scc_graph_merge_src_dst(struct isl_scc_graph *scc_graph, int a, int b)
__isl_give isl_schedule_node * isl_scc_graph_decompose(struct isl_scc_graph *scc_graph, __isl_take isl_schedule_node *node)
static struct isl_scc_graph * isl_scc_graph_alloc(isl_ctx *ctx, int n, struct isl_sched_graph *graph, struct isl_clustering *c)
static isl_stat extract_dst(void **entry, void *user)
static __isl_give isl_union_set_list * isl_scc_graph_add_scc_indirect_seq(struct isl_scc_graph *scc_graph, int *seq, int n, __isl_take isl_union_set_list *list)
static int assign(int *component, int a, int b)
static int cmp_int(const void *a, const void *b, void *data)
static isl_stat foreach_reachable(struct isl_foreach_reachable_data *data, int pos)
static isl_stat add_reverse(void **entry, void *user)
static __isl_give isl_schedule_node * detect_components_at(struct isl_scc_graph *scc_graph, int first, int n, __isl_take isl_schedule_node *node, int child)
static struct isl_scc_graph * isl_scc_graph_reduce(struct isl_scc_graph *scc_graph)
static __isl_give isl_schedule_node * isl_scc_graph_chain(struct isl_scc_graph *scc_graph, __isl_take isl_schedule_node *node)
static struct isl_scc_graph * isl_scc_graph_add_reverse_edges(struct isl_scc_graph *scc_graph)
static void isl_scc_graph_init_component(struct isl_scc_graph *scc_graph)
static int isl_scc_graph_local_index(struct isl_scc_graph *scc_graph, int *data)
static __isl_give isl_schedule_node * isl_scc_graph_finish_band(struct isl_scc_graph *scc_graph, __isl_take isl_schedule_node *node, int pos)
static isl_stat isl_scc_graph_add_edge(struct isl_scc_graph *scc_graph, struct isl_hash_table **edge_table, int src, int dst)
static isl_stat print_edge(void **entry, void *user)
static isl_stat add_scc_edge(void **entry, void *user)
void isl_scc_graph_dump(struct isl_scc_graph *scc_graph)
static int * next_nodes(struct isl_scc_graph *scc_graph, int i)
static __isl_give isl_union_set_list * extract_components(struct isl_scc_graph *scc_graph, int first, int n_component)
static __isl_give isl_union_set_list * isl_scc_graph_add_scc_seq(struct isl_scc_graph *scc_graph, int first, int n, __isl_take isl_union_set_list *list)
static int isl_scc_graph_sort_components(struct isl_scc_graph *scc_graph, int first, int n)
static int at(int i, void *user)
static void * isl_scc_graph_encode_local_index(struct isl_scc_graph *scc_graph, int pos)
static isl_bool elim_or_next(int pos, void *user)
static int best_split(struct isl_scc_graph *scc_graph)
static __isl_give isl_schedule_node * recurse(struct isl_scc_graph *scc_graph, int *pos, int n, __isl_take isl_schedule_node *node)
static isl_bool isl_scc_graph_remove_edge(struct isl_scc_graph *scc_graph, int src, int dst)
struct isl_scc_graph * isl_scc_graph_from_sched_graph(isl_ctx *ctx, struct isl_sched_graph *graph, struct isl_clustering *c)
static isl_stat recurse_foreach_reachable(void **entry, void *user)
static isl_stat merge_src_dst(void **entry, void *user)
static __isl_give isl_union_set * isl_scc_graph_extract_local_scc(struct isl_scc_graph *scc_graph, int pos)
static isl_stat isl_scc_graph_merge_components(struct isl_scc_graph *scc_graph, int first, int n)
static __isl_give isl_union_set_list * add_scc_seq(struct isl_scc_graph *scc_graph, int(*el)(int i, void *user), void *user, int n, __isl_take isl_union_set_list *list)
struct isl_hash_table_entry * isl_scc_graph_find_edge(struct isl_scc_graph *scc_graph, struct isl_hash_table **edge_table, int src, int dst, int reserve)
static isl_bool is_scc_node(const void *entry, const void *val)
static __isl_give isl_union_set_list * extract_split_scc(struct isl_scc_graph *scc_graph, int pos)
static __isl_give isl_schedule_node * detect_components(struct isl_scc_graph *scc_graph, int first, int n, __isl_take isl_schedule_node *node)
static struct isl_scc_graph * isl_scc_graph_sub(struct isl_scc_graph *scc_graph, int *pos, int n)
static isl_stat copy_edge(void **entry, void *user)
struct isl_scc_graph * isl_scc_graph_free(struct isl_scc_graph *scc_graph)
int isl_sort(void *const pbase, size_t total_elems, size_t size, int(*cmp)(const void *, const void *, void *arg), void *arg)
static __isl_give isl_set * split(__isl_take isl_set *empty, __isl_take isl_set *min_expr, __isl_take isl_mat *cst)
#define isl_union_set_list
__isl_give isl_schedule_node * isl_schedule_node_grandchild(__isl_take isl_schedule_node *node, int pos1, int pos2)
__isl_give isl_schedule_node * isl_schedule_node_sequence_splice_children(__isl_take isl_schedule_node *node)
__isl_give isl_schedule_node * isl_schedule_node_grandparent(__isl_take isl_schedule_node *node)
__isl_null isl_schedule_node * isl_schedule_node_free(__isl_take isl_schedule_node *node)
__isl_export __isl_give isl_schedule_node * isl_schedule_node_insert_sequence(__isl_take isl_schedule_node *node, __isl_take isl_union_set_list *filters)
__isl_export __isl_give isl_schedule_node * isl_schedule_node_insert_set(__isl_take isl_schedule_node *node, __isl_take isl_union_set_list *filters)
struct isl_sched_graph * cluster
struct isl_scc_graph * sub
struct isl_scc_graph * scc_graph
struct isl_scc_graph * scc_graph
isl_bool(* fn)(int pos, void *user)
struct isl_scc_graph * scc_graph
struct isl_scc_graph * scc_graph
struct isl_hash_table ** edge_table
struct isl_sched_graph * graph
struct isl_clustering * c
struct isl_hash_table ** reverse_edge_table
struct isl_sched_node * dst
struct isl_sched_node * src
struct isl_hash_table * edge_table[isl_edge_last+1]
struct isl_union_set isl_union_set
__isl_export __isl_give isl_union_set * isl_union_set_union(__isl_take isl_union_set *uset1, __isl_take isl_union_set *uset2)
__isl_overload __isl_give isl_union_set * isl_union_set_empty_ctx(isl_ctx *ctx)