platform/upstream/isl.git
11 years agoisl_map_intersect_domain: avoid useless double reverse
Sven Verdoolaege [Wed, 22 Aug 2012 12:52:22 +0000 (14:52 +0200)]
isl_map_intersect_domain: avoid useless double reverse

Implementing isl_map_intersect_domain in terms of isl_map_intersect_range
was easier than a proper implementation, but the two calls to
isl_map_reverse can lead to needless inefficiencies.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_map_intersect_{range,domain}: stop allowing intersection with parameter set
Sven Verdoolaege [Wed, 22 Aug 2012 08:47:33 +0000 (10:47 +0200)]
isl_map_intersect_{range,domain}: stop allowing intersection with parameter set

The test was in fact too liberal and would also allow presumably unintended
cases.  Users should call isl_map_intersect_params instead.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_map_intersect: special case universal input
Sven Verdoolaege [Wed, 22 Aug 2012 15:33:55 +0000 (17:33 +0200)]
isl_map_intersect: special case universal input

In particular, there is no need to construct a new isl_map
if one of the arguments to isl_map_intersect is obviously universal.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_constraint_list
Sven Verdoolaege [Fri, 24 Aug 2012 13:08:25 +0000 (15:08 +0200)]
add isl_constraint_list

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_pw_multi_aff_set_pw_aff
Sven Verdoolaege [Sat, 25 Aug 2012 10:57:46 +0000 (12:57 +0200)]
add isl_pw_multi_aff_set_pw_aff

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_pw_multi_aff_identity
Sven Verdoolaege [Sat, 25 Aug 2012 10:34:40 +0000 (12:34 +0200)]
add isl_pw_multi_aff_identity

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agodeclare isl_pw_multi_aff_align_params
Sven Verdoolaege [Sat, 25 Aug 2012 09:04:42 +0000 (11:04 +0200)]
declare isl_pw_multi_aff_align_params

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agodeclare isl_basic_map_remove_divs_involving_dims
Sven Verdoolaege [Mon, 20 Aug 2012 12:44:17 +0000 (14:44 +0200)]
declare isl_basic_map_remove_divs_involving_dims

This function was added in 720f32e (add isl_set_remove_divs_involving_dims,
Wed Oct 27 13:04:04 2010 +0200), but was not exported.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_vec_fdiv_r
Sven Verdoolaege [Sun, 19 Aug 2012 10:30:56 +0000 (12:30 +0200)]
add isl_vec_fdiv_r

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_*_list_insert
Sven Verdoolaege [Sun, 19 Aug 2012 10:06:15 +0000 (12:06 +0200)]
add isl_*_list_insert

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agodeclare isl_map_fix
Sven Verdoolaege [Sun, 19 Aug 2012 10:30:25 +0000 (12:30 +0200)]
declare isl_map_fix

This function was added in 72ccd88 (add isl_set_fix,
Wed Oct 21 14:04:29 2009 +0200), but was not exported.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_basic_map_upper_bound_si
Sven Verdoolaege [Sun, 19 Aug 2012 10:28:51 +0000 (12:28 +0200)]
add isl_basic_map_upper_bound_si

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_basic_map_order_ge
Sven Verdoolaege [Tue, 14 Aug 2012 07:39:18 +0000 (09:39 +0200)]
add isl_basic_map_order_ge

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agodeclare isl_aff_zero_basic_set
Sven Verdoolaege [Thu, 16 Aug 2012 14:38:46 +0000 (16:38 +0200)]
declare isl_aff_zero_basic_set

This function was added in 6dc44e1 (add isl_pw_aff_eq_set,
Sat Jul 9 12:28:59 2011 +0200), but was not exported.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_vec_concat
Sven Verdoolaege [Tue, 14 Aug 2012 15:41:04 +0000 (17:41 +0200)]
add isl_vec_concat

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_vec_free: return NULL
Sven Verdoolaege [Sat, 18 Aug 2012 15:40:58 +0000 (17:40 +0200)]
isl_vec_free: return NULL

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_map_free: return NULL
Sven Verdoolaege [Thu, 16 Aug 2012 15:19:56 +0000 (17:19 +0200)]
isl_map_free: return NULL

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_basic_set_free: return NULL
Sven Verdoolaege [Wed, 15 Aug 2012 12:56:54 +0000 (14:56 +0200)]
isl_basic_set_free: return NULL

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_basic_map_free: return NULL
Sven Verdoolaege [Tue, 14 Aug 2012 07:29:47 +0000 (09:29 +0200)]
isl_basic_map_free: return NULL

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_space_free: return NULL
Sven Verdoolaege [Thu, 6 Sep 2012 13:40:44 +0000 (15:40 +0200)]
isl_space_free: return NULL

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_basic_map_gauss: also set progress if a div expression has been detected
Sven Verdoolaege [Mon, 13 Aug 2012 16:54:13 +0000 (18:54 +0200)]
isl_basic_map_gauss: also set progress if a div expression has been detected

