platform/upstream/isl.git
11 years agoadd isl_vec_cmp_element
Sven Verdoolaege [Tue, 28 May 2013 09:44:19 +0000 (11:44 +0200)]
add isl_vec_cmp_element

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_flow.c: sched_info_alloc: use isl_val
Sven Verdoolaege [Thu, 18 Apr 2013 08:49:37 +0000 (10:49 +0200)]
isl_flow.c: sched_info_alloc: use isl_val

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_band.c: multi_aff_tile: use isl_val
Sven Verdoolaege [Thu, 18 Apr 2013 08:32:13 +0000 (10:32 +0200)]
isl_band.c: multi_aff_tile: use isl_val

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_token_get_type
Sven Verdoolaege [Tue, 28 May 2013 10:12:45 +0000 (12:12 +0200)]
add isl_token_get_type

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_token_get_str
Sven Verdoolaege [Tue, 28 May 2013 10:04:06 +0000 (12:04 +0200)]
add isl_token_get_str

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_token_get_val
Sven Verdoolaege [Tue, 9 Apr 2013 13:56:10 +0000 (15:56 +0200)]
add isl_token_get_val

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_obj_val
Sven Verdoolaege [Sat, 6 Apr 2013 13:09:59 +0000 (15:09 +0200)]
add isl_obj_val

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_union_map_fixed_power_val
Sven Verdoolaege [Tue, 9 Apr 2013 14:05:47 +0000 (16:05 +0200)]
add isl_union_map_fixed_power_val

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_set_count_val
Sven Verdoolaege [Fri, 5 Apr 2013 08:28:51 +0000 (10:28 +0200)]
add isl_set_count_val

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_set_dim_residue_class_val
Sven Verdoolaege [Thu, 18 Apr 2013 06:54:03 +0000 (08:54 +0200)]
add isl_set_dim_residue_class_val

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_map_floordiv_val
Sven Verdoolaege [Sun, 14 Apr 2013 16:44:23 +0000 (18:44 +0200)]
add isl_map_floordiv_val

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_set_plain_get_val_if_fixed
Sven Verdoolaege [Sun, 14 Apr 2013 16:23:34 +0000 (18:23 +0200)]
add isl_set_plain_get_val_if_fixed

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_basic_map_plain_get_val_if_fixed
Sven Verdoolaege [Tue, 28 May 2013 08:48:24 +0000 (10:48 +0200)]
add isl_basic_map_plain_get_val_if_fixed

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_map_plain_get_val_if_fixed
Sven Verdoolaege [Sun, 14 Apr 2013 15:53:52 +0000 (17:53 +0200)]
add isl_map_plain_get_val_if_fixed

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_set_lower_bound_val and isl_set_upper_bound_val
Sven Verdoolaege [Sat, 23 Feb 2013 12:41:49 +0000 (13:41 +0100)]
add isl_set_lower_bound_val and isl_set_upper_bound_val

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_map_fix_val and isl_set_fix_val
Sven Verdoolaege [Thu, 24 Jan 2013 19:51:26 +0000 (20:51 +0100)]
add isl_map_fix_val and isl_set_fix_val

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_set_min_val
Sven Verdoolaege [Sat, 13 Apr 2013 11:11:43 +0000 (13:11 +0200)]
add isl_set_min_val

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_set_max_val
Sven Verdoolaege [Sat, 13 Apr 2013 10:52:51 +0000 (12:52 +0200)]
add isl_set_max_val

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_basic_set_max_val
Sven Verdoolaege [Tue, 16 Apr 2013 13:34:13 +0000 (15:34 +0200)]
add isl_basic_set_max_val

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_basic_set_*_lp_val
Sven Verdoolaege [Wed, 10 Apr 2013 09:34:10 +0000 (11:34 +0200)]
add isl_basic_set_*_lp_val

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd private isl_basic_set_get_divs
Sven Verdoolaege [Wed, 10 Apr 2013 09:24:10 +0000 (11:24 +0200)]
add private isl_basic_set_get_divs

