[clang-repl] [codegen] Reduce the state in TBAA. NFC for static compilation. (#98138)
[llvm-project.git] / polly / lib / External / isl / isl_unbind_params_templ.c
blob3365c7a686c820cf0ead5ecb7d2ad29d3977203e
1 /*
2 * Copyright 2018 Sven Verdoolaege
4 * Use of this software is governed by the MIT license
6 * Written by Sven Verdoolaege.
7 */
9 /* Given a function "obj" defined over a parameter domain,
10 * convert it to a function defined over a domain corresponding
11 * to "domain".
12 * Any parameters with identifiers in "domain" are reinterpreted
13 * as the corresponding domain dimensions.
15 __isl_give TYPE *FN(TYPE,unbind_params_insert_domain)(
16 __isl_take TYPE *obj, __isl_take isl_multi_id *domain)
18 isl_bool is_params;
19 isl_space *space;
20 isl_reordering *r;
22 space = FN(TYPE,get_domain_space)(obj);
23 is_params = isl_space_is_params(space);
24 if (is_params < 0)
25 domain = isl_multi_id_free(domain);
26 else if (!is_params)
27 isl_die(FN(TYPE,get_ctx)(obj), isl_error_invalid,
28 "expecting function with parameter domain",
29 domain = isl_multi_id_free(domain));
30 r = isl_reordering_unbind_params_insert_domain(space, domain);
31 isl_space_free(space);
32 isl_multi_id_free(domain);
34 return FN(TYPE,realign_domain)(obj, r);