The div expression may be equal to that of another div and one of them
should then be eliminated in the next iteration of isl_basic_map_simplify.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_tarjan_graph_init: document the order of the components in the result
Sven Verdoolaege [Wed, 8 Aug 2012 15:11:35 +0000 (17:11 +0200)]
isl_tarjan_graph_init: document the order of the components in the result

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_aff.c: document isl_aff_normalize
Sven Verdoolaege [Thu, 19 Jul 2012 16:15:06 +0000 (18:15 +0200)]
isl_aff.c: document isl_aff_normalize

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_aff.c: fix typo in comment
Sven Verdoolaege [Thu, 19 Jul 2012 19:44:53 +0000 (21:44 +0200)]
isl_aff.c: fix typo in comment

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agohide internal check_help
Sven Verdoolaege [Tue, 4 Sep 2012 12:55:49 +0000 (14:55 +0200)]
hide internal check_help

This function was exposed by mistake when it was introduced in 387317a
(isl_args_parse: optionally ignore --help, Thu Mar 22 17:03:47 2012 +0100).

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agohide internal basic_map_identity
Sven Verdoolaege [Tue, 4 Sep 2012 12:54:10 +0000 (14:54 +0200)]
hide internal basic_map_identity

This function was exposed by mistake in d07eed3 (rename isl_dim to isl_space,
Sun Aug 21 10:38:41 2011 +0200).

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_map_simplify.c: remove_duplicate_divs: preserve known divs
Sven Verdoolaege [Thu, 6 Sep 2012 12:35:55 +0000 (14:35 +0200)]
isl_map_simplify.c: remove_duplicate_divs: preserve known divs

As explained in the commit message of 22c210c (isl_basic_map_gauss:
try not to remove any div definitions, Tue Sep 1 22:59:21 2009 +0200),
we should preserve known divs during isl_basic_map_simplify.
That commit only fixed the possible loss of known divs in
isl_basic_map_gauss.  Here we fix the same problem in remove_duplicate_divs.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_basic_map_drop_redundant_divs: don't drop divs that appear in other divs
Sven Verdoolaege [Wed, 22 Aug 2012 12:41:43 +0000 (14:41 +0200)]
isl_basic_map_drop_redundant_divs: don't drop divs that appear in other divs

Divs that appear in the definition of other divs usually occur in at least
4 constraints, so they normally wouldn't get dropped by this function.
However, the div constraints of the other div(s) may have been simplified
or eliminated.  This happens in particular on the new test case
due to the optimization introduced in 2592280 (isl_basic_map_simplify:
eliminate known divs that appear with unit coefficient,
Wed May 16 13:51:16 2012 +0200).

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_test: generalize subset test
Sven Verdoolaege [Sun, 15 Jul 2012 07:06:38 +0000 (09:06 +0200)]
isl_test: generalize subset test

This will make it easier to add additional test cases.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agorename isl_set_dim_has_*_bound to isl_set_dim_has_any_*_bound
Sven Verdoolaege [Sun, 26 Aug 2012 13:20:53 +0000 (15:20 +0200)]
rename isl_set_dim_has_*_bound to isl_set_dim_has_any_*_bound

The original names more accurately describe functions that check
that there is a bound in each of basic sets.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agorelicense isl under the MIT license
Sven Verdoolaege [Sun, 2 Sep 2012 13:38:40 +0000 (15:38 +0200)]
relicense isl under the MIT license