We will need this function in the next commit.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_pw_qpolynomial_fix_val
Sven Verdoolaege [Sat, 6 Apr 2013 08:11:51 +0000 (10:11 +0200)]
add isl_pw_qpolynomial_fix_val

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_pw_aff_mod_val
Sven Verdoolaege [Sat, 23 Feb 2013 12:51:46 +0000 (13:51 +0100)]
add isl_pw_aff_mod_val

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_pw_aff_scale_down_val
Sven Verdoolaege [Tue, 23 Apr 2013 19:52:32 +0000 (21:52 +0200)]
add isl_pw_aff_scale_down_val

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_union_pw_*_scale_val
Sven Verdoolaege [Sat, 6 Apr 2013 16:29:01 +0000 (18:29 +0200)]
add isl_union_pw_*_scale_val

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_multi_*_scale_val and isl_pw_*_scale_val
Sven Verdoolaege [Sun, 5 May 2013 16:25:42 +0000 (18:25 +0200)]
add isl_multi_*_scale_val and isl_pw_*_scale_val

We need to add them at the same time because isl_pw_multi_aff_scale_val
depends on isl_multi_aff_scale_val while isl_multi_pw_aff_scale_val depends
on isl_pw_aff_scale_val.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_qpolynomial_fold_scale_val
Sven Verdoolaege [Sun, 5 May 2013 17:00:23 +0000 (19:00 +0200)]
add isl_qpolynomial_fold_scale_val

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_qpolynomial_scale_val
Sven Verdoolaege [Sun, 5 May 2013 16:52:55 +0000 (18:52 +0200)]
add isl_qpolynomial_scale_val

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_qpolynomial_val_on_domain
Sven Verdoolaege [Sun, 26 May 2013 17:06:16 +0000 (19:06 +0200)]
add isl_qpolynomial_val_on_domain

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_qpolynomial_get_constant_val
Sven Verdoolaege [Fri, 5 Apr 2013 08:28:31 +0000 (10:28 +0200)]
add isl_qpolynomial_get_constant_val

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_term_get_coefficient_val
Sven Verdoolaege [Sat, 6 Apr 2013 12:44:53 +0000 (14:44 +0200)]
add isl_term_get_coefficient_val

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_aff_mod_val
Sven Verdoolaege [Thu, 4 Apr 2013 14:50:14 +0000 (16:50 +0200)]
add isl_aff_mod_val

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_aff_scale_down_val
Sven Verdoolaege [Tue, 23 Apr 2013 19:41:58 +0000 (21:41 +0200)]
add isl_aff_scale_down_val

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_aff_scale_val
Sven Verdoolaege [Thu, 9 May 2013 10:05:19 +0000 (12:05 +0200)]
add isl_aff_scale_val

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_aff_get_denominator_val
Sven Verdoolaege [Fri, 12 Apr 2013 11:52:49 +0000 (13:52 +0200)]
add isl_aff_get_denominator_val

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_aff_get_coefficient_val
Sven Verdoolaege [Fri, 12 Apr 2013 11:59:06 +0000 (13:59 +0200)]
add isl_aff_get_coefficient_val

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_aff_get_constant_val
Sven Verdoolaege [Sat, 23 Feb 2013 13:40:22 +0000 (14:40 +0100)]
add isl_aff_get_constant_val

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_aff_add_coefficient_val
Sven Verdoolaege [Sat, 23 Feb 2013 14:43:50 +0000 (15:43 +0100)]
add isl_aff_add_coefficient_val

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_aff_add_constant_val
Sven Verdoolaege [Mon, 22 Apr 2013 07:45:02 +0000 (09:45 +0200)]
add isl_aff_add_constant_val

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_aff_set_coefficient_val
Sven Verdoolaege [Tue, 9 Apr 2013 16:33:48 +0000 (18:33 +0200)]
add isl_aff_set_coefficient_val

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_aff_set_constant_val
Sven Verdoolaege [Tue, 9 Apr 2013 16:33:48 +0000 (18:33 +0200)]
add isl_aff_set_constant_val

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_constraint_get_coefficient_val
Sven Verdoolaege [Sat, 13 Apr 2013 11:03:56 +0000 (13:03 +0200)]
add isl_constraint_get_coefficient_val

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_constraint_get_constant_val
Sven Verdoolaege [Sat, 13 Apr 2013 11:03:56 +0000 (13:03 +0200)]
add isl_constraint_get_constant_val

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_constraint_set_coefficient_val
Sven Verdoolaege [Sat, 6 Apr 2013 11:45:02 +0000 (13:45 +0200)]
add isl_constraint_set_coefficient_val

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_constraint_set_constant_val
Sven Verdoolaege [Sat, 6 Apr 2013 11:45:02 +0000 (13:45 +0200)]
add isl_constraint_set_constant_val

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_point_get_coordinate_val
Sven Verdoolaege [Fri, 5 Apr 2013 08:27:51 +0000 (10:27 +0200)]
add isl_point_get_coordinate_val

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_point_set_coordinate_val
Sven Verdoolaege [Fri, 12 Apr 2013 08:19:21 +0000 (10:19 +0200)]
add isl_point_set_coordinate_val

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_mat_get_element_val
Sven Verdoolaege [Sat, 6 Apr 2013 08:32:51 +0000 (10:32 +0200)]
add isl_mat_get_element_val

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_mat_set_element_val
Sven Verdoolaege [Tue, 9 Apr 2013 14:23:48 +0000 (16:23 +0200)]
add isl_mat_set_element_val

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_vec_set_val
Sven Verdoolaege [Thu, 18 Apr 2013 07:07:52 +0000 (09:07 +0200)]
add isl_vec_set_val

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_vec_get_element_val
Sven Verdoolaege [Sun, 14 Apr 2013 18:24:25 +0000 (20:24 +0200)]
add isl_vec_get_element_val

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_vec_set_element_val
Sven Verdoolaege [Sat, 6 Apr 2013 11:44:39 +0000 (13:44 +0200)]
add isl_vec_set_element_val

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd GMP specific isl_val functions
Sven Verdoolaege [Sat, 6 Apr 2013 08:33:43 +0000 (10:33 +0200)]
add GMP specific isl_val functions

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_multi_val_mod_val
Sven Verdoolaege [Tue, 30 Apr 2013 19:25:34 +0000 (21:25 +0200)]
add isl_multi_val_mod_val

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_multi_val_add_val
Sven Verdoolaege [Tue, 30 Apr 2013 19:23:09 +0000 (21:23 +0200)]
add isl_multi_val_add_val

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_multi_val
Sven Verdoolaege [Tue, 30 Apr 2013 19:20:16 +0000 (21:20 +0200)]
add isl_multi_val

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_multi_templ.c: isl_multi_*_set_*: extract out check for matching space
Sven Verdoolaege [Tue, 30 Apr 2013 19:01:02 +0000 (21:01 +0200)]
isl_multi_templ.c: isl_multi_*_set_*: extract out check for matching space

