Lines Matching refs:graft
111 static __isl_give isl_ast_graft *at_each_domain(__isl_take isl_ast_graft *graft,
114 if (!graft || !build)
115 return isl_ast_graft_free(graft);
117 return graft;
123 return isl_ast_graft_free(graft);
125 graft->node = build->at_each_domain(graft->node,
129 if (!graft->node)
130 graft = isl_ast_graft_free(graft);
132 return graft;
146 * will be added as a guard to the graft in create_node_scaled,
157 isl_ast_graft *graft;
171 graft = isl_ast_graft_alloc_domain(map, build);
172 graft = at_each_domain(graft, executed, build);
175 graft = isl_ast_graft_add_guard(graft, guard, data->build);
177 list = isl_ast_graft_list_from_ast_graft(graft);
271 * graft to ensure that they will be generated.
284 isl_ast_graft *graft;
297 graft = isl_ast_graft_alloc(node, build);
298 graft = isl_ast_graft_add_guard(graft, guard, build);
300 return isl_ast_graft_list_from_ast_graft(graft);
368 static __isl_give isl_ast_graft *after_each_for(__isl_take isl_ast_graft *graft,
371 if (!graft || !build)
372 return isl_ast_graft_free(graft);
374 return graft;
375 graft->node = build->after_each_for(graft->node, build,
377 if (!graft->node)
378 return isl_ast_graft_free(graft);
379 return graft;
773 /* Update "graft" based on "sub_build" for the degenerate case.
775 * "build" is the build in which graft->node was created
785 __isl_take isl_ast_graft *graft, __isl_keep isl_ast_build *build,
791 if (!graft || !sub_build)
792 return isl_ast_graft_free(graft);
797 graft->node = isl_ast_node_for_set_init(graft->node, init);
798 if (!graft->node)
799 return isl_ast_graft_free(graft);
801 return graft;
834 * graft->node and add those constraints to graft->enforced,
862 __isl_take isl_ast_graft *graft,
872 if (!graft || n < 0)
873 return isl_ast_graft_free(graft);
899 graft = isl_ast_graft_enforce(graft, enforced);
901 return graft;
905 * graft->node and add those constraints to graft->enforced,
913 __isl_take isl_ast_graft *graft,
923 graft = isl_ast_graft_enforce(graft, enforced);
925 return graft;
991 /* Set the condition part of the for node graft->node in case
1005 __isl_take isl_ast_graft *graft, __isl_keep isl_pw_aff_list *list,
1012 if (!graft || !list)
1013 return isl_ast_graft_free(graft);
1017 return isl_ast_graft_free(graft);
1025 iterator = isl_ast_expr_copy(graft->node->u.f.iterator);
1027 graft->node = isl_ast_node_for_set_cond(graft->node, cond);
1030 if (!graft->node)
1031 return isl_ast_graft_free(graft);
1032 return graft;
1035 /* Set the condition part of the for node graft->node in case
1039 __isl_take isl_ast_graft *graft, __isl_keep isl_set *set,
1044 if (!graft)
1048 graft->node = isl_ast_node_for_set_cond(graft->node, cond);
1049 if (!graft->node)
1050 return isl_ast_graft_free(graft);
1051 return graft;
1103 /* Fill in the expressions of the for node in graft->node.
1112 __isl_take isl_ast_graft *graft, __isl_keep isl_pw_aff_list *lower,
1118 if (!graft)
1122 graft->node = isl_ast_node_for_set_init(graft->node, init);
1123 graft->node = isl_ast_node_for_set_inc(graft->node, for_inc(build));
1125 if (!graft->node)
1126 graft = isl_ast_graft_free(graft);
1129 graft = set_for_cond_from_list(graft, upper_list, build);
1131 graft = set_for_cond_from_set(graft, upper_set, build);
1133 return graft;
1136 /* Update "graft" based on "bounds" and "domain" for the generic,
1168 __isl_take isl_ast_graft *graft,
1182 if (!graft || !c_lower || !c_upper || depth < 0)
1185 ctx = isl_ast_graft_get_ctx(graft);
1206 graft = set_enforced_from_list(graft, lower, upper_list);
1208 graft = set_enforced_from_set(graft, lower, depth, upper_set);
1210 graft = set_for_node_expressions(graft, lower, use_list, upper_list,
1219 return graft;
1223 return isl_ast_graft_free(graft);
1258 /* Update "graft" based on "bounds" and "domain" for the generic,
1267 * "build" is the build in which graft->node was created.
1275 __isl_take isl_ast_graft *graft, __isl_take isl_constraint_list *list,
1287 return isl_ast_graft_free(graft);
1293 return isl_ast_graft_free(graft);
1298 return isl_ast_graft_free(graft);
1306 return refine_generic_bounds(graft, lower, upper, domain, build);
1309 /* Update "graft" based on "bounds" and "domain" for the generic,
1315 * "build" is the build in which graft->node was created.
1321 __isl_take isl_ast_graft *graft,
1327 if (!build || !graft)
1328 return isl_ast_graft_free(graft);
1332 graft = refine_generic_split(graft, list, domain, build);
1334 return graft;
1450 * create a surrounding graft for the current level and insert
1452 * Before creating a graft for the current level, we first extract
1456 * of the current graft to ensure that they will be generated.
1467 * have been replaced by the guard of the current graft.
1482 isl_ast_graft *graft;
1534 graft = isl_ast_graft_alloc_from_children(children,
1540 graft = isl_ast_graft_insert_for(graft, node);
1545 graft = refine_degenerate(graft, for_build, sub_build);
1547 graft = refine_generic(graft, bounds,
1553 graft = after_each_for(graft, body_build);
1561 return graft;
1820 isl_ast_graft *graft;
1847 graft = create_node(executed, bounds, domain,
1849 list = isl_ast_graft_list_add(list, graft);
2140 * with either zero or one graft and collect the these single element
2184 * into a list with either zero or one graft and collects these (at most)
2188 * graft lists from different components.
3443 * First combine the grafts into a single graft and then add the guard.
3451 isl_ast_graft *graft;
3462 graft = isl_ast_graft_list_get_ast_graft(list, 0);
3463 graft = isl_ast_graft_add_guard(graft, isl_set_copy(guard), build);
3464 list = isl_ast_graft_list_set_ast_graft(list, 0, graft);
5304 /* Hoist a list of grafts (in practice containing a single graft)
5310 * of the single graft.
5316 isl_ast_graft *graft;
5339 graft = isl_ast_graft_alloc_from_children(list, guard, enforced,
5341 list = isl_ast_graft_list_from_ast_graft(graft);
5363 * we combine the list of grafts into a single graft within
5581 * constructs by adding it to the guard of the graft.
5594 isl_ast_graft *graft;
5630 graft = isl_ast_graft_alloc_from_children(list, guard, enforced,
5635 return isl_ast_graft_list_from_ast_graft(graft);
5662 __isl_take isl_ast_graft *graft, __isl_keep isl_ast_build *build)
5664 if (!graft || !build)
5665 return isl_ast_graft_free(graft);
5667 return graft;
5668 graft->node = build->after_each_mark(graft->node, build,
5670 if (!graft->node)
5671 return isl_ast_graft_free(graft);
5672 return graft;
5687 * the graft list into a single graft and then insert the mark
5688 * in the AST of that single graft.
5695 isl_ast_graft *graft;
5713 graft = isl_ast_graft_list_get_ast_graft(list, 0);
5714 graft = isl_ast_graft_insert_mark(graft, mark);
5715 graft = after_each_mark(graft, build);
5716 list = isl_ast_graft_list_set_ast_graft(list, 0, graft);