2018-04-21 16:34:22 +08:00
|
|
|
/*
|
|
|
|
* Copyright 2017 Sven Verdoolaege
|
|
|
|
*
|
|
|
|
* Use of this software is governed by the MIT license
|
|
|
|
*
|
|
|
|
* Written by Sven Verdoolaege.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* These versions of the explicit domain functions are used
|
|
|
|
* when the multi expression cannot have an explicit domain.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <isl/space.h>
|
|
|
|
|
|
|
|
#include <isl_multi_macro.h>
|
|
|
|
|
|
|
|
/* Does "multi" have an explicit domain?
|
|
|
|
*
|
|
|
|
* No.
|
|
|
|
*/
|
|
|
|
static int FN(MULTI(BASE),has_explicit_domain)(__isl_keep MULTI(BASE) *multi)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Initialize the explicit domain of "multi".
|
|
|
|
* "multi" cannot have an explicit domain, so this function is never called.
|
|
|
|
*/
|
|
|
|
static __isl_give MULTI(BASE) *FN(MULTI(BASE),init_explicit_domain)(
|
|
|
|
__isl_take MULTI(BASE) *multi)
|
|
|
|
{
|
|
|
|
return multi;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Intersect the domain of "dst" with the explicit domain of "src".
|
|
|
|
* "src" cannot have an explicit domain, so this function is never called.
|
|
|
|
*/
|
|
|
|
static __isl_give MULTI(BASE) *FN(MULTI(BASE),intersect_explicit_domain)(
|
|
|
|
__isl_take MULTI(BASE) *dst, __isl_keep MULTI(BASE) *src)
|
|
|
|
{
|
|
|
|
return dst;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Set the explicit domain of "dst" to that of "src".
|
|
|
|
* "src" and "dst" cannot have an explicit domain,
|
|
|
|
* so this function is never called.
|
|
|
|
*/
|
|
|
|
static __isl_give MULTI(BASE) *FN(MULTI(BASE),copy_explicit_domain)(
|
|
|
|
__isl_take MULTI(BASE) *dst, __isl_keep MULTI(BASE) *src)
|
|
|
|
{
|
|
|
|
return dst;
|
|
|
|
}
|
|
|
|
|
[Polly] Update ISL to isl-0.22.1-87-gfee05a13.
The primary motivation is to fix an assertion failure in
isl_basic_map_alloc_equality:
isl_assert(ctx, room_for_con(bmap, 1), return -1);
Although the assertion does not occur anymore, I could not identify
which of ISL's commits fixed it.
Compared to the previous ISL version, Polly requires some changes for this update
* Since ISL commit
20d3574 "perform parameter alignment by modifying both arguments to function"
isl_*_gist_* and similar functions do not always align the paramter
list anymore. This caused the parameter lists in JScop files to
become out-of-sync. Since many regression tests use JScop files with
a fixed parameter list and order, we explicitly call align_params to
ensure a predictable parameter list.
* ISL changed some return types to isl_size, a typedef of (signed) int.
This caused some issues where the return type was unsigned int before:
- No overload for std::max(unsigned,isl_size)
- It cause additional 'mixed signed/unsigned comparison' warnings.
Since they do not break compilation, and sizes larger than 2^31
were never supported, I am going to fix it separately.
* With the change to isl_size, commit
57d547 "isl_*_list_size: return isl_size"
also changed the return value in case of an error from 0 to -1. This
caused undefined looping over isl_iterator since the 'end iterator'
got index -1, never reached from the 'begin iterator' with index 0.
* Some internal changes in ISL caused the number of operations to
increase when determining access ranges to determine aliasing
overlaps. In one test, this caused exceeding the default limit of
800000. The operations-limit was disabled for this test.
2020-02-11 04:51:33 +08:00
|
|
|
/* Only used by multi-expressions that include "isl_multi_product_templ.c".
|
|
|
|
*/
|
|
|
|
static __isl_give MULTI(BASE) *
|
|
|
|
FN(MULTI(BASE),intersect_explicit_domain_product)(
|
|
|
|
__isl_take MULTI(BASE) *dst, __isl_keep MULTI(BASE) *src1,
|
|
|
|
__isl_keep MULTI(BASE) *src2) __attribute__ ((unused));
|
|
|
|
|
2018-04-21 16:34:22 +08:00
|
|
|
/* Intersect the domain of "dst" with the domain product
|
|
|
|
* of the explicit domains of "src1" and "src2".
|
|
|
|
* This function is only called if at least one of "src1" or "src2"
|
|
|
|
* has an explicit domain.
|
|
|
|
* "src1", "src2" and "dst" cannot have an explicit domain,
|
|
|
|
* so this function is never called.
|
|
|
|
*/
|
|
|
|
static __isl_give MULTI(BASE) *
|
|
|
|
FN(MULTI(BASE),intersect_explicit_domain_product)(
|
|
|
|
__isl_take MULTI(BASE) *dst, __isl_keep MULTI(BASE) *src1,
|
|
|
|
__isl_keep MULTI(BASE) *src2)
|
|
|
|
{
|
|
|
|
return dst;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Align the parameters of the explicit domain of "multi" to those of "space".
|
|
|
|
* "multi" cannot have an explicit domain, so this function is never called.
|
|
|
|
*/
|
|
|
|
static __isl_give MULTI(BASE) *FN(MULTI(BASE),align_explicit_domain_params)(
|
|
|
|
__isl_take MULTI(BASE) *multi, __isl_take isl_space *space)
|
|
|
|
{
|
|
|
|
isl_space_free(space);
|
|
|
|
return multi;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Replace the space of the explicit domain of "multi" by "space",
|
|
|
|
* without modifying its dimension.
|
|
|
|
* "multi" cannot have an explicit domain, so this function is never called.
|
|
|
|
*/
|
|
|
|
static __isl_give MULTI(BASE) *FN(MULTI(BASE),reset_explicit_domain_space)(
|
|
|
|
__isl_take MULTI(BASE) *multi, __isl_take isl_space *space)
|
|
|
|
{
|
|
|
|
isl_space_free(space);
|
|
|
|
return multi;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Check whether the explicit domain of "multi" has non-zero coefficients
|
|
|
|
* for any dimension in the given range or if any of these dimensions appear
|
|
|
|
* with non-zero coefficients in any of the integer divisions involved.
|
|
|
|
* "multi" cannot have an explicit domain, so this function is never called.
|
|
|
|
*/
|
|
|
|
isl_bool FN(MULTI(BASE),involves_explicit_domain_dims)(
|
|
|
|
__isl_keep MULTI(BASE) *multi,
|
|
|
|
enum isl_dim_type type, unsigned pos, unsigned n)
|
|
|
|
{
|
|
|
|
return isl_bool_false;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Insert "n" dimensions of type "type" at position "pos"
|
|
|
|
* of the explicit domain of "multi".
|
|
|
|
* "multi" cannot have an explicit domain, so this function is never called.
|
|
|
|
*/
|
|
|
|
__isl_give MULTI(BASE) *FN(MULTI(BASE),insert_explicit_domain_dims)(
|
|
|
|
__isl_take MULTI(BASE) *multi,
|
|
|
|
enum isl_dim_type type, unsigned pos, unsigned n)
|
|
|
|
{
|
|
|
|
return multi;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Drop the "n" dimensions of type "type" starting at position "pos"
|
|
|
|
* of the explicit domain of "multi".
|
|
|
|
* "multi" cannot have an explicit domain, so this function is never called.
|
|
|
|
*/
|
|
|
|
__isl_give MULTI(BASE) *FN(MULTI(BASE),drop_explicit_domain_dims)(
|
|
|
|
__isl_take MULTI(BASE) *multi,
|
|
|
|
enum isl_dim_type type, unsigned pos, unsigned n)
|
|
|
|
{
|
|
|
|
return multi;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Move the "n" dimensions of "src_type" starting at "src_pos" of
|
|
|
|
* of the explicit domain of "multi" to dimensions of "dst_type" at "dst_pos".
|
|
|
|
* "multi" cannot have an explicit domain, so this function is never called.
|
|
|
|
*/
|
|
|
|
__isl_give MULTI(BASE) *FN(MULTI(BASE),move_explicit_domain_dims)(
|
|
|
|
__isl_take MULTI(BASE) *multi,
|
|
|
|
enum isl_dim_type dst_type, unsigned dst_pos,
|
|
|
|
enum isl_dim_type src_type, unsigned src_pos, unsigned n)
|
|
|
|
{
|
|
|
|
return multi;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Free the explicit domain of "multi".
|
|
|
|
* "multi" cannot have an explicit domain, so this function is never called.
|
|
|
|
*/
|
|
|
|
static void FN(MULTI(BASE),free_explicit_domain)(__isl_keep MULTI(BASE) *multi)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Do "multi1" and "multi2" have the same explicit domain?
|
|
|
|
* "multi1" and "multi2" cannot have an explicit domain,
|
|
|
|
* so this function is never called.
|
|
|
|
*/
|
|
|
|
static isl_bool FN(MULTI(BASE),equal_explicit_domain)(
|
|
|
|
__isl_keep MULTI(BASE) *multi1, __isl_keep MULTI(BASE) *multi2)
|
|
|
|
{
|
|
|
|
return isl_bool_true;
|
|
|
|
}
|
|
|
|
|
|
|
|
static isl_stat FN(MULTI(BASE),check_explicit_domain)(
|
|
|
|
__isl_keep MULTI(BASE) *multi) __attribute__ ((unused));
|
|
|
|
|
|
|
|
/* Debugging function to check that the explicit domain of "multi"
|
|
|
|
* has the correct space.
|
|
|
|
* "multi" cannot have an explicit domain,
|
|
|
|
* so this function should never be called.
|
|
|
|
*/
|
|
|
|
static isl_stat FN(MULTI(BASE),check_explicit_domain)(
|
|
|
|
__isl_keep MULTI(BASE) *multi)
|
|
|
|
{
|
|
|
|
return isl_stat_ok;
|
|
|
|
}
|