We will be adding isl_multi_val next, where such a check does not make sense.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_val_list
Sven Verdoolaege [Tue, 30 Apr 2013 04:53:17 +0000 (06:53 +0200)]
add isl_val_list

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_val abstraction
Sven Verdoolaege [Sun, 21 Apr 2013 20:59:57 +0000 (22:59 +0200)]
add isl_val abstraction

An isl_val can represent integer and rational values as well as some
special values.  isl_vals are meant to replace isl_ints in the external
interface as well as some abuses of isl_qpolynomials.

The advantage of isl_vals is that they behave like other isl objects and
that they do not expose how integer values are represented internally.
This means that the user will not have to take into account that GMP
is being used and that GMP can be replaced by another library without
affecting the user.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_int_submul_ui
Sven Verdoolaege [Fri, 3 May 2013 16:18:52 +0000 (18:18 +0200)]
add isl_int_submul_ui

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_int_addmul_ui
Sven Verdoolaege [Fri, 12 Apr 2013 06:43:25 +0000 (08:43 +0200)]
add isl_int_addmul_ui

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_int_mul_si
Sven Verdoolaege [Sat, 6 Apr 2013 09:06:20 +0000 (11:06 +0200)]
add isl_int_mul_si

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_int_fits_ulong
Sven Verdoolaege [Sat, 23 Feb 2013 12:41:03 +0000 (13:41 +0100)]
add isl_int_fits_ulong

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_int_fits_slong
Sven Verdoolaege [Sat, 27 Apr 2013 13:49:35 +0000 (15:49 +0200)]
add isl_int_fits_slong

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoremove isl_int_gcdext from public isl/int.h
Sven Verdoolaege [Wed, 8 May 2013 09:52:47 +0000 (11:52 +0200)]
remove isl_int_gcdext from public isl/int.h