Signed-off-by: Tobias Grosser <tobias@grosser.es>
Signed-off-by: Andreas Kloeckner <kloeckner@cims.nyu.edu>
Signed-off-by: Todor Stefanov <stefanov@liacs.nl>
Signed-off-by: Sven van Haastregt <svhaastr@liacs.nl>
Signed-off-by: Isabelle Ryl <isabelle.ryl@inria.fr>
Signed-off-by: Mythri Alle <mythri.allel@gmail.com>
Signed-off-by: Wim De Clercq <Wim.DeClercq@lrd.kuleuven.be>
Signed-off-by: Anne Cormier <Anne.Cormier@ens.fr>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoconfigure.ac: link against same LLVM components as libclang.so
Sven Verdoolaege [Sun, 2 Sep 2012 13:33:31 +0000 (15:33 +0200)]
configure.ac: link against same LLVM components as libclang.so

Since 74e0407 (configure.ac: only link against libraries from LLVM
analysis component, Wed Jan 18 16:47:38 2012 +0100), we only link
against some components of LLVM, but the choice of which components
to include was made fairly arbitrarily.
This appeared to work, but fails do so on more recent versions of clang.
Instead, we now link against the same LLVM components as libclang.so.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoMerge branch 'maint'
Sven Verdoolaege [Sun, 2 Sep 2012 10:36:13 +0000 (12:36 +0200)]
Merge branch 'maint'

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_map_intersect: fix error handling
Sven Verdoolaege [Wed, 22 Aug 2012 15:29:20 +0000 (17:29 +0200)]
isl_map_intersect: fix error handling

The original code would simply drop basic sets that resulted in errors
instead of propagating the error to the caller.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_access_info_add_source: plug memory leak on error path
Sven Verdoolaege [Wed, 22 Aug 2012 09:11:49 +0000 (11:11 +0200)]
isl_access_info_add_source: plug memory leak on error path

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_set_dim_residue_class: correctly consider all basic sets in the set
Sven Verdoolaege [Tue, 21 Aug 2012 09:37:57 +0000 (11:37 +0200)]
isl_set_dim_residue_class: correctly consider all basic sets in the set

This commit fixes two closely related problems.
Due to a typo, isl_set_dim_residue_class would only consider one of
the basic sets in the input set.  The information obtained from the
individual basic sets was also combined incorrectly.
In particular, the code would insist that all basic sets have the
same residue if they have the same modulo and not consider adjusting
the modulo of the combined basic sets to accommodate for the difference
in residues.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_map_subtract: handle duplicate divs in subtrahend
Sven Verdoolaege [Mon, 13 Aug 2012 16:42:04 +0000 (18:42 +0200)]
isl_map_subtract: handle duplicate divs in subtrahend

A simplified basic map is not expected to have duplicate divs,
but it may still happen if a div is discovered by isl_basic_map_gauss
without subsequently being compared to other divs.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_aff_scale_down: check for scaling down by zero
Sven Verdoolaege [Fri, 10 Aug 2012 14:54:00 +0000 (16:54 +0200)]
isl_aff_scale_down: check for scaling down by zero

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_*_list_drop
Sven Verdoolaege [Wed, 8 Aug 2012 08:14:33 +0000 (10:14 +0200)]
add isl_*_list_drop

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_*_list_add: dynamically grow list to accomodate extra element
Sven Verdoolaege [Thu, 9 Aug 2012 18:38:00 +0000 (20:38 +0200)]
isl_*_list_add: dynamically grow list to accomodate extra element

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoconfigure.ac: don't allow installation in source or build directory
Sven Verdoolaege [Fri, 10 Aug 2012 07:36:30 +0000 (09:36 +0200)]
configure.ac: don't allow installation in source or build directory

This will fail at some point during the installation anyway,
so it's better to check early.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_space_is_range
Sven Verdoolaege [Thu, 19 Jul 2012 12:01:24 +0000 (14:01 +0200)]
add isl_space_is_range

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoexport isl_space_is_domain
Sven Verdoolaege [Tue, 7 Aug 2012 14:46:55 +0000 (16:46 +0200)]
export isl_space_is_domain

