Skip to content

Commit

Permalink
isl: Update to isl-0.15-136-g4d5654a
Browse files Browse the repository at this point in the history
The most interesting change for Polly in this isl update is 4d5654af which
in certain cases can speed up the construction of run-time checks from an isl
set consisting of several disjuncts significantly.

llvm-svn: 253794
  • Loading branch information
tobiasgrosser committed Nov 21, 2015
1 parent b465572 commit fb3fb0a
Show file tree
Hide file tree
Showing 9 changed files with 160 additions and 8 deletions.
2 changes: 1 addition & 1 deletion polly/lib/External/isl/GIT_HEAD_ID
Original file line number Diff line number Diff line change
@@ -1 +1 @@
isl-0.15-129-gb086c90
isl-0.15-136-g4d5654a
72 changes: 71 additions & 1 deletion polly/lib/External/isl/configure
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down
4 changes: 3 additions & 1 deletion polly/lib/External/isl/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down
Binary file modified polly/lib/External/isl/doc/manual.pdf
Binary file not shown.
37 changes: 35 additions & 2 deletions polly/lib/External/isl/doc/user.pod
Original file line number Diff line number Diff line change
Expand Up @@ -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/set.h>
__isl_give isl_set *isl_set_neg(
__isl_take isl_set *set);
#include <isl/map.h>
__isl_give isl_map *isl_map_neg(
__isl_take isl_map *map);

C<isl_set_neg> constructs a set containing the opposites of
the elements in its argument.
The domain of the result of C<isl_map_neg> 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/val.h>
__isl_give isl_multi_val *isl_multi_val_neg(
Expand Down Expand Up @@ -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/set.h>
__isl_give isl_set *isl_set_sum(
__isl_take isl_set *set1,
__isl_take isl_set *set2);
#include <isl/map.h>
__isl_give isl_map *isl_map_sum(
__isl_take isl_map *map1,
__isl_take isl_map *map2);

C<isl_set_sum> computes the Minkowski sum of its two arguments,
i.e., the set containing the sums of pairs of elements from
C<set1> and C<set2>.
The domain of the result of C<isl_map_sum> 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/val.h>
__isl_give isl_multi_val *isl_multi_val_add(
Expand Down Expand Up @@ -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<isl_schedule_node_expansion>

Expand Down
5 changes: 3 additions & 2 deletions polly/lib/External/isl/include/isl/map.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
13 changes: 12 additions & 1 deletion polly/lib/External/isl/isl_ast_build_expr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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,
Expand Down
9 changes: 9 additions & 0 deletions polly/lib/External/isl/isl_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
26 changes: 26 additions & 0 deletions polly/lib/External/isl/isl_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 },
Expand Down

0 comments on commit fb3fb0a

Please sign in to comment.