isl_int_gcdext was introduced after the latest release, specifically
in e191579 (add isl_int_gcdext, Wed Apr 17 17:51:28 2013 +0200), so
we do not need to worry about backward compatibility.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agocreate private copy of isl/int.h
Sven Verdoolaege [Wed, 8 May 2013 09:50:27 +0000 (11:50 +0200)]
create private copy of isl/int.h

We will shortly be introducing a new isl_val abstraction
that is meant to replace isl_int as well as some abuses of isl_qpolynomial.
To implement this new abstraction, we will need some additional
isl_int_* functions.  However, we do not want to publicly expose
these isl_int_* functions since we do not want to encourage their
use by external users.
We therefore create a private copy of isl/int.h where we can
add the additional functions.  Once the transition is complete,
the public version can be removed.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoMerge branch 'maint'
Sven Verdoolaege [Sat, 25 May 2013 16:35:26 +0000 (18:35 +0200)]
Merge branch 'maint'

11 years agoisl_union_set_compute_schedule: fix check for progress in feautrier scheduler
Sven Verdoolaege [Fri, 24 May 2013 09:36:50 +0000 (11:36 +0200)]
isl_union_set_compute_schedule: fix check for progress in feautrier scheduler

In carry_dependences we check that we have been able to carry at least
(part of) one dependence relation, by checking that the number of
edges that are not carried is smaller than the total number of edges.
However, we were only looking at the numerator.  If the optimal LP
solution is integral then this happens to work out, but otherwise
we could overestimate the number of non-carried edges, possibly
leading to the wrong conclusion.

Reported-by: Tomofumi Yuki <tomofumi.yuki@gmail.com>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_vertex_get_domain: return parameter domain
Sven Verdoolaege [Tue, 30 Apr 2013 20:09:40 +0000 (22:09 +0200)]
isl_vertex_get_domain: return parameter domain

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_ast_expr_from_constraint: split off constant term if it avoids operation
Sven Verdoolaege [Sun, 19 May 2013 15:35:48 +0000 (17:35 +0200)]
isl_ast_expr_from_constraint: split off constant term if it avoids operation

If one hand of the comparison operation that is constructed would be
exactly zero, then we put the constant term on that side.
This avoids the operation that adds the constant term to the other side,
resulting in slightly smaller expressions that are easier to read and
that may also reduce the risk of overflows.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoMerge branch 'maint'
Sven Verdoolaege [Wed, 22 May 2013 10:28:26 +0000 (12:28 +0200)]
Merge branch 'maint'

11 years agoisl_basic_map_foreach_lexopt: properly merge partial empty solutions
Sven Verdoolaege [Wed, 22 May 2013 09:52:49 +0000 (11:52 +0200)]
isl_basic_map_foreach_lexopt: properly merge partial empty solutions

b9f95db (isl_basic_map_foreach_lexopt: properly merge partial solutions,
Wed Mar 20 09:55:50 2013 +0100) fixed the merging of partial non-empty
solutions, but did not take into account that partial solutions may
be empty.  If the partial solutions are empty, then M is NULL and we
cannot dereference it.

Note that the new test case only triggers on top of d7e5adb
(isl_tab_basic_map_partial_lexopt: better exploit partial solution cache,
Tue Mar 12 17:25:04 2013 +0100) in the master branch.

Reported-by: Tomofumi Yuki <tomofumi.yuki@gmail.com>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agomerge shared isl_multi_* declarations
Sven Verdoolaege [Tue, 30 Apr 2013 18:45:00 +0000 (20:45 +0200)]
merge shared isl_multi_* declarations

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agodeclare isl_multi_* together with isl_*
Sven Verdoolaege [Tue, 30 Apr 2013 06:21:45 +0000 (08:21 +0200)]
declare isl_multi_* together with isl_*

This will make it easier to add new isl_multi_* types.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agomake isl_multi_* files more self-contained
Sven Verdoolaege [Tue, 30 Apr 2013 19:07:28 +0000 (21:07 +0200)]
make isl_multi_* files more self-contained

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_space_private.h: protect against multiple inclusions
Sven Verdoolaege [Tue, 30 Apr 2013 06:08:55 +0000 (08:08 +0200)]
isl_space_private.h: protect against multiple inclusions

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agodetect missing gmp.h or missing/old gmp library during configure
Sven Verdoolaege [Sun, 28 Apr 2013 12:09:46 +0000 (14:09 +0200)]
detect missing gmp.h or missing/old gmp library during configure

