Polly 23.0.0git
isl_union_domain_reverse_templ.c
Go to the documentation of this file.
1/*
2 * Copyright 2023 Sven Verdoolaege
3 *
4 * Use of this software is governed by the MIT license
5 *
6 * Written by Sven Verdoolaege
7 */
8
9/* Is "part" defined over a domain wrapping a binary relation?
10 */
11static isl_bool FN(UNION,select_domain_is_wrapping_entry)(__isl_keep PART *part,
12 void *user)
13{
14 return isl_space_domain_is_wrapping(FN(PART,peek_space)(part));
15}
16
17/* Wrapper around PART_domain_reverse for use
18 * as an isl_union_*_transform callback.
19 */
20static __isl_give PART *FN(UNION,domain_reverse_entry)(__isl_take PART *part,
21 void *user)
22{
23 return FN(PART,domain_reverse)(part);
24}
25
26/* For each base expression defined on a domain (A -> B),
27 * interchange A and B in the wrapped domain
28 * to obtain an expression on the domain (B -> A) and
29 * collect the results.
30 */
32{
33 S(UNION,transform_control) control = {
34 .filter = &FN(UNION,select_domain_is_wrapping_entry),
35 .fn = &FN(UNION,domain_reverse_entry),
36 };
37
38 return FN(UNION,transform)(u, &control);
39}
#define FN(TYPE, NAME)
#define __isl_take
Definition ctx.h:22
#define __isl_give
Definition ctx.h:19
#define __isl_keep
Definition ctx.h:25
isl_bool
Definition ctx.h:89
isl_stat isl_stat void * user
Definition hmap.h:39
#define S(TYPE, NAME)
static isl_stat transform(isl_ctx *ctx, struct isl_sched_graph *graph, struct isl_sched_node *t_node)
#define PART
#define UNION
isl_bool isl_space_domain_is_wrapping(__isl_keep isl_space *space)
Definition isl_space.c:2882