We cannot simply export the private isl_space_is_domain however, since
that one is also used in cases where the first argument is a parameter
space and the second argument is a set space.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agodoc: document isl_space_is_equal
Sven Verdoolaege [Tue, 7 Aug 2012 12:23:19 +0000 (14:23 +0200)]
doc: document isl_space_is_equal

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_space_is_map
Sven Verdoolaege [Tue, 7 Aug 2012 13:45:43 +0000 (15:45 +0200)]
add isl_space_is_map

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agodeclare isl_pw_multi_aff_project_domain_on_params
Sven Verdoolaege [Fri, 3 Aug 2012 10:34:46 +0000 (12:34 +0200)]
declare isl_pw_multi_aff_project_domain_on_params

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_map_has_tuple_name
Sven Verdoolaege [Fri, 3 Aug 2012 13:23:57 +0000 (15:23 +0200)]
add isl_map_has_tuple_name

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoAUTHORS: add Mythri Alle
Sven Verdoolaege [Sat, 4 Aug 2012 09:56:34 +0000 (11:56 +0200)]
AUTHORS: add Mythri Alle

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_printer_free: return NULL
Sven Verdoolaege [Thu, 12 Jul 2012 09:38:44 +0000 (11:38 +0200)]
isl_printer_free: return NULL

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agodeclare isl_pw_multi_aff_drop_dims
Sven Verdoolaege [Sun, 22 Jul 2012 12:30:23 +0000 (14:30 +0200)]
declare isl_pw_multi_aff_drop_dims

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoexport isl_multi_aff_gist_params
Sven Verdoolaege [Mon, 9 Jul 2012 10:04:18 +0000 (12:04 +0200)]
export isl_multi_aff_gist_params

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoextract common implementation of Tarjan's algorithm
Sven Verdoolaege [Thu, 1 Mar 2012 16:27:17 +0000 (17:27 +0100)]
extract common implementation of Tarjan's algorithm

We had two nearly identical implementations in isl_schedule.c
and isl_transitive_closure.c.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_point_dump
Sven Verdoolaege [Tue, 15 May 2012 12:15:20 +0000 (14:15 +0200)]
add isl_point_dump

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_union_map_extract_map: ignore parameters in space argument
Sven Verdoolaege [Thu, 12 Apr 2012 12:08:39 +0000 (14:08 +0200)]
isl_union_map_extract_map: ignore parameters in space argument

They may be different from the parameters in the isl_union_map, while
they are irrelevant for determining which map to extract.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_union_map_extract_map: rename dim argument to space
Sven Verdoolaege [Thu, 12 Apr 2012 12:07:48 +0000 (14:07 +0200)]
isl_union_map_extract_map: rename dim argument to space

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_map_simplify.c: eliminate_var_using_equality: normalize divs after elimination
Sven Verdoolaege [Fri, 13 Apr 2012 20:47:59 +0000 (22:47 +0200)]
isl_map_simplify.c: eliminate_var_using_equality: normalize divs after elimination

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_stream_read_map: force result to be a map
Sven Verdoolaege [Fri, 2 Mar 2012 10:38:32 +0000 (11:38 +0100)]
isl_stream_read_map: force result to be a map

In particular, if obj_read returns a set, then turn it into a map.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_stream_read_map: accept rational affine expressions
Sven Verdoolaege [Thu, 1 Mar 2012 10:02:01 +0000 (11:02 +0100)]
isl_stream_read_map: accept rational affine expressions

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_map_{lexmin,lexmax}_pw_multi_aff
Sven Verdoolaege [Thu, 19 Apr 2012 19:55:09 +0000 (21:55 +0200)]
add isl_map_{lexmin,lexmax}_pw_multi_aff

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agodeclare isl_map_remove_unknown_divs
Sven Verdoolaege [Tue, 15 May 2012 11:00:53 +0000 (13:00 +0200)]
declare isl_map_remove_unknown_divs

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agodoc: document isl_set_remove_unknown_divs
Sven Verdoolaege [Wed, 4 Jul 2012 11:10:58 +0000 (13:10 +0200)]
doc: document isl_set_remove_unknown_divs

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agodeclare isl_map_remove_divs_involving_dims
Sven Verdoolaege [Tue, 15 May 2012 11:00:02 +0000 (13:00 +0200)]
declare isl_map_remove_divs_involving_dims

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_basic_set_remove_divs_involving_dims
Sven Verdoolaege [Tue, 3 Apr 2012 11:31:49 +0000 (13:31 +0200)]
add isl_basic_set_remove_divs_involving_dims

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agodoc: document isl_set_remove_divs_involving_dims
Sven Verdoolaege [Wed, 4 Jul 2012 10:17:43 +0000 (12:17 +0200)]
doc: document isl_set_remove_divs_involving_dims