Until now a missing gmp.h was only detected during compilation
and a missing/old library only during linking.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_ast_codegen.c: add_nodes: use more transparent way to break up ordering SCC
Sven Verdoolaege [Thu, 11 Apr 2013 17:55:29 +0000 (19:55 +0200)]
isl_ast_codegen.c: add_nodes: use more transparent way to break up ordering SCC

The original method for breaking up an ordering SCC depended on
isl_set_make_disjoint making the basic sets rationally disjoint.
We prefer not to depend on core isl internals in the AST generator.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_basic_map_order_gt
Sven Verdoolaege [Sun, 28 Apr 2013 13:33:28 +0000 (15:33 +0200)]
add isl_basic_map_order_gt

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agobound.c: verify_point: use isl_printer
Sven Verdoolaege [Thu, 18 Apr 2013 14:53:51 +0000 (16:53 +0200)]
bound.c: verify_point: use isl_printer

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_input.c: read_factor: declare variables at start of code block
Sven Verdoolaege [Sun, 28 Apr 2013 11:59:08 +0000 (13:59 +0200)]
isl_input.c: read_factor: declare variables at start of code block

Reported-by: William Bader <william.bader@gmail.com>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoMerge branch 'maint'
Sven Verdoolaege [Sun, 28 Apr 2013 07:56:35 +0000 (09:56 +0200)]
Merge branch 'maint'

11 years agoisl_*alloc*: return NULL if ctx argument is NULL
Sven Verdoolaege [Tue, 29 May 2012 13:44:46 +0000 (15:44 +0200)]
isl_*alloc*: return NULL if ctx argument is NULL

Whenever an isl function needs to perform an allocation, it calls
one of the isl_*alloc* functions on an isl_ctx obtained either from
the user or from a call to one of the *_get_ctx functions.
If this isl_ctx pointer is NULL, this means that either
the original isl_ctx_alloc failed or that the pointer on which
the *_get_ctx function was called was NULL.
In both cases, we are in an error state and we should not
allocate any more memory, but instead return as soon as possible.
We therefore return NULL from the isl_*alloc* functions,
an error condition which should already be handled by the caller.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_space.c: add missing include
Sven Verdoolaege [Thu, 18 Apr 2013 09:17:35 +0000 (11:17 +0200)]
isl_space.c: add missing include

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agodeclare isl_tab_get_ctx in isl_tab.h
Sven Verdoolaege [Wed, 27 Mar 2013 14:44:45 +0000 (15:44 +0100)]
declare isl_tab_get_ctx in isl_tab.h

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agodeclare isl_*_list together with isl_*
Sven Verdoolaege [Wed, 27 Mar 2013 11:09:23 +0000 (12:09 +0100)]
declare isl_*_list together with isl_*

Some of the isl_*_list types were declared together in isl/list.h.
It seems cleaner to declare them together with the corresponding isl_* instead.
Similarly, these types were defined together in isl_list_private.h and
are now defined together with the corresponding isl_*.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_ast_graft.c: remove spurious include
Sven Verdoolaege [Sun, 21 Apr 2013 15:56:13 +0000 (17:56 +0200)]
isl_ast_graft.c: remove spurious include

The include has been redundant ever since it was introduced in
5888ac1 (add support for generating ASTs from schedule relations,
Mon Sep 17 22:11:06 2012 +0200).

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_ast_codegen.c: remove dependence on internals of isl_constraint_list
Sven Verdoolaege [Tue, 2 Apr 2013 09:00:25 +0000 (11:00 +0200)]
isl_ast_codegen.c: remove dependence on internals of isl_constraint_list

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoextract generic isl_*_list_foreach_scc from isl_ast_codegen.c
Sven Verdoolaege [Mon, 1 Apr 2013 09:47:03 +0000 (11:47 +0200)]
extract generic isl_*_list_foreach_scc from isl_ast_codegen.c

isl_ast_codegen.c contained two implementations of this function
that have now been replaced by two calls to the extracted functions.
This makes isl_ast_codegen.c less dependent on the internals of
isl_basic_set_list.  We should also be able to later reuse the
extracted function in other contexts.  Once all users of isl_tarjan
have been converted to this interface, we probably want to remove
the old interface and perform the calls to callback as soon as
each SCC is found rather than waiting until all of them have been found.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_map_affine_hull: make stride information explicit before dropping divs
Sven Verdoolaege [Fri, 19 Apr 2013 14:57:00 +0000 (16:57 +0200)]
isl_map_affine_hull: make stride information explicit before dropping divs

