platform/upstream/isl.git
12 years agodoc: document isl_basic_set_foreach_constraint
Sven Verdoolaege [Tue, 28 Feb 2012 11:07:46 +0000 (12:07 +0100)]
doc: document isl_basic_set_foreach_constraint

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_set_has_tuple_name
Sven Verdoolaege [Mon, 27 Feb 2012 10:55:29 +0000 (11:55 +0100)]
add isl_set_has_tuple_name

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_space_has_tuple_name
Sven Verdoolaege [Mon, 27 Feb 2012 10:53:54 +0000 (11:53 +0100)]
add isl_space_has_tuple_name

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_aff_private.h: add missing include
Sven Verdoolaege [Wed, 29 Feb 2012 16:58:14 +0000 (17:58 +0100)]
isl_aff_private.h: add missing include

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_seq_dump
Sven Verdoolaege [Sun, 22 Apr 2012 08:25:53 +0000 (10:25 +0200)]
add isl_seq_dump

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_printer_get_file
Sven Verdoolaege [Wed, 11 Apr 2012 10:48:09 +0000 (12:48 +0200)]
add isl_printer_get_file

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_union_map_curry
Sven Verdoolaege [Thu, 29 Mar 2012 14:01:39 +0000 (16:01 +0200)]
add isl_union_map_curry

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_space.c: avoid use of "0" as pointer value
Sven Verdoolaege [Thu, 29 Mar 2012 14:01:33 +0000 (16:01 +0200)]
isl_space.c: avoid use of "0" as pointer value

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_map_order_gt
Sven Verdoolaege [Thu, 29 Mar 2012 12:38:27 +0000 (14:38 +0200)]
add isl_map_order_gt

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_map_from_aff
Sven Verdoolaege [Thu, 29 Mar 2012 12:37:35 +0000 (14:37 +0200)]
add isl_map_from_aff

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_args_parse: optionally ignore --help
Sven Verdoolaege [Thu, 22 Mar 2012 16:03:47 +0000 (17:03 +0100)]
isl_args_parse: optionally ignore --help

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agomove generic part of isl_union_pw_qpolynomial_mul to isl_union_templ.c
Sven Verdoolaege [Tue, 20 Mar 2012 12:33:45 +0000 (13:33 +0100)]
move generic part of isl_union_pw_qpolynomial_mul to isl_union_templ.c

This simplifies the interface of match_bin_op, even though it is currently
only used in one place.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_union_pw_multi_aff_flat_range_product
Sven Verdoolaege [Tue, 20 Mar 2012 13:38:05 +0000 (14:38 +0100)]
add isl_union_pw_multi_aff_flat_range_product

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_pw_*_on_shared_domain: allow specification of target space
Sven Verdoolaege [Tue, 20 Mar 2012 13:35:31 +0000 (14:35 +0100)]
isl_pw_*_on_shared_domain: allow specification of target space

We will need exploit this possibility in the next commit.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_union_map_from_union_pw_multi_aff
Sven Verdoolaege [Tue, 20 Mar 2012 13:32:22 +0000 (14:32 +0100)]
add isl_union_map_from_union_pw_multi_aff

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_aff.c: fix typo in comment
Sven Verdoolaege [Wed, 18 Apr 2012 09:33:48 +0000 (11:33 +0200)]
isl_aff.c: fix typo in comment

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_union_pw_multi_aff_from_domain
Sven Verdoolaege [Tue, 20 Mar 2012 13:28:53 +0000 (14:28 +0100)]
add isl_union_pw_multi_aff_from_domain

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_union_pw_multi_aff
Sven Verdoolaege [Tue, 20 Mar 2012 13:24:15 +0000 (14:24 +0100)]
add isl_union_pw_multi_aff

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_union_pw_*: don't assume zero is the default value
Sven Verdoolaege [Tue, 20 Mar 2012 13:12:08 +0000 (14:12 +0100)]
isl_union_pw_*: don't assume zero is the default value

