diff --git a/polly/lib/External/isl/GIT_HEAD_ID b/polly/lib/External/isl/GIT_HEAD_ID index fb405944c1219..74b1e9caaaf37 100644 --- a/polly/lib/External/isl/GIT_HEAD_ID +++ b/polly/lib/External/isl/GIT_HEAD_ID @@ -1 +1 @@ -isl-0.15-129-gb086c90 +isl-0.15-136-g4d5654a diff --git a/polly/lib/External/isl/configure b/polly/lib/External/isl/configure index 5638d3656a2d7..3abbf7a6175ef 100755 --- a/polly/lib/External/isl/configure +++ b/polly/lib/External/isl/configure @@ -17776,6 +17776,75 @@ $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if ${ac_cv_path_SED+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_SED" || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi +else + ac_cv_path_SED=$SED +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + llvm_config="llvm-config" # Extract the first word of ""$llvm_config"", so it can be a program name with args. set dummy "$llvm_config"; ac_word=$2 @@ -17823,7 +17892,8 @@ fi if test "$llvm_config_found" != yes; then as_fn_error $? "llvm-config not found" "$LINENO" 5 fi - CLANG_CXXFLAGS=`$llvm_config --cxxflags` + CLANG_CXXFLAGS=`$llvm_config --cxxflags | \ + $SED -e 's/-Wcovered-switch-default//'` CLANG_LDFLAGS=`$llvm_config --ldflags` targets=`$llvm_config --targets-built` components="$targets asmparser bitreader support mc" diff --git a/polly/lib/External/isl/configure.ac b/polly/lib/External/isl/configure.ac index 508acf5d57d7b..c016f6578f3c6 100644 --- a/polly/lib/External/isl/configure.ac +++ b/polly/lib/External/isl/configure.ac @@ -102,6 +102,7 @@ AX_SUBMODULE(clang,system|no,no) case "$with_clang" in system) AC_PROG_GREP + AC_PROG_SED llvm_config="llvm-config" AC_CHECK_PROG([llvm_config_found], ["$llvm_config"], [yes]) if test "x$with_clang_prefix" != "x"; then @@ -113,7 +114,8 @@ system) if test "$llvm_config_found" != yes; then AC_MSG_ERROR([llvm-config not found]) fi - CLANG_CXXFLAGS=`$llvm_config --cxxflags` + CLANG_CXXFLAGS=`$llvm_config --cxxflags | \ + $SED -e 's/-Wcovered-switch-default//'` CLANG_LDFLAGS=`$llvm_config --ldflags` targets=`$llvm_config --targets-built` components="$targets asmparser bitreader support mc" diff --git a/polly/lib/External/isl/doc/manual.pdf b/polly/lib/External/isl/doc/manual.pdf index d37d7d9cdc9f1..8554c17f40a1d 100644 Binary files a/polly/lib/External/isl/doc/manual.pdf and b/polly/lib/External/isl/doc/manual.pdf differ diff --git a/polly/lib/External/isl/doc/user.pod b/polly/lib/External/isl/doc/user.pod index a9a4907531482..d6475e4eaad14 100644 --- a/polly/lib/External/isl/doc/user.pod +++ b/polly/lib/External/isl/doc/user.pod @@ -5211,7 +5211,21 @@ All parameters need to be named. __isl_take isl_qpolynomial *qp, __isl_take isl_space *model); -=item * Unary Arithmethic Operations +=item * Unary Arithmetic Operations + + #include + __isl_give isl_set *isl_set_neg( + __isl_take isl_set *set); + #include + __isl_give isl_map *isl_map_neg( + __isl_take isl_map *map); + +C constructs a set containing the opposites of +the elements in its argument. +The domain of the result of C is the same +as the domain of its argument. The corresponding range +elements are the opposites of the corresponding range +elements in the argument. #include __isl_give isl_multi_val *isl_multi_val_neg( @@ -6550,7 +6564,24 @@ to simplify the expression associated to each cell. __isl_take isl_union_pw_qpolynomial_fold *upwf, __isl_take isl_set *context); -=item * Binary Arithmethic Operations +=item * Binary Arithmetic Operations + + #include + __isl_give isl_set *isl_set_sum( + __isl_take isl_set *set1, + __isl_take isl_set *set2); + #include + __isl_give isl_map *isl_map_sum( + __isl_take isl_map *map1, + __isl_take isl_map *map2); + +C computes the Minkowski sum of its two arguments, +i.e., the set containing the sums of pairs of elements from +C and C. +The domain of the result of C is the intersection +of the domains of its two arguments. The corresponding range +elements are the sums of the corresponding range elements +in the two arguments. #include __isl_give isl_multi_val *isl_multi_val_add( @@ -7392,6 +7423,8 @@ assigns a different value to two domain elements, while all previous schedule dimensions in the same band assign them the same value, then the two domain elements are ordered according to these two different values. +Each expression is required to be total in the domain elements +that reach the band node. =item C diff --git a/polly/lib/External/isl/include/isl/map.h b/polly/lib/External/isl/include/isl/map.h index 0e7219c2dd106..1624159e81b71 100644 --- a/polly/lib/External/isl/include/isl/map.h +++ b/polly/lib/External/isl/include/isl/map.h @@ -222,8 +222,9 @@ struct isl_basic_map *isl_basic_map_sum( struct isl_basic_map *bmap1, struct isl_basic_map *bmap2); struct isl_basic_map *isl_basic_map_neg(struct isl_basic_map *bmap); -struct isl_map *isl_map_sum(struct isl_map *map1, struct isl_map *map2); -struct isl_map *isl_map_neg(struct isl_map *map); +__isl_give isl_map *isl_map_sum(__isl_take isl_map *map1, + __isl_take isl_map *map2); +__isl_give isl_map *isl_map_neg(__isl_take isl_map *map); __isl_give isl_map *isl_map_floordiv_val(__isl_take isl_map *map, __isl_take isl_val *d); diff --git a/polly/lib/External/isl/isl_ast_build_expr.c b/polly/lib/External/isl/isl_ast_build_expr.c index 59fe841ce9483..f0dd22df2dc73 100644 --- a/polly/lib/External/isl/isl_ast_build_expr.c +++ b/polly/lib/External/isl/isl_ast_build_expr.c @@ -1492,6 +1492,14 @@ __isl_give isl_ast_expr *isl_ast_build_expr_from_basic_set( * the previous disjuncts have been removed from build->domain. * In particular, constraints that ensure that there is no overlap * with these previous disjuncts, can be removed. + * This is mostly useful for disjuncts that are only defined by + * a single constraint (relative to the build domain) as the opposite + * of that single constraint can then be removed from the other disjuncts. + * In order not to increase the number of disjuncts in the build domain + * after subtracting the previous disjuncts of "set", the simple hull + * is computed after taking the difference with each of these disjuncts. + * This means that constraints that prevent overlap with a union + * of multiple previous disjuncts are not removed. * * "set" lives in the internal schedule space. */ @@ -1524,8 +1532,11 @@ __isl_give isl_ast_expr *isl_ast_build_expr_from_set_internal( for (i = 1; i < n; ++i) { isl_ast_expr *expr; + isl_set *rest; - domain = isl_set_subtract(domain, set); + rest = isl_set_subtract(isl_set_copy(domain), set); + rest = isl_set_from_basic_set(isl_set_simple_hull(rest)); + domain = isl_set_intersect(domain, rest); bset = isl_basic_set_list_get_basic_set(list, i); set = isl_set_from_basic_set(isl_basic_set_copy(bset)); bset = isl_basic_set_gist(bset, diff --git a/polly/lib/External/isl/isl_map.c b/polly/lib/External/isl/isl_map.c index a4762f43a8c53..b3c5c02922b9b 100644 --- a/polly/lib/External/isl/isl_map.c +++ b/polly/lib/External/isl/isl_map.c @@ -2857,6 +2857,15 @@ struct isl_basic_map *isl_basic_map_intersect( isl_assert(bmap1->ctx, isl_space_is_equal(bmap1->dim, bmap2->dim), goto error); + if (isl_basic_map_plain_is_empty(bmap1)) { + isl_basic_map_free(bmap2); + return bmap1; + } + if (isl_basic_map_plain_is_empty(bmap2)) { + isl_basic_map_free(bmap1); + return bmap2; + } + if (bmap1->sample && isl_basic_map_contains(bmap1, bmap1->sample) > 0 && isl_basic_map_contains(bmap2, bmap1->sample) > 0) diff --git a/polly/lib/External/isl/isl_test.c b/polly/lib/External/isl/isl_test.c index 23a205e47048f..26f7e0293e31f 100644 --- a/polly/lib/External/isl/isl_test.c +++ b/polly/lib/External/isl/isl_test.c @@ -2858,6 +2858,31 @@ static int test_subtract(isl_ctx *ctx) return 0; } +/* Check that intersecting the empty basic set with another basic set + * does not increase the number of constraints. In particular, + * the empty basic set should maintain its canonical representation. + */ +static int test_intersect(isl_ctx *ctx) +{ + int n1, n2; + isl_basic_set *bset1, *bset2; + + bset1 = isl_basic_set_read_from_str(ctx, "{ [a,b,c] : 1 = 0 }"); + bset2 = isl_basic_set_read_from_str(ctx, "{ [1,2,3] }"); + n1 = isl_basic_set_n_constraint(bset1); + bset1 = isl_basic_set_intersect(bset1, bset2); + n2 = isl_basic_set_n_constraint(bset1); + isl_basic_set_free(bset1); + if (!bset1) + return -1; + if (n1 != n2) + isl_die(ctx, isl_error_unknown, + "number of constraints of empty set changed", + return -1); + + return 0; +} + int test_factorize(isl_ctx *ctx) { const char *str; @@ -6105,6 +6130,7 @@ struct { { "factorize", &test_factorize }, { "subset", &test_subset }, { "subtract", &test_subtract }, + { "intersect", &test_intersect }, { "lexmin", &test_lexmin }, { "min", &test_min }, { "gist", &test_gist },