In a2cbe44 (isl_map_affine_hull: avoid computing explicit representations
for divs, Sun Jan 15 16:12:59 2012 +0100), isl_map_affine_hull was changed
to drop unknown divs rather than computing an explicit representation
for them.  This caused some stride information that involves multiple
unknown divs to get dropped.
Try and recover this lost information by making stride information
explicitly available before dropping the unknown divs.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_morph.c: extract out isl_mat_parameter_compression_ext
Sven Verdoolaege [Fri, 19 Apr 2013 14:54:18 +0000 (16:54 +0200)]
isl_morph.c: extract out isl_mat_parameter_compression_ext

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_ast_build_get_stride_constraint: combine multiple strides
Sven Verdoolaege [Fri, 19 Apr 2013 09:42:09 +0000 (11:42 +0200)]
isl_ast_build_get_stride_constraint: combine multiple strides

If we find multiple constraints from which can derive a stride,
then we would only keep the stride information from the last
of these constraints.  We now combine multiple strides into
a single stride.  Note that this may not have any effect in practice
because multiple strides are usually already combined into one
at the level of the constraints of a basic set.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_ast_build.c: use isl_int_gcdext instead of open-coded version
Sven Verdoolaege [Wed, 17 Apr 2013 15:51:55 +0000 (17:51 +0200)]
isl_ast_build.c: use isl_int_gcdext instead of open-coded version

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_int_gcdext
Sven Verdoolaege [Wed, 17 Apr 2013 15:51:28 +0000 (17:51 +0200)]
add isl_int_gcdext

We will use it in the next commit.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_ast_build_ast_from_schedule: also add stride guard in generic case
Sven Verdoolaege [Fri, 19 Apr 2013 08:08:11 +0000 (10:08 +0200)]
isl_ast_build_ast_from_schedule: also add stride guard in generic case

Any guard implied by the stride constraint in the AST build domain
needs to be enforced by the generated AST and may not necessarily
be implied by the strided loop itself.
We were already adding this guard to the graft in the degenerate case,
but not in the generic case.

The implied guard is usually already available in loop bounds constraints,
so it is not clear if this fixes any bug that can appear in practice,
However, this may just be a consequence of the internal representation of sets
and we should not depend too much on this internal representation.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_ast_build_set_loop_bounds: compute divs after eliminating strided dimension
Sven Verdoolaege [Thu, 18 Apr 2013 14:12:00 +0000 (16:12 +0200)]
isl_ast_build_set_loop_bounds: compute divs after eliminating strided dimension

Although it is unlikely that the elimination would result in any unknown divs,
we had better make sure to preserve the invariant that build->domain does not
have any unknown divs.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_map_simplify.c: normalize_divs_in_context: improve error handling
Sven Verdoolaege [Thu, 18 Apr 2013 13:02:47 +0000 (15:02 +0200)]
isl_map_simplify.c: normalize_divs_in_context: improve error handling

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_ast_build_expr.c: remove left-over from refactoring
Sven Verdoolaege [Wed, 17 Apr 2013 14:20:14 +0000 (16:20 +0200)]
isl_ast_build_expr.c: remove left-over from refactoring

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_ast_codegen.c: create_node_scaled: reflect current domain slice in schedule
Sven Verdoolaege [Thu, 11 Apr 2013 15:36:38 +0000 (17:36 +0200)]
isl_ast_codegen.c: create_node_scaled: reflect current domain slice in schedule

If we detect that a given schedule dimension has a fixed (possibly
parametric) value, then this value is recorded in the build and
the schedule dimension is eliminated.  This elimination process may
drop constraints on the part of the domain that we are currently considering,
which may cause all sorts of problems.  In particular, we may fail
to discover at the end of the AST generation that the original schedule
was single valued and insert spurious loops.

Plug in the value we found instead of simply eliminating the schedule
dimension.

Reported-by: Tobias Grosser <tobias@grosser.es>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_union_map_preimage_domain_multi_aff
Sven Verdoolaege [Fri, 12 Apr 2013 16:18:31 +0000 (18:18 +0200)]
add isl_union_map_preimage_domain_multi_aff

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