Although we consider an isl_pw_qpolynomial to be zero by default,
we will not do so for the isl_pw_multi_affs we will introduce next.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_pw_multi_aff_from_multi_aff
Sven Verdoolaege [Tue, 20 Mar 2012 12:23:21 +0000 (13:23 +0100)]
add isl_pw_multi_aff_from_multi_aff

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoexport isl_multi_aff_set_aff
Sven Verdoolaege [Mon, 19 Mar 2012 15:04:54 +0000 (16:04 +0100)]
export isl_multi_aff_set_aff

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_multi_aff_zero
Sven Verdoolaege [Mon, 19 Mar 2012 15:03:29 +0000 (16:03 +0100)]
add isl_multi_aff_zero

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_map_from_multi_aff
Sven Verdoolaege [Mon, 19 Mar 2012 15:01:25 +0000 (16:01 +0100)]
add isl_map_from_multi_aff

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_basic_set_parameter_compression: use isl_vec_set
Sven Verdoolaege [Tue, 20 Mar 2012 15:38:39 +0000 (16:38 +0100)]
isl_basic_set_parameter_compression: use isl_vec_set

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_flow.c: use public isl_vec interface
Sven Verdoolaege [Tue, 20 Mar 2012 15:32:55 +0000 (16:32 +0100)]
isl_flow.c: use public isl_vec interface

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_vec_set_si
Sven Verdoolaege [Tue, 20 Mar 2012 15:51:30 +0000 (16:51 +0100)]
add isl_vec_set_si

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_vec_set
Sven Verdoolaege [Tue, 20 Mar 2012 15:38:04 +0000 (16:38 +0100)]
add isl_vec_set

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd public isl_vec interface
Sven Verdoolaege [Tue, 20 Mar 2012 15:32:13 +0000 (16:32 +0100)]
add public isl_vec interface

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_seq_set_si
Sven Verdoolaege [Tue, 20 Mar 2012 15:51:21 +0000 (16:51 +0100)]
add isl_seq_set_si

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_union_pw_*_free: return NULL
Sven Verdoolaege [Tue, 20 Mar 2012 12:28:27 +0000 (13:28 +0100)]
isl_union_pw_*_free: return NULL

Returning NULL helps to simplify error handling code.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agosplit off declarations of isl_union_map and isl_union_set
Sven Verdoolaege [Tue, 20 Mar 2012 12:17:21 +0000 (13:17 +0100)]
split off declarations of isl_union_map and isl_union_set

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_map_deltas: add memory management annotations
Riyadh Baghdadi [Tue, 1 May 2012 13:48:44 +0000 (15:48 +0200)]
isl_map_deltas: add memory management annotations

Signed-off-by: Riyadh Baghdadi <baghdadi.m.riyadh@gmail.com>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_access_info: change interface for specifying restrictions
Sven Verdoolaege [Thu, 5 Apr 2012 09:40:16 +0000 (11:40 +0200)]
isl_access_info: change interface for specifying restrictions

The original interface would only allow the user to restrict the source
iterations, while the user may also want to restrict the sink iterations.
The new interface also makes it more convenient for the user to specify
that no restriction should be applied and allows for a restriction
on the result of the maximization problem.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_map_coalesce: only coalesce pairs of basic maps with the same divs
Sven Verdoolaege [Tue, 17 Apr 2012 17:05:00 +0000 (19:05 +0200)]
isl_map_coalesce: only coalesce pairs of basic maps with the same divs

Most of the heuristics won't be able to find any coalescing opportunities
on basic maps with different divs, so it's not worth it to even try.
A notable exception is the subset test, which is now handled separately.

Since we only perform the tests after checking that the divs are the same,
there is no point in aligning the divs over all basic maps.  This could
be a very expensive operation, especially if some divs are unknown as it
would then compute explicit representations for all divs.  This could have
the counter-intuitive effect that the ouptut of isl_map_coalesce would have
_more_ basic maps (because of the splits introduced during the computation
of explicit representations) than the input.
Instead, we know simply sort the known divs.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_coalesce.c: change interface of {in,}eq_status_in
Sven Verdoolaege [Fri, 30 Mar 2012 10:53:51 +0000 (12:53 +0200)]
isl_coalesce.c: change interface of {in,}eq_status_in