This function is used by CLooG.

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

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_union_set_from_basic_set and isl_union_map_from_basic_map
Sven Verdoolaege [Mon, 9 Apr 2012 15:05:00 +0000 (17:05 +0200)]
add isl_union_set_from_basic_set and isl_union_map_from_basic_map

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_basic_{set,map}_insert_dims
Sven Verdoolaege [Wed, 29 Feb 2012 17:53:50 +0000 (18:53 +0100)]
add isl_basic_{set,map}_insert_dims

We already had a (private) isl_basic_map_insert, but we rename it to
isl_basic_map_insert_dims for consistency with isl_map_insert_dims.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_basic_{set,map}_align_params
Sven Verdoolaege [Wed, 25 Apr 2012 18:03:25 +0000 (20:03 +0200)]
add isl_basic_{set,map}_align_params

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_union_map_domain_product
Sven Verdoolaege [Tue, 26 Jun 2012 16:38:37 +0000 (18:38 +0200)]
add isl_union_map_domain_product

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agodeclare isl_basic_map_product
Sven Verdoolaege [Thu, 21 Jun 2012 13:08:07 +0000 (15:08 +0200)]
declare isl_basic_map_product

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_pw_multi_aff_product
Sven Verdoolaege [Tue, 3 Apr 2012 08:48:14 +0000 (10:48 +0200)]
add isl_pw_multi_aff_product

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_pw_multi_aff_union_{lexmin,lexmax}
Sven Verdoolaege [Thu, 19 Apr 2012 19:54:19 +0000 (21:54 +0200)]
add isl_pw_multi_aff_union_{lexmin,lexmax}

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_set_free: return NULL
Sven Verdoolaege [Sat, 30 Jun 2012 12:47:04 +0000 (14:47 +0200)]
isl_set_free: return NULL

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_multi_aff_lex_{le,ge}_set
Sven Verdoolaege [Thu, 19 Apr 2012 19:53:21 +0000 (21:53 +0200)]
add isl_multi_aff_lex_{le,ge}_set

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agodeclare isl_multi_aff_get_domain_space
Sven Verdoolaege [Thu, 19 Apr 2012 19:52:15 +0000 (21:52 +0200)]
declare isl_multi_aff_get_domain_space

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_multi_aff_identity
Sven Verdoolaege [Mon, 16 Apr 2012 15:27:00 +0000 (17:27 +0200)]
add isl_multi_aff_identity

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_aff_neg_basic_set
Sven Verdoolaege [Wed, 18 Apr 2012 16:07:07 +0000 (18:07 +0200)]
add isl_aff_neg_basic_set

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_aff_add_constant_num{,_si}
Sven Verdoolaege [Thu, 19 Apr 2012 08:54:58 +0000 (10:54 +0200)]
add isl_aff_add_constant_num{,_si}

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

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_*_list_set_*
Sven Verdoolaege [Wed, 29 Feb 2012 16:30:38 +0000 (17:30 +0100)]
add isl_*_list_set_*

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_pw_multi_aff_has_tuple_name
Sven Verdoolaege [Sat, 9 Jun 2012 13:15:41 +0000 (15:15 +0200)]
add isl_pw_multi_aff_has_tuple_name

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agodeclare isl_pw_aff_get_tuple_id
Sven Verdoolaege [Mon, 28 May 2012 14:16:29 +0000 (16:16 +0200)]
declare isl_pw_aff_get_tuple_id

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_map_has_dim_name
Sven Verdoolaege [Sat, 3 Mar 2012 13:21:09 +0000 (14:21 +0100)]
add isl_map_has_dim_name

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_local_space_has_dim_id and isl_local_space_get_dim_id
Sven Verdoolaege [Sat, 26 May 2012 13:29:52 +0000 (15:29 +0200)]
add isl_local_space_has_dim_id and isl_local_space_get_dim_id

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_set_opt: align parameters
Sven Verdoolaege [Thu, 10 May 2012 13:57:06 +0000 (15:57 +0200)]
isl_set_opt: align parameters

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_multi_*_set_*: check that parameters and domains match
Sven Verdoolaege [Wed, 25 Apr 2012 18:41:14 +0000 (20:41 +0200)]
isl_multi_*_set_*: check that parameters and domains match

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_basic_map_range_product: check that parameters match
Sven Verdoolaege [Wed, 25 Apr 2012 15:05:16 +0000 (17:05 +0200)]
isl_basic_map_range_product: check that parameters match

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_basic_map_simplify: eliminate known divs that appear with unit coefficient
Sven Verdoolaege [Wed, 16 May 2012 11:51:16 +0000 (13:51 +0200)]
isl_basic_map_simplify: eliminate known divs that appear with unit coefficient

