reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

tools/polly/lib/External/isl/isl_pw_eval.c
   22 static __isl_give isl_val *FN(PW,eval_void)(__isl_take PW *pw,
   28 	FN(PW,free)(pw);
   38 __isl_give isl_val *FN(PW,eval)(__isl_take PW *pw, __isl_take isl_point *pnt)
   49 	pw_space = FN(PW,peek_space)(pw);
   61 		return FN(PW,eval_void)(pw, pnt);
   72 		v = FN(EL,eval)(FN(EL,copy)(pw->p[i].FIELD),
   72 		v = FN(EL,eval)(FN(EL,copy)(pw->p[i].FIELD),
   79 	FN(PW,free)(pw);
   83 	FN(PW,free)(pw);
tools/polly/lib/External/isl/isl_pw_hash.c
   14 uint32_t FN(PW,get_hash)(__isl_keep PW *pw)
   28 		el_hash = FN(EL,get_hash)(pw->p[i].FIELD);
tools/polly/lib/External/isl/isl_pw_templ.c
   22 __isl_give PW *FN(PW,alloc_size)(__isl_take isl_space *dim,
   25 __isl_give PW *FN(PW,alloc_size)(__isl_take isl_space *dim, int n)
   54 __isl_give PW *FN(PW,ZERO)(__isl_take isl_space *dim, enum isl_fold type)
   56 	return FN(PW,alloc_size)(dim, type, 0);
   59 __isl_give PW *FN(PW,ZERO)(__isl_take isl_space *dim)
   61 	return FN(PW,alloc_size)(dim, 0);
   65 __isl_give PW *FN(PW,add_piece)(__isl_take PW *pw,
   74 	if (isl_set_plain_is_empty(set) || FN(EL,EL_IS_ZERO)(el)) {
   76 		FN(EL,free)(el);
   86 	el_dim = FN(EL,get_space(el));
   98 	FN(PW,free)(pw);
  100 	FN(EL,free)(el);
  106 static isl_bool FN(PW,compatible_domain)(__isl_keep EL *el,
  115 	el_space = FN(EL,get_space)(el);
  124 static isl_stat FN(PW,check_compatible_domain)(__isl_keep EL *el,
  129 	ok = FN(PW,compatible_domain)(el, set);
  140 __isl_give PW *FN(PW,alloc)(enum isl_fold type,
  143 __isl_give PW *FN(PW,alloc)(__isl_take isl_set *set, __isl_take EL *el)
  148 	if (FN(PW,check_compatible_domain)(el, set) < 0)
  152 	pw = FN(PW,alloc_size)(FN(EL,get_space)(el), type, 1);
  152 	pw = FN(PW,alloc_size)(FN(EL,get_space)(el), type, 1);
  154 	pw = FN(PW,alloc_size)(FN(EL,get_space)(el), 1);
  154 	pw = FN(PW,alloc_size)(FN(EL,get_space)(el), 1);
  157 	return FN(PW,add_piece)(pw, set, el);
  160 	FN(EL,free)(el);
  164 __isl_give PW *FN(PW,dup)(__isl_keep PW *pw)
  173 	dup = FN(PW,alloc_size)(isl_space_copy(pw->dim), pw->type, pw->n);
  175 	dup = FN(PW,alloc_size)(isl_space_copy(pw->dim), pw->n);
  181 		dup = FN(PW,add_piece)(dup, isl_set_copy(pw->p[i].set),
  182 					    FN(EL,copy)(pw->p[i].FIELD));
  187 __isl_give PW *FN(PW,cow)(__isl_take PW *pw)
  195 	return FN(PW,dup)(pw);
  198 __isl_give PW *FN(PW,copy)(__isl_keep PW *pw)
  207 __isl_null PW *FN(PW,free)(__isl_take PW *pw)
  218 		FN(EL,free)(pw->p[i].FIELD);
  226 const char *FN(PW,get_dim_name)(__isl_keep PW *pw, enum isl_dim_type type,
  232 isl_bool FN(PW,has_dim_id)(__isl_keep PW *pw, enum isl_dim_type type,
  238 __isl_give isl_id *FN(PW,get_dim_id)(__isl_keep PW *pw, enum isl_dim_type type,
  244 isl_bool FN(PW,has_tuple_name)(__isl_keep PW *pw, enum isl_dim_type type)
  249 const char *FN(PW,get_tuple_name)(__isl_keep PW *pw, enum isl_dim_type type)
  254 isl_bool FN(PW,has_tuple_id)(__isl_keep PW *pw, enum isl_dim_type type)
  259 __isl_give isl_id *FN(PW,get_tuple_id)(__isl_keep PW *pw, enum isl_dim_type type)
  264 isl_bool FN(PW,IS_ZERO)(__isl_keep PW *pw)
  273 __isl_give PW *FN(PW,realign_domain)(__isl_take PW *pw,
  278 	pw = FN(PW,cow)(pw);
  287 		pw->p[i].FIELD = FN(EL,realign_domain)(pw->p[i].FIELD,
  293 	pw = FN(PW,reset_domain_space)(pw, isl_reordering_get_space(exp));
  299 	FN(PW,free)(pw);
  306 isl_stat FN(PW,check_named_params)(__isl_keep PW *pw)
  308 	return isl_space_check_named_params(FN(PW,peek_space)(pw));
  313 __isl_give PW *FN(PW,align_params)(__isl_take PW *pw, __isl_take isl_space *model)
  325 	if (FN(PW,check_named_params)(pw) < 0)
  335 					FN(PW,get_domain_space)(pw));
  336 		pw = FN(PW,realign_domain)(pw, exp);
  343 	FN(PW,free)(pw);
  347 static __isl_give PW *FN(PW,align_params_pw_pw_and)(__isl_take PW *pw1,
  360 	if (FN(PW,check_named_params)(pw1) < 0 ||
  361 	    FN(PW,check_named_params)(pw2) < 0)
  363 	pw1 = FN(PW,align_params)(pw1, FN(PW,get_space)(pw2));
  363 	pw1 = FN(PW,align_params)(pw1, FN(PW,get_space)(pw2));
  364 	pw2 = FN(PW,align_params)(pw2, FN(PW,get_space)(pw1));
  364 	pw2 = FN(PW,align_params)(pw2, FN(PW,get_space)(pw1));
  367 	FN(PW,free)(pw1);
  368 	FN(PW,free)(pw2);
  372 static __isl_give PW *FN(PW,align_params_pw_set_and)(__isl_take PW *pw,
  386 	ctx = FN(PW,get_ctx)(pw);
  387 	if (FN(PW,check_named_params)(pw) < 0)
  392 	pw = FN(PW,align_params)(pw, isl_set_get_space(set));
  393 	set = isl_set_align_params(set, FN(PW,get_space)(pw));
  396 	FN(PW,free)(pw);
  402 static __isl_give PW *FN(PW,union_add_aligned)(__isl_take PW *pw1,
  421 	if (FN(PW,IS_ZERO)(pw1)) {
  422 		FN(PW,free)(pw1);
  426 	if (FN(PW,IS_ZERO)(pw2)) {
  427 		FN(PW,free)(pw2);
  433 	res = FN(PW,alloc_size)(isl_space_copy(pw1->dim), pw1->type, n);
  435 	res = FN(PW,alloc_size)(isl_space_copy(pw1->dim), n);
  452 			sum = FN(EL,add_on_domain)(common,
  453 						   FN(EL,copy)(pw1->p[i].FIELD),
  454 						   FN(EL,copy)(pw2->p[j].FIELD));
  456 			res = FN(PW,add_piece)(res, common, sum);
  458 		res = FN(PW,add_piece)(res, set, FN(EL,copy)(pw1->p[i].FIELD));
  458 		res = FN(PW,add_piece)(res, set, FN(EL,copy)(pw1->p[i].FIELD));
  466 		res = FN(PW,add_piece)(res, set, FN(EL,copy)(pw2->p[j].FIELD));
  466 		res = FN(PW,add_piece)(res, set, FN(EL,copy)(pw2->p[j].FIELD));
  469 	FN(PW,free)(pw1);
  470 	FN(PW,free)(pw2);
  474 	FN(PW,free)(pw1);
  475 	FN(PW,free)(pw2);
  482 static __isl_give PW *FN(PW,union_add_)(__isl_take PW *pw1, __isl_take PW *pw2)
  484 	return FN(PW,align_params_pw_pw_and)(pw1, pw2,
  485 						&FN(PW,union_add_aligned));
  493 static __isl_give PW *FN(PW,grow)(__isl_take PW *pw, int n)
  503 	ctx = FN(PW,get_ctx)(pw);
  509 			return FN(PW,free)(pw);
  514 	res = FN(PW,alloc_size)(isl_space_copy(pw->dim), pw->type, n);
  516 	res = FN(PW,alloc_size)(isl_space_copy(pw->dim), n);
  519 		return FN(PW,free)(pw);
  521 		res = FN(PW,add_piece)(res, isl_set_copy(pw->p[i].set),
  522 					    FN(EL,copy)(pw->p[i].FIELD));
  523 	FN(PW,free)(pw);
  527 static __isl_give PW *FN(PW,add_disjoint_aligned)(__isl_take PW *pw1,
  537 		return FN(PW,add_disjoint_aligned)(pw2, pw1);
  547 	if (FN(PW,IS_ZERO)(pw1)) {
  548 		FN(PW,free)(pw1);
  552 	if (FN(PW,IS_ZERO)(pw2)) {
  553 		FN(PW,free)(pw2);
  557 	pw1 = FN(PW,grow)(pw1, pw2->n);
  562 		pw1 = FN(PW,add_piece)(pw1,
  564 				FN(EL,copy)(pw2->p[i].FIELD));
  566 	FN(PW,free)(pw2);
  570 	FN(PW,free)(pw1);
  571 	FN(PW,free)(pw2);
  575 __isl_give PW *FN(PW,add_disjoint)(__isl_take PW *pw1, __isl_take PW *pw2)
  577 	return FN(PW,align_params_pw_pw_and)(pw1, pw2,
  578 						&FN(PW,add_disjoint_aligned));
  583 static __isl_give PW *FN(PW,on_shared_domain_in)(__isl_take PW *pw1,
  591 static __isl_give PW *FN(PW,on_shared_domain_in)(__isl_take PW *pw1,
  603 	res = FN(PW,alloc_size)(isl_space_copy(space), pw1->type, n);
  605 	res = FN(PW,alloc_size)(isl_space_copy(space), n);
  625 			res_ij = fn(FN(EL,copy)(pw1->p[i].FIELD),
  626 				    FN(EL,copy)(pw2->p[j].FIELD));
  627 			res_ij = FN(EL,gist)(res_ij, isl_set_copy(common));
  629 			res = FN(PW,add_piece)(res, common, res_ij);
  634 	FN(PW,free)(pw1);
  635 	FN(PW,free)(pw2);
  639 	FN(PW,free)(pw1);
  640 	FN(PW,free)(pw2);
  641 	FN(PW,free)(res);
  647 static __isl_give PW *FN(PW,on_shared_domain)(__isl_take PW *pw1,
  655 static __isl_give PW *FN(PW,on_shared_domain)(__isl_take PW *pw1,
  665 	return FN(PW,on_shared_domain_in)(pw1, pw2, space, fn);
  667 	FN(PW,free)(pw1);
  668 	FN(PW,free)(pw2);
  673 __isl_give PW *FN(PW,neg)(__isl_take PW *pw)
  680 	if (FN(PW,IS_ZERO)(pw))
  683 	pw = FN(PW,cow)(pw);
  688 		pw->p[i].FIELD = FN(EL,neg)(pw->p[i].FIELD);
  690 			return FN(PW,free)(pw);
  698 __isl_give PW *FN(PW,sub)(__isl_take PW *pw1, __isl_take PW *pw2)
  700 	return FN(PW,add)(pw1, FN(PW,neg)(pw2));
  700 	return FN(PW,add)(pw1, FN(PW,neg)(pw2));
  706 __isl_give isl_set *FN(PW,params)(__isl_take PW *pw)
  708 	return isl_set_params(FN(PW,domain)(pw));
  711 __isl_give isl_set *FN(PW,domain)(__isl_take PW *pw)
  719 	dom = isl_set_empty(FN(PW,get_domain_space)(pw));
  723 	FN(PW,free)(pw);
  733 static int FN(PW,exploit_equalities_and_remove_if_empty)(__isl_keep PW *pw,
  743 		FN(EL,free)(pw->p[i].FIELD);
  752 	pw->p[i].FIELD = FN(EL,substitute_equalities)(pw->p[i].FIELD, aff);
  762 __isl_give PW *FN(PW,from_range)(__isl_take PW *pw)
  769 		isl_die(FN(PW,get_ctx)(pw), isl_error_invalid,
  770 			"not living in a set space", return FN(PW,free)(pw));
  772 	space = FN(PW,get_space)(pw);
  774 	pw = FN(PW,reset_space)(pw, space);
  782 __isl_give PW *FN(PW,fix_si)(__isl_take PW *pw, enum isl_dim_type type,
  791 		isl_die(FN(PW,get_ctx)(pw), isl_error_invalid,
  792 			"cannot fix output dimension", return FN(PW,free)(pw));
  800 	pw = FN(PW,cow)(pw);
  802 		return FN(PW,free)(pw);
  806 		if (FN(PW,exploit_equalities_and_remove_if_empty)(pw, i) < 0)
  807 			return FN(PW,free)(pw);
  817 static __isl_give PW *FN(PW,restrict_domain_aligned)(__isl_take PW *pw,
  832 	pw = FN(PW,cow)(pw);
  838 		if (FN(PW,exploit_equalities_and_remove_if_empty)(pw, i) < 0)
  846 	FN(PW,free)(pw);
  850 static __isl_give PW *FN(PW,intersect_domain_aligned)(__isl_take PW *pw,
  853 	return FN(PW,restrict_domain_aligned)(pw, set, &isl_set_intersect);
  856 __isl_give PW *FN(PW,intersect_domain)(__isl_take PW *pw,
  859 	return FN(PW,align_params_pw_set_and)(pw, context,
  860 					&FN(PW,intersect_domain_aligned));
  863 static __isl_give PW *FN(PW,intersect_params_aligned)(__isl_take PW *pw,
  866 	return FN(PW,restrict_domain_aligned)(pw, set,
  872 __isl_give PW *FN(PW,intersect_params)(__isl_take PW *pw,
  875 	return FN(PW,align_params_pw_set_and)(pw, context,
  876 					&FN(PW,intersect_params_aligned));
  882 static __isl_give PW *FN(PW,subtract_domain_aligned)(__isl_take PW *pw,
  885 	return FN(PW,restrict_domain_aligned)(pw, domain, &isl_set_subtract);
  890 __isl_give PW *FN(PW,subtract_domain)(__isl_take PW *pw,
  893 	return FN(PW,align_params_pw_set_and)(pw, domain,
  894 					&FN(PW,subtract_domain_aligned));
  904 static __isl_give PW *FN(PW,gist_last)(__isl_take PW *pw,
  913 		FN(EL,free)(pw->p[i].FIELD);
  926 		return FN(PW,free)(pw);
  938 static __isl_give PW *FN(PW,gist_aligned)(__isl_take PW *pw,
  970 		pw = FN(PW,align_params)(pw, isl_set_get_space(context));
  971 		context = isl_set_align_params(context, FN(PW,get_space)(pw));
  974 	pw = FN(PW,cow)(pw);
  985 			return FN(PW,gist_last)(pw, context, fn_el);
 1002 				return FN(PW,gist_last)(pw, context, fn_el);
 1014 			FN(EL,free)(pw->p[i].FIELD);
 1026 	FN(PW,free)(pw);
 1032 static __isl_give PW *FN(PW,gist_domain_aligned)(__isl_take PW *pw,
 1035 	return FN(PW,gist_aligned)(pw, set, &FN(EL,gist),
 1035 	return FN(PW,gist_aligned)(pw, set, &FN(EL,gist),
 1039 __isl_give PW *FN(PW,gist)(__isl_take PW *pw, __isl_take isl_set *context)
 1041 	return FN(PW,align_params_pw_set_and)(pw, context,
 1042 						&FN(PW,gist_domain_aligned));
 1045 static __isl_give PW *FN(PW,gist_params_aligned)(__isl_take PW *pw,
 1048 	return FN(PW,gist_aligned)(pw, set, &FN(EL,gist_params),
 1048 	return FN(PW,gist_aligned)(pw, set, &FN(EL,gist_params),
 1052 __isl_give PW *FN(PW,gist_params)(__isl_take PW *pw,
 1055 	return FN(PW,align_params_pw_set_and)(pw, context,
 1056 						&FN(PW,gist_params_aligned));
 1065 static int FN(PW,sort_field_cmp)(const void *p1, const void *p2, void *arg)
 1067 	struct FN(PW,piece) const *pc1 = p1;
 1068 	struct FN(PW,piece) const *pc2 = p2;
 1070 	return FN(EL,plain_cmp)(pc1->FIELD, pc2->FIELD);
 1082 __isl_give PW *FN(PW,sort)(__isl_take PW *pw)
 1092 		    &FN(PW,sort_field_cmp), NULL) < 0)
 1093 		return FN(PW,free)(pw);
 1095 		if (!FN(EL,plain_is_equal)(pw->p[i - 1].FIELD, pw->p[i].FIELD))
 1100 			return FN(PW,free)(pw);
 1102 		FN(EL,free)(pw->p[i].FIELD);
 1120 __isl_give PW *FN(PW,coalesce)(__isl_take PW *pw)
 1124 	pw = FN(PW,sort)(pw);
 1136 	FN(PW,free)(pw);
 1140 isl_ctx *FN(PW,get_ctx)(__isl_keep PW *pw)
 1145 isl_bool FN(PW,involves_dims)(__isl_keep PW *pw, enum isl_dim_type type,
 1159 		isl_bool involves = FN(EL,involves_dims)(pw->p[i].FIELD,
 1171 __isl_give PW *FN(PW,set_dim_name)(__isl_take PW *pw,
 1177 	pw = FN(PW,cow)(pw);
 1192 		pw->p[i].FIELD = FN(EL,set_dim_name)(pw->p[i].FIELD, type, pos, s);
 1199 	FN(PW,free)(pw);
 1203 __isl_give PW *FN(PW,drop_dims)(__isl_take PW *pw,
 1216 	pw = FN(PW,cow)(pw);
 1223 		pw->p[i].FIELD = FN(EL,drop_dims)(pw->p[i].FIELD, type, first, n);
 1235 	FN(PW,free)(pw);
 1244 __isl_give PW *FN(PW,project_out)(__isl_take PW *pw,
 1257 	pw = FN(PW,cow)(pw);
 1268 		pw->p[i].FIELD = FN(EL,drop_dims)(pw->p[i].FIELD, type, first, n);
 1275 	FN(PW,free)(pw);
 1281 __isl_give PW *FN(PW,project_domain_on_params)(__isl_take PW *pw)
 1286 	n = FN(PW,dim)(pw, isl_dim_in);
 1287 	pw = FN(PW,project_out)(pw, isl_dim_in, 0, n);
 1288 	space = FN(PW,get_domain_space)(pw);
 1290 	pw = FN(PW,reset_domain_space)(pw, space);
 1296 __isl_give PW *FN(PW,drop_unused_params)(__isl_take PW *pw)
 1300 	if (FN(PW,check_named_params)(pw) < 0)
 1301 		return FN(PW,free)(pw);
 1303 	for (i = FN(PW,dim)(pw, isl_dim_param) - 1; i >= 0; i--) {
 1306 		involves = FN(PW,involves_dims)(pw, isl_dim_param, i, 1);
 1308 			return FN(PW,free)(pw);
 1310 			pw = FN(PW,drop_dims)(pw, isl_dim_param, i, 1);
 1317 __isl_give PW *FN(PW,insert_dims)(__isl_take PW *pw, enum isl_dim_type type,
 1330 	pw = FN(PW,cow)(pw);
 1343 		pw->p[i].FIELD = FN(EL,insert_dims)(pw->p[i].FIELD,
 1351 	FN(PW,free)(pw);
 1356 __isl_give PW *FN(PW,fix_dim)(__isl_take PW *pw,
 1367 	pw = FN(PW,cow)(pw);
 1372 		if (FN(PW,exploit_equalities_and_remove_if_empty)(pw, i) < 0)
 1373 			return FN(PW,free)(pw);
 1382 __isl_give PW *FN(PW,fix_val)(__isl_take PW *pw,
 1386 		return FN(PW,free)(pw);
 1388 		isl_die(FN(PW,get_ctx)(pw), isl_error_invalid,
 1391 	pw = FN(PW,fix_dim)(pw, type, pos, v->n);
 1397 	return FN(PW,free)(pw);
 1400 unsigned FN(PW,dim)(__isl_keep PW *pw, enum isl_dim_type type)
 1405 __isl_give PW *FN(PW,split_dims)(__isl_take PW *pw,
 1418 	pw = FN(PW,cow)(pw);
 1431 	FN(PW,free)(pw);
 1441 __isl_give isl_val *FN(PW,opt)(__isl_take PW *pw, int max)
 1450 		opt = isl_val_zero(FN(PW,get_ctx)(pw));
 1451 		FN(PW,free)(pw);
 1455 	opt = FN(EL,opt_on_domain)(FN(EL,copy)(pw->p[0].FIELD),
 1455 	opt = FN(EL,opt_on_domain)(FN(EL,copy)(pw->p[0].FIELD),
 1459 		opt_i = FN(EL,opt_on_domain)(FN(EL,copy)(pw->p[i].FIELD),
 1459 		opt_i = FN(EL,opt_on_domain)(FN(EL,copy)(pw->p[i].FIELD),
 1467 	FN(PW,free)(pw);
 1471 __isl_give isl_val *FN(PW,max)(__isl_take PW *pw)
 1473 	return FN(PW,opt)(pw, 1);
 1476 __isl_give isl_val *FN(PW,min)(__isl_take PW *pw)
 1478 	return FN(PW,opt)(pw, 0);
 1484 __isl_keep isl_space *FN(PW,peek_space)(__isl_keep PW *pw)
 1489 __isl_give isl_space *FN(PW,get_space)(__isl_keep PW *pw)
 1491 	return isl_space_copy(FN(PW,peek_space)(pw));
 1494 __isl_give isl_space *FN(PW,get_domain_space)(__isl_keep PW *pw)
 1503 int FN(PW,find_dim_by_name)(__isl_keep PW *pw,
 1516 static __isl_give PW *FN(PW,reset_space_and_domain)(__isl_take PW *pw,
 1521 	pw = FN(PW,cow)(pw);
 1530 		pw->p[i].FIELD = FN(EL,reset_space_and_domain)(pw->p[i].FIELD,
 1545 	FN(PW,free)(pw);
 1549 __isl_give PW *FN(PW,reset_domain_space)(__isl_take PW *pw,
 1555 						   FN(PW,get_space)(pw));
 1556 	return FN(PW,reset_space_and_domain)(pw, space, domain);
 1559 __isl_give PW *FN(PW,reset_space)(__isl_take PW *pw, __isl_take isl_space *dim)
 1564 	return FN(PW,reset_space_and_domain)(pw, dim, domain);
 1567 __isl_give PW *FN(PW,set_tuple_id)(__isl_take PW *pw, enum isl_dim_type type,
 1572 	pw = FN(PW,cow)(pw);
 1576 	space = FN(PW,get_space)(pw);
 1579 	return FN(PW,reset_space)(pw, space);
 1582 	return FN(PW,free)(pw);
 1587 __isl_give PW *FN(PW,reset_tuple_id)(__isl_take PW *pw, enum isl_dim_type type)
 1593 	if (!FN(PW,has_tuple_id)(pw, type))
 1596 	pw = FN(PW,cow)(pw);
 1600 	space = FN(PW,get_space)(pw);
 1603 	return FN(PW,reset_space)(pw, space);
 1606 __isl_give PW *FN(PW,set_dim_id)(__isl_take PW *pw,
 1609 	pw = FN(PW,cow)(pw);
 1613 	return FN(PW,reset_space)(pw, isl_space_copy(pw->dim));
 1616 	return FN(PW,free)(pw);
 1623 __isl_give PW *FN(PW,reset_user)(__isl_take PW *pw)
 1627 	space = FN(PW,get_space)(pw);
 1630 	return FN(PW,reset_space)(pw, space);
 1633 isl_bool FN(PW,has_equal_space)(__isl_keep PW *pw1, __isl_keep PW *pw2)
 1642 __isl_give PW *FN(PW,morph_domain)(__isl_take PW *pw,
 1655 	pw = FN(PW,cow)(pw);
 1667 		pw->p[i].FIELD = FN(EL,morph_domain)(pw->p[i].FIELD,
 1677 	FN(PW,free)(pw);
 1683 int FN(PW,n_piece)(__isl_keep PW *pw)
 1688 isl_stat FN(PW,foreach_piece)(__isl_keep PW *pw,
 1699 				FN(EL,copy)(pw->p[i].FIELD), user) < 0)
 1737 		copy = FN(EL,copy)(el);
 1738 		copy = FN(EL,lift)(copy, isl_set_get_space(lift));
 1745 	FN(EL,free)(el);
 1750 	FN(EL,free)(el);
 1754 isl_stat FN(PW,foreach_lifted_piece)(__isl_keep PW *pw,
 1772 		el = FN(EL,copy)(pw->p[i].FIELD);
 1787 __isl_give PW *FN(PW,move_dims)(__isl_take PW *pw,
 1793 	pw = FN(PW,cow)(pw);
 1802 		pw->p[i].FIELD = FN(EL,move_dims)(pw->p[i].FIELD,
 1823 	FN(PW,free)(pw);
 1828 __isl_give PW *FN(PW,mul_isl_int)(__isl_take PW *pw, isl_int v)
 1836 		isl_space *dim = FN(PW,get_space)(pw);
 1838 		zero = FN(PW,ZERO)(dim, pw->type);
 1840 		zero = FN(PW,ZERO)(dim);
 1842 		FN(PW,free)(pw);
 1845 	pw = FN(PW,cow)(pw);
 1856 		pw->p[i].FIELD = FN(EL,scale)(pw->p[i].FIELD, v);
 1863 	FN(PW,free)(pw);
 1869 __isl_give PW *FN(PW,scale_val)(__isl_take PW *pw, __isl_take isl_val *v)
 1882 		isl_space *space = FN(PW,get_space)(pw);
 1884 		zero = FN(PW,ZERO)(space, pw->type);
 1886 		zero = FN(PW,ZERO)(space);
 1888 		FN(PW,free)(pw);
 1896 	pw = FN(PW,cow)(pw);
 1905 		pw->p[i].FIELD = FN(EL,scale_val)(pw->p[i].FIELD,
 1915 	FN(PW,free)(pw);
 1921 __isl_give PW *FN(PW,scale_down_val)(__isl_take PW *pw, __isl_take isl_val *v)
 1944 	pw = FN(PW,cow)(pw);
 1953 		pw->p[i].FIELD = FN(EL,scale_down_val)(pw->p[i].FIELD,
 1963 	FN(PW,free)(pw);
 1967 __isl_give PW *FN(PW,scale)(__isl_take PW *pw, isl_int v)
 1969 	return FN(PW,mul_isl_int)(pw, v);
 1981 __isl_give PW *FN(PW,normalize)(__isl_take PW *pw)
 1986 	pw = FN(PW,sort)(pw);
 1992 			return FN(PW,free)(pw);
 2008 isl_bool FN(PW,plain_is_equal)(__isl_keep PW *pw1, __isl_keep PW *pw2)
 2016 	has_nan = FN(PW,involves_nan)(pw1);
 2018 		has_nan = FN(PW,involves_nan)(pw2);
 2027 	pw1 = FN(PW,copy)(pw1);
 2028 	pw2 = FN(PW,copy)(pw2);
 2029 	pw1 = FN(PW,normalize)(pw1);
 2030 	pw2 = FN(PW,normalize)(pw2);
 2041 		equal = FN(EL,plain_is_equal)(pw1->p[i].FIELD, pw2->p[i].FIELD);
 2046 	FN(PW,free)(pw1);
 2047 	FN(PW,free)(pw2);
 2050 	FN(PW,free)(pw1);
 2051 	FN(PW,free)(pw2);
 2057 isl_bool FN(PW,involves_nan)(__isl_keep PW *pw)
 2067 		isl_bool has_nan = FN(EL,involves_nan)(pw->p[i].FIELD);
 2076 static __isl_give PW *FN(PW,align_params_pw_multi_aff_and)(__isl_take PW *pw,
 2094 	ctx = FN(PW,get_ctx)(pw);
 2095 	if (FN(PW,check_named_params)(pw) < 0)
 2100 	pw = FN(PW,align_params)(pw, ma_space);
 2101 	ma = isl_multi_aff_align_params(ma, FN(PW,get_space)(pw));
 2105 	FN(PW,free)(pw);
 2110 static __isl_give PW *FN(PW,align_params_pw_pw_multi_aff_and)(__isl_take PW *pw,
 2128 	if (FN(PW,check_named_params)(pw) < 0 ||
 2131 	pw = FN(PW,align_params)(pw, pma_space);
 2132 	pma = isl_pw_multi_aff_align_params(pma, FN(PW,get_space)(pw));
 2136 	FN(PW,free)(pw);
 2144 static __isl_give PW *FN(PW,pullback_multi_aff_aligned)(__isl_take PW *pw,
 2151 	pw = FN(PW,cow)(pw);
 2156 				FN(PW,get_space)(pw));
 2163 		pw->p[i].FIELD = FN(EL,pullback_multi_aff)(pw->p[i].FIELD,
 2169 	pw = FN(PW,reset_space)(pw, space);
 2175 	FN(PW,free)(pw);
 2179 __isl_give PW *FN(PW,pullback_multi_aff)(__isl_take PW *pw,
 2182 	return FN(PW,align_params_pw_multi_aff_and)(pw, ma,
 2183 					&FN(PW,pullback_multi_aff_aligned));
 2189 static __isl_give PW *FN(PW,pullback_pw_multi_aff_aligned)(__isl_take PW *pw,
 2201 					FN(PW,get_space)(pw));
 2203 		res = FN(PW,empty)(space);
 2204 		FN(PW,free)(pw);
 2208 	res = FN(PW,pullback_multi_aff)(FN(PW,copy)(pw),
 2208 	res = FN(PW,pullback_multi_aff)(FN(PW,copy)(pw),
 2210 	res = FN(PW,intersect_domain)(res, isl_set_copy(pma->p[0].set));
 2215 		res_i = FN(PW,pullback_multi_aff)(FN(PW,copy)(pw),
 2215 		res_i = FN(PW,pullback_multi_aff)(FN(PW,copy)(pw),
 2217 		res_i = FN(PW,intersect_domain)(res_i,
 2219 		res = FN(PW,add_disjoint)(res, res_i);
 2223 	FN(PW,free)(pw);
 2227 	FN(PW,free)(pw);
 2231 __isl_give PW *FN(PW,pullback_pw_multi_aff)(__isl_take PW *pw,
 2234 	return FN(PW,align_params_pw_pw_multi_aff_and)(pw, pma,
 2235 					&FN(PW,pullback_pw_multi_aff_aligned));
tools/polly/lib/External/isl/isl_pw_templ.h
    5 __isl_keep isl_space *FN(PW,peek_space)(__isl_keep PW *pw);
tools/polly/lib/External/isl/isl_pw_union_opt.c
   18 static __isl_give isl_set *FN(PW,better)(__isl_keep EL *el1, __isl_keep EL *el2,
   21 	return cmp(FN(EL,copy)(el1), FN(EL,copy)(el2));
   21 	return cmp(FN(EL,copy)(el1), FN(EL,copy)(el2));
   26 static __isl_give isl_set_list *FN(PW,extract_domains)(__isl_keep PW *pw)
   34 	ctx = FN(PW,get_ctx)(pw);
   46 static __isl_give isl_set *FN(PW,better_or_out)(__isl_take isl_set *set,
   61 static __isl_give isl_set *FN(PW,worse_or_out)(__isl_take isl_set *set,
   87 static __isl_give PW *FN(PW,merge)(__isl_take PW *pw1, __isl_take PW *pw2,
   96 	res = FN(PW,alloc_size)(isl_space_copy(pw1->dim), pw1->n + pw2->n);
  105 			cmp = FN(EL,plain_cmp)(pw1->p[i].FIELD,
  112 			el = FN(EL,copy)(pw1->p[i].FIELD);
  116 			el = FN(EL,copy)(pw2->p[j].FIELD);
  121 			el = FN(EL,copy)(pw1->p[i].FIELD);
  125 		res = FN(PW,add_piece)(res, set, el);
  130 	FN(PW,free)(pw1);
  131 	FN(PW,free)(pw2);
  136 	FN(PW,free)(pw1);
  137 	FN(PW,free)(pw2);
  182 static __isl_give PW *FN(PW,union_opt_cmp)(
  200 	if (FN(PW,is_empty)(pw1)) {
  201 		FN(PW,free)(pw1);
  205 	if (FN(PW,is_empty)(pw2)) {
  206 		FN(PW,free)(pw2);
  210 	pw1 = FN(PW,sort)(pw1);
  211 	pw2 = FN(PW,sort)(pw2);
  215 	list1 = FN(PW,extract_domains)(pw1);
  216 	list2 = FN(PW,extract_domains)(pw2);
  229 			better = FN(PW,better)(pw2->p[j].FIELD,
  233 			set_i = FN(PW,worse_or_out)(set_i,
  238 			set_j = FN(PW,better_or_out)(set_j, better, set_i);
  243 	res = FN(PW,merge)(pw1, pw2, list1, list2);
  249 	FN(PW,free)(pw1);
  250 	FN(PW,free)(pw2);
  252 	return FN(PW,free)(res);