We will want to call them on a modified basic map in the next commit.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_map_sort_divs
Sven Verdoolaege [Tue, 17 Apr 2012 17:04:21 +0000 (19:04 +0200)]
add isl_map_sort_divs

Sorting divs should improve the effectiveness of isl_merge_divs.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_set_coalesce test case
Sven Verdoolaege [Fri, 30 Mar 2012 12:19:20 +0000 (14:19 +0200)]
add isl_set_coalesce test case

We will be making changes to isl_map_coalesce and we want to make sure
we won't break this case.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_basic_map_get_divs
Sven Verdoolaege [Wed, 18 Apr 2012 08:48:16 +0000 (10:48 +0200)]
add isl_basic_map_get_divs

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_merge_divs: handle NULL input
Sven Verdoolaege [Wed, 18 Apr 2012 08:31:50 +0000 (10:31 +0200)]
isl_merge_divs: handle NULL input

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoMerge branch 'maint'
Sven Verdoolaege [Wed, 18 Apr 2012 08:54:21 +0000 (10:54 +0200)]
Merge branch 'maint'

12 years agoisl_local_space_alloc_div: fix error handling
Sven Verdoolaege [Wed, 18 Apr 2012 08:46:20 +0000 (10:46 +0200)]
isl_local_space_alloc_div: fix error handling

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_union_set_compute_schedule: ignore backward proximity edges on split
Sven Verdoolaege [Sat, 14 Apr 2012 21:21:55 +0000 (23:21 +0200)]
isl_union_set_compute_schedule: ignore backward proximity edges on split

Proximity edges are not taken into account during the detection
of strongly connected components.  When we split the dependence graph
based on these SCCs, we may therefore have proximity edges that go
back from a SCC behind the split to a SCC ahead of the split.  These should
be ignored, just like those edges that go from ahead of the split to behind
the split.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_basic_map_insert: preserve emptiness
Sven Verdoolaege [Tue, 17 Apr 2012 10:50:27 +0000 (12:50 +0200)]
isl_basic_map_insert: preserve emptiness

isl_basic_map_plain_is_empty doesn't look at the constraints but only
at the ISL_BASIC_MAP_EMPTY flag.  We therefore need to make sure the
flag is set on the output of isl_basic_map_insert if it was set on the
input.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_basic_set_total_dim: handle NULL input
Sven Verdoolaege [Tue, 17 Apr 2012 10:34:22 +0000 (12:34 +0200)]
isl_basic_set_total_dim: handle NULL input

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_term_get_div: support nested divs
Sven Verdoolaege [Fri, 30 Mar 2012 13:14:54 +0000 (15:14 +0200)]
isl_term_get_div: support nested divs

Ever since 028d1a7 (drop isl_div abstraction, Fri Sep 9 14:55:16 2011 +0200),
the result of isl_term_get_div is an isl_aff and it can handle nested divs
just fine.  We therefore simply need to remove the now redundant check.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_term_get_div: normalize result
Sven Verdoolaege [Fri, 30 Mar 2012 13:18:35 +0000 (15:18 +0200)]
isl_term_get_div: normalize result

In particular, remove unused divs from the result.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_access_info_compute_flow: sort accesses in textual order
Sven Verdoolaege [Thu, 5 Apr 2012 08:31:04 +0000 (10:31 +0200)]
isl_access_info_compute_flow: sort accesses in textual order