They can be eliminated without loss of accuracy and this elimination
results in "simpler" constraints.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_basic_map_remove_divs_involving_dims: insert bounds before removing divs
Sven Verdoolaege [Thu, 17 May 2012 08:22:23 +0000 (10:22 +0200)]
isl_basic_map_remove_divs_involving_dims: insert bounds before removing divs

The div will be removed using Fourier-Motzkin elimination and the extra
bounds can be used to improve accuracy of the result.

For example, eliminating the div from the following set

{ [i,j,k] : 3 + i + 2j >= 0 and 2 * [(i+2j)/4] <= k }

we now first use the first constraint to derive a lower bound
on the div:

[(i + 2j)/4] >= [-3/4] = -1

During the elimination, this bound can be combined with the upper bound
to result in the additional constraint

k >= -2

Although this technique can be applied in general, it is especially
useful after the next commit, where we will eliminate divs
that appear with a unit coefficient.  If the same div also appears
in other constraints with a non-unit coefficient, and we later
decide to eliminate the div, then this technique can be used to
recover some of those constraints so that we can avoid losing accuracy.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_basic_map_simplify: normalize div expressions
Sven Verdoolaege [Wed, 16 May 2012 14:01:24 +0000 (16:01 +0200)]
isl_basic_map_simplify: normalize div expressions

That is, remove common divisors in numerator and denominator.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoUse an MIT licensed mergesort as the sorting algorithm for isl
Tobias Grosser [Thu, 2 Aug 2012 08:52:54 +0000 (10:52 +0200)]
Use an MIT licensed mergesort as the sorting algorithm for isl

This patch replaces the old LGPL licenced quicksort implementation taken
from glibc.
The call sites are adjusted to the fact that isl_sort can now fail
(due to failed memory allocation).

Signed-off-by: Tobias Grosser <tobias@grosser.es>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_access_info_free: return NULL
Sven Verdoolaege [Thu, 2 Aug 2012 10:06:30 +0000 (12:06 +0200)]
isl_access_info_free: return NULL

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_printer_print_double
Sven Verdoolaege [Tue, 31 Jul 2012 12:47:26 +0000 (14:47 +0200)]
add isl_printer_print_double

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agodoc: add a note on isl_dim_type
Sven Verdoolaege [Mon, 30 Jul 2012 09:16:48 +0000 (11:16 +0200)]
doc: add a note on isl_dim_type

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agodoc: add a note about isl_*_intersect and parametric sets
Sven Verdoolaege [Sun, 29 Jul 2012 16:11:23 +0000 (18:11 +0200)]
doc: add a note about isl_*_intersect and parametric sets

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agodoc: add missing documentation for some scheduling options
Sven Verdoolaege [Sat, 28 Jul 2012 18:24:32 +0000 (20:24 +0200)]
doc: add missing documentation for some scheduling options

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoMerge branch 'maint'
Sven Verdoolaege [Fri, 27 Jul 2012 16:21:24 +0000 (18:21 +0200)]
Merge branch 'maint'

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_pw_*_realign_domain: plug memory leak on error path
Sven Verdoolaege [Wed, 18 Jul 2012 15:52:11 +0000 (17:52 +0200)]
isl_pw_*_realign_domain: plug memory leak on error path

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_handle_error: avoid use of isl_options_get_on_error
Sven Verdoolaege [Thu, 19 Jul 2012 11:29:36 +0000 (13:29 +0200)]
isl_handle_error: avoid use of isl_options_get_on_error

isl_options_get_on_error could end up calling isl_handle_error
recursively, resulting in an infinite calling sequence.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_space_extend_domain_with_range: handle ranges with a nested space
Sven Verdoolaege [Fri, 20 Jul 2012 17:41:17 +0000 (19:41 +0200)]
isl_space_extend_domain_with_range: handle ranges with a nested space

The original code would only take into account the number of dimensions
and the tuple name.

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