Before, we tried to be clever and sorted the accesses in order
of increasing number of shared levels with the sink access.
However, this has little advantage over textual order.
Textually later accesses that cannot precede the sink at a given level
are simply skipped.
On the other hand, when we consider a loop level, we usually
do want to consider the textually last access first and not some
textually earlier access that happens to share more levels with the sink.
In particular, if this textually last access covers all the pending
sink accesses, there is no need to consider earlier accesses,
whereas you would always have to consider later accesses if you started
out with an earlier access.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_flow.c: access_sort_cmp: use isl_quicksort
Sven Verdoolaege [Fri, 13 Apr 2012 14:43:57 +0000 (16:43 +0200)]
isl_flow.c: access_sort_cmp: use isl_quicksort

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_qsort.h: fix whitespace
Sven Verdoolaege [Fri, 13 Apr 2012 14:39:04 +0000 (16:39 +0200)]
isl_qsort.h: fix whitespace

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_map_coalesce: optionally bound the coefficients of wrapping constraints
Sven Verdoolaege [Wed, 11 Apr 2012 08:54:37 +0000 (10:54 +0200)]
isl_map_coalesce: optionally bound the coefficients of wrapping constraints

One of the methods for combining pairs of basic relations is based on wrapping.
The coefficients of these wrapping constraints may be much larger than
those of the constraints in the input.  If isl_map_coalesce is called
to simplify the representation of a relation, then constraints with
large coefficients are typically undesirable.  We therefore do not allow
the coefficients in the wrapping constraints to be larger than those
in the input, but we allow the user to override this choice.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_seq_abs_max
Sven Verdoolaege [Wed, 11 Apr 2012 08:53:10 +0000 (10:53 +0200)]
add isl_seq_abs_max

12 years agoMerge branch 'maint'
Sven Verdoolaege [Fri, 13 Apr 2012 11:29:57 +0000 (13:29 +0200)]
Merge branch 'maint'

12 years agoisl_map_coalesce: don't try to relax (implicit) equalities
Sven Verdoolaege [Tue, 10 Apr 2012 16:41:28 +0000 (18:41 +0200)]
isl_map_coalesce: don't try to relax (implicit) equalities

An inequality that turns out to be an equality may have been removed
from the tableau, so we cannot relax it.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_tab_relax: prevent relaxation on dead or redundant constraints
Sven Verdoolaege [Fri, 13 Apr 2012 11:01:21 +0000 (13:01 +0200)]
isl_tab_relax: prevent relaxation on dead or redundant constraints

Trying to relax such constraints can only lead to problems,
especially if the constraints have been removed from the tableau.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_basic_map_union: plug memory leak on error path
Sven Verdoolaege [Wed, 11 Apr 2012 12:15:29 +0000 (14:15 +0200)]
isl_basic_map_union: plug memory leak on error path

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoFix a typo in isl_term_dup
Louis-Noel Pouchet [Wed, 11 Apr 2012 14:08:15 +0000 (10:08 -0400)]
Fix a typo in isl_term_dup

Signed-off-by: Louis-Noel Pouchet <pouchet@cse.ohio-state.edu>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_stream_read_map: allow "not" at start of grouped expression
Sven Verdoolaege [Fri, 6 Apr 2012 09:58:03 +0000 (11:58 +0200)]
isl_stream_read_map: allow "not" at start of grouped expression

Reported-by: Vladimir Klebanov <vladimir@cost-ic0701.org>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_test: test_parse_map_equal: return result of test
Sven Verdoolaege [Sat, 7 Apr 2012 14:19:07 +0000 (16:19 +0200)]
isl_test: test_parse_map_equal: return result of test

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoMerge branch 'maint'
Sven Verdoolaege [Sat, 7 Apr 2012 14:07:44 +0000 (16:07 +0200)]
Merge branch 'maint'

12 years agoisl_pw_*_on_shared_domain: improve error handling
Sven Verdoolaege [Thu, 1 Mar 2012 10:25:22 +0000 (11:25 +0100)]
isl_pw_*_on_shared_domain: improve error handling

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agolink in new -lclangEdit when available
Sven Verdoolaege [Tue, 27 Mar 2012 10:57:25 +0000 (12:57 +0200)]
link in new -lclangEdit when available

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_*alloc macros: return expression of desired type
Sven Verdoolaege [Fri, 16 Mar 2012 14:42:50 +0000 (15:42 +0100)]
isl_*alloc macros: return expression of desired type

The type information was dropped in 157122e (Check the ctx argument of the
memory macros, Tue Jun 7 16:15:15 2011 -0300).

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_map_fixed_power and isl_union_map_fixed_power
Sven Verdoolaege [Wed, 7 Mar 2012 09:08:50 +0000 (10:08 +0100)]
add isl_map_fixed_power and isl_union_map_fixed_power

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_token: change type of "type" field from enum isl_token_type to int
Sven Verdoolaege [Wed, 29 Feb 2012 17:54:28 +0000 (18:54 +0100)]
isl_token: change type of "type" field from enum isl_token_type to int

The field is also assigned values outside the enum.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoMerge branch 'maint'
Sven Verdoolaege [Tue, 6 Mar 2012 13:31:02 +0000 (14:31 +0100)]
Merge branch 'maint'

12 years agoisl_union_map_is_subset: properly handle non-obviously empty subsets
Sven Verdoolaege [Sat, 3 Mar 2012 22:52:06 +0000 (23:52 +0100)]
isl_union_map_is_subset: properly handle non-obviously empty subsets

If the first argument of isl_union_map_is_subset contains an empty
set in some space that is not present in the second argument,
then isl_union_map_is_subset would incorrectly draw the conclusion
that the first is not a subset of the second.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_pw_aff_cond: change first argument from an isl_set to an isl_pw_aff
Sven Verdoolaege [Sun, 26 Feb 2012 15:07:55 +0000 (16:07 +0100)]
isl_pw_aff_cond: change first argument from an isl_set to an isl_pw_aff

An isl_pw_aff can also convey information about whether the expression
is defined.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_set_{lower,upper}_bound
Sven Verdoolaege [Mon, 16 Jan 2012 19:21:19 +0000 (20:21 +0100)]
add isl_set_{lower,upper}_bound

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_pw_aff_n_piece
Sven Verdoolaege [Tue, 6 Mar 2012 09:20:03 +0000 (10:20 +0100)]
add isl_pw_aff_n_piece

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_set_indicator_function
Sven Verdoolaege [Sun, 26 Feb 2012 14:23:37 +0000 (15:23 +0100)]
add isl_set_indicator_function

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_basic_map_affine_hull: consider points adjacent to any point found
Sven Verdoolaege [Wed, 18 Jan 2012 10:26:53 +0000 (11:26 +0100)]
isl_basic_map_affine_hull: consider points adjacent to any point found

This is usually a fairly cheap way of finding additional points in
the affine hull and may in some cases eliminate constraints with large
coefficients in the current approximation of the hull.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_set_has_dim_name
Sven Verdoolaege [Tue, 17 Jan 2012 11:04:12 +0000 (12:04 +0100)]
add isl_set_has_dim_name

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agodoc: minor clean-up
Sven Verdoolaege [Sun, 26 Feb 2012 08:10:21 +0000 (09:10 +0100)]
doc: minor clean-up

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_space_has_dim_name
Sven Verdoolaege [Tue, 17 Jan 2012 11:04:02 +0000 (12:04 +0100)]
add isl_space_has_dim_name

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoconfigure.ac: remove spurious ","
Sven Verdoolaege [Sat, 25 Feb 2012 09:11:47 +0000 (10:11 +0100)]
configure.ac: remove spurious ","

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agodoc: fix typo
Sven Verdoolaege [Fri, 24 Feb 2012 15:26:26 +0000 (16:26 +0100)]
doc: fix typo

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_basic_set_sample: perform basis reduction at each level by default
Sven Verdoolaege [Fri, 24 Feb 2012 09:03:22 +0000 (10:03 +0100)]
isl_basic_set_sample: perform basis reduction at each level by default

Although always performing basis reduction can lead to slow-downs
on larger problems, only performing it once can result in some
relatively simple problems taking an inordinate amount of time.
We therefore revert back to the default from before 8db0a80
(isl_basic_set_sample: only perform basis reduction once,
Sun Aug 9 11:42:41 2009 +0200).

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_basic_set_is_subset
Sven Verdoolaege [Fri, 24 Feb 2012 08:55:43 +0000 (09:55 +0100)]
add isl_basic_set_is_subset

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoexport isl_basic_map_is_subset
Sven Verdoolaege [Fri, 24 Feb 2012 14:36:51 +0000 (15:36 +0100)]
export isl_basic_map_is_subset

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_basic_set_sample
Sven Verdoolaege [Fri, 24 Feb 2012 08:50:57 +0000 (09:50 +0100)]
add isl_basic_set_sample

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agodoc: document *_sample functions
Sven Verdoolaege [Fri, 24 Feb 2012 14:30:16 +0000 (15:30 +0100)]
doc: document *_sample functions

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoMerge branch 'maint'
Sven Verdoolaege [Thu, 23 Feb 2012 16:04:38 +0000 (17:04 +0100)]
Merge branch 'maint'

12 years agoisl_coalesce.c: wrap_in_facets: bail out if any of the facets are empty
Sven Verdoolaege [Thu, 23 Feb 2012 14:51:59 +0000 (15:51 +0100)]
isl_coalesce.c: wrap_in_facets: bail out if any of the facets are empty

It the tableau corresponding to a facet is empty, then we don't have
accurate information on the ridges and we can't call add_wraps.
The facet can have no integer points due to other constraints.
An alternative would be to temporarily treat the tableau as a rational
tableau.

Reported-by: Tobias Grosser <tobias@grosser.es>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_test: test_coalesce_set: fail if coalescing failed
Sven Verdoolaege [Thu, 23 Feb 2012 15:16:56 +0000 (16:16 +0100)]
isl_test: test_coalesce_set: fail if coalescing failed

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoexport isl_map_plain_is_single_valued
Sven Verdoolaege [Tue, 21 Feb 2012 17:00:37 +0000 (18:00 +0100)]
export isl_map_plain_is_single_valued

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_tab_basic_map_partial_lexopt: properly normalize divs
Sven Verdoolaege [Tue, 21 Feb 2012 15:27:28 +0000 (16:27 +0100)]
isl_tab_basic_map_partial_lexopt: properly normalize divs

We were only dividing out common divisors that also divide
the constant term, but we should ignore the constant term
while determining the greatest common divisor.

We already properly normalize the constraints and not properly
normalizing the divs could result in div constraints not being
recognized as such.  In particular, inside isl_map_affine_hull,
div constraints are added inside the call to isl_basic_map_overlying_set.
Usually, these constraints are removed again in remove_redundant_divs,
but they would remain if the the divs are not properly normalized.

Now, arguably, we shouldn't be adding div constraints inside
isl_map_affine_hull, but a proper normalization of divs is useful in any case.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_map_complement
Sven Verdoolaege [Sat, 18 Feb 2012 13:10:04 +0000 (14:10 +0100)]
add isl_map_complement

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoscheduler: allow to bound the coefficients in the calculated schedule
Tobias Grosser [Sun, 19 Feb 2012 13:05:50 +0000 (14:05 +0100)]
scheduler: allow to bound the coefficients in the calculated schedule

isl already supports the bounding of the constant term of the calculated
schedule, but within polybench there are several cases where bounding
the coefficients of parameter and variable dimensions is also needed.

With a bound of 20 Polly can run the isl scheduler on all polybench 2.0 kernels
and takes for each less than 5 seconds, whereas without the bound five test
cases had scheduling times larger than 40 seconds. This is still slower, than
scheduling with gist simplified dependences but it yields better results.
The bounded, non-gist-simplified schedule yields for dynprog, lu, reg_detect
and trmm to faster code compared to scheduling with gist simplified
dependences. For gramschmidt it yields slower code.

Signed-off-by: Tobias Grosser <tobias@grosser.es>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_tab_basic_set_non_trivial_lexmin: do not add cuts for all variables
Tobias Grosser [Sat, 18 Feb 2012 15:13:23 +0000 (16:13 +0100)]
isl_tab_basic_set_non_trivial_lexmin: do not add cuts for all variables

We found a test case where adding cuts for all variables can increase
the time of the scheduling algorithm significantly (from ms to never
seen terminating). Even though we did not understand the problem
entirely, the intuition we have is the following:

When using isl_tab_basic_set_non_trivial_lexmin, the ILP problem is
(usually) not empty, but infinite. Adding all cuts, seems to increase
the objective function only in very small steps. Adding only one cut at
a time allows us to increase it with a step as big as possible.

This patch does not change the behaviour when calling
check_integer_feasible.  In case we're calling cut_to_integer_lexmin
from check_integer_feasible, if it takes a long time to compute, then
it's "usually" because the context is empty and it's just taking a long
time for us to discover that it's empty. We believe in that case it
could still make sense to add all cuts.

This patch was tested on polybench 2.0 with Polly and minimal fusion.
On the larger kernels, it could not solve any infinite scheduling time
problems, but it was able to speed up one test case by 2x and did not
yield increased scheduling time for the other test cases.

Signed-off-by: Tobias Grosser <tobias@grosser.es>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_map_fix_si: drop basic maps that have become empty
Sven Verdoolaege [Tue, 14 Feb 2012 23:18:59 +0000 (00:18 +0100)]
isl_map_fix_si: drop basic maps that have become empty

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_map.c: extract out common remove_if_empty
Sven Verdoolaege [Tue, 14 Feb 2012 23:18:21 +0000 (00:18 +0100)]
isl_map.c: extract out common remove_if_empty

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_map_coalesce: drop empty parts before checking the number of parts
Sven Verdoolaege [Tue, 14 Feb 2012 23:15:55 +0000 (00:15 +0100)]
isl_map_coalesce: drop empty parts before checking the number of parts

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoMerge branch 'maint'
Sven Verdoolaege [Tue, 14 Feb 2012 23:22:47 +0000 (00:22 +0100)]
Merge branch 'maint'

12 years agoisl_convex_hull.c: uset_convex_hull_wrap_bounded: remove redundant constraints
Sven Verdoolaege [Tue, 14 Feb 2012 22:55:22 +0000 (23:55 +0100)]
isl_convex_hull.c: uset_convex_hull_wrap_bounded: remove redundant constraints

The caller compute_facet expects the result to not contain any redundant
constraints.  The input to uset_convex_hull_wrap_bounded, however, might
contain redundant constraints so if this input consists of only one
basic set, we need to make sure redundant constraints are removed.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_basic_map_realign: preserve (most) flags
Sven Verdoolaege [Tue, 14 Feb 2012 19:02:43 +0000 (20:02 +0100)]
isl_basic_map_realign: preserve (most) flags

In particular, preserve the ISL_BASIC_MAP_EMPTY flag.
Many parts of the code check for this flags so they do not have
to deal with the "1 = 0" constraint.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_printer_print_pw_aff test
Sven Verdoolaege [Tue, 7 Feb 2012 11:26:43 +0000 (12:26 +0100)]
add isl_printer_print_pw_aff test

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_basic_map_foreach_lexopt: normalize isl_affs
Sven Verdoolaege [Tue, 7 Feb 2012 11:26:20 +0000 (12:26 +0100)]
isl_basic_map_foreach_lexopt: normalize isl_affs

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_pw_*_union_add: don't subtract non-overlapping cells
Sven Verdoolaege [Tue, 7 Feb 2012 11:19:20 +0000 (12:19 +0100)]
isl_pw_*_union_add: don't subtract non-overlapping cells

There is no point in subtracting a cell from another if their intersection
is empty.  It can only lead to a further subdivision of the other cell.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_printer_print_pw_aff: skip constraints implied by div expression
Sven Verdoolaege [Tue, 7 Feb 2012 11:17:03 +0000 (12:17 +0100)]
isl_printer_print_pw_aff: skip constraints implied by div expression

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_basic_set_is_div_constraint
Sven Verdoolaege [Tue, 7 Feb 2012 11:11:26 +0000 (12:11 +0100)]
add isl_basic_set_is_div_constraint

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>