platform/upstream/isl.git
12 years agoadd isl_multi_aff_lift
Sven Verdoolaege [Thu, 8 Sep 2011 20:08:18 +0000 (22:08 +0200)]
add isl_multi_aff_lift

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_local_space_lifting
Sven Verdoolaege [Thu, 8 Sep 2011 20:08:03 +0000 (22:08 +0200)]
add isl_local_space_lifting

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_local_space_lift
Sven Verdoolaege [Thu, 8 Sep 2011 20:08:03 +0000 (22:08 +0200)]
add isl_local_space_lift

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_local_space_intersect
Sven Verdoolaege [Thu, 8 Sep 2011 12:32:58 +0000 (14:32 +0200)]
add isl_local_space_intersect

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_multi_aff_read_from_str
Sven Verdoolaege [Sun, 28 Aug 2011 16:15:39 +0000 (18:15 +0200)]
add isl_multi_aff_read_from_str

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_pw_aff_read_from_str
Sven Verdoolaege [Wed, 21 Sep 2011 12:23:46 +0000 (14:23 +0200)]
add isl_pw_aff_read_from_str

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_aff_read_from_str
Sven Verdoolaege [Sun, 28 Aug 2011 15:08:00 +0000 (17:08 +0200)]
add isl_aff_read_from_str

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_pw_multi_aff_read_from_str
Sven Verdoolaege [Sun, 28 Aug 2011 12:18:46 +0000 (14:18 +0200)]
add isl_pw_multi_aff_read_from_str

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_pw_multi_aff_from_map
Sven Verdoolaege [Tue, 16 Aug 2011 16:46:37 +0000 (18:46 +0200)]
add isl_pw_multi_aff_from_map

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_basic_map_lexmin_pw_multi_aff
Sven Verdoolaege [Tue, 16 Aug 2011 16:46:25 +0000 (18:46 +0200)]
add isl_basic_map_lexmin_pw_multi_aff

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agopip: optionally use isl_basic_set_partial_lexmin_pw_multi_aff
Sven Verdoolaege [Thu, 1 Sep 2011 10:46:39 +0000 (12:46 +0200)]
pip: optionally use isl_basic_set_partial_lexmin_pw_multi_aff

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_basic_{set,map}_partial_lex{min,max}_pw_multi_aff
Sven Verdoolaege [Sat, 13 Aug 2011 19:57:22 +0000 (21:57 +0200)]
add isl_basic_{set,map}_partial_lex{min,max}_pw_multi_aff

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_pw_multi_aff_substitute
Sven Verdoolaege [Tue, 16 Aug 2011 09:33:12 +0000 (11:33 +0200)]
add isl_pw_multi_aff_substitute

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_set_substitute
Sven Verdoolaege [Tue, 16 Aug 2011 09:02:36 +0000 (11:02 +0200)]
add isl_set_substitute

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_local_space_substitute
Sven Verdoolaege [Tue, 16 Aug 2011 09:00:43 +0000 (11:00 +0200)]
add isl_local_space_substitute

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_printer_print_pw_multi_aff: partial support for C output
Sven Verdoolaege [Thu, 25 Aug 2011 10:15:32 +0000 (12:15 +0200)]
isl_printer_print_pw_multi_aff: partial support for C output

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_pw_multi_aff
Sven Verdoolaege [Thu, 1 Sep 2011 09:58:50 +0000 (11:58 +0200)]
add isl_pw_multi_aff

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_pw_*_get_dim_id
Sven Verdoolaege [Mon, 26 Sep 2011 11:49:33 +0000 (13:49 +0200)]
add isl_pw_*_get_dim_id

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_pw_*_get_dim_name
Sven Verdoolaege [Mon, 26 Sep 2011 11:48:54 +0000 (13:48 +0200)]
add isl_pw_*_get_dim_name

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_pw_*_has_tuple_id
Sven Verdoolaege [Mon, 26 Sep 2011 11:30:39 +0000 (13:30 +0200)]
add isl_pw_*_has_tuple_id

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_pw_*_set_dim_id
Sven Verdoolaege [Wed, 21 Sep 2011 09:10:37 +0000 (11:10 +0200)]
add isl_pw_*_set_dim_id

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_pw_*_get_tuple_id
Sven Verdoolaege [Thu, 8 Sep 2011 12:43:42 +0000 (14:43 +0200)]
add isl_pw_*_get_tuple_id

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_pw_*_get_tuple_name
Sven Verdoolaege [Thu, 25 Aug 2011 10:09:18 +0000 (12:09 +0200)]
add isl_pw_*_get_tuple_name

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_basic_map_from_multi_aff
Sven Verdoolaege [Thu, 1 Sep 2011 09:59:56 +0000 (11:59 +0200)]
add isl_basic_map_from_multi_aff

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_multi_aff
Sven Verdoolaege [Thu, 1 Sep 2011 09:49:19 +0000 (11:49 +0200)]
add isl_multi_aff

An isl_multi_aff object represents a sequence of
zero or more affine expressions, all defined on the same domain space.
As such, they are different from isl_aff_lists as the elements in a list
may have different spaces and no space information is available at all
about empty lists.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_pw_templ.c: rename align_params_pw_pw_and to include PW
Sven Verdoolaege [Thu, 1 Sep 2011 09:34:57 +0000 (11:34 +0200)]
isl_pw_templ.c: rename align_params_pw_pw_and to include PW

This allows isl_pw_templ.c to be included twice from the same file.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_map_dim_max
Sven Verdoolaege [Wed, 21 Sep 2011 14:53:11 +0000 (16:53 +0200)]
add isl_map_dim_max

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoprivately export isl_basic_map_foreach_lexopt
Sven Verdoolaege [Wed, 21 Sep 2011 16:01:29 +0000 (18:01 +0200)]
privately export isl_basic_map_foreach_lexopt

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_basic_map_eliminate
Sven Verdoolaege [Fri, 30 Sep 2011 15:24:36 +0000 (17:24 +0200)]
add isl_basic_map_eliminate

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_basic_map_has_dim_id
Sven Verdoolaege [Fri, 30 Sep 2011 14:56:20 +0000 (16:56 +0200)]
add isl_basic_map_has_dim_id

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoMerge branch 'maint'
Sven Verdoolaege [Sun, 2 Oct 2011 08:45:43 +0000 (10:45 +0200)]
Merge branch 'maint'

12 years agoisl_basic_map_eliminate_vars: gauss result
Sven Verdoolaege [Sat, 1 Oct 2011 08:29:16 +0000 (10:29 +0200)]
isl_basic_map_eliminate_vars: gauss result

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_aff_set_dim_id
Sven Verdoolaege [Sat, 24 Sep 2011 16:08:08 +0000 (18:08 +0200)]
add isl_aff_set_dim_id

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_local_space_set_dim_id
Sven Verdoolaege [Sat, 24 Sep 2011 16:07:52 +0000 (18:07 +0200)]
add isl_local_space_set_dim_id

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_map_find_dim_by_name
Sven Verdoolaege [Sat, 24 Sep 2011 09:42:30 +0000 (11:42 +0200)]
add isl_map_find_dim_by_name

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_space_find_dim_by_name
Sven Verdoolaege [Sat, 24 Sep 2011 09:01:01 +0000 (11:01 +0200)]
add isl_space_find_dim_by_name

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoexport isl_pw_aff_intersect_domain
Sven Verdoolaege [Wed, 21 Sep 2011 12:15:20 +0000 (14:15 +0200)]
export isl_pw_aff_intersect_domain

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoexport isl_pw_aff_plain_is_equal
Sven Verdoolaege [Wed, 21 Sep 2011 12:13:53 +0000 (14:13 +0200)]
export isl_pw_aff_plain_is_equal

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd generic isl_pw_*_set_tuple_id
Sven Verdoolaege [Mon, 26 Sep 2011 11:39:30 +0000 (13:39 +0200)]
add generic isl_pw_*_set_tuple_id

For consistency, this means we need to change the prototype of
isl_pw_aff_set_tuple_id.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_set_intersect: properly handle intersection with parameter domains
Sven Verdoolaege [Thu, 22 Sep 2011 09:53:09 +0000 (11:53 +0200)]
isl_set_intersect: properly handle intersection with parameter domains

isl_set_intersect currently allows one of its arguments to be a parameter
domain while the other is not.  This will probably change in future, but
while we still support this situation, we should make sure that the result
lives in the same space as that of the argument that is not a parameter domain.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_access_info_compute_flow: align parameters of input may access relations
Sven Verdoolaege [Sat, 24 Sep 2011 08:54:00 +0000 (10:54 +0200)]
isl_access_info_compute_flow: align parameters of input may access relations

This part was missing from 13124d3 (isl_access_info_compute_flow: align
parameters of input access relations, Thu Aug 11 14:03:55 2011 +0200).

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoMerge branch 'maint'
Sven Verdoolaege [Fri, 23 Sep 2011 08:53:33 +0000 (10:53 +0200)]
Merge branch 'maint'

12 years agofix isl_set_involves_dims
Sven Verdoolaege [Fri, 23 Sep 2011 08:34:48 +0000 (10:34 +0200)]
fix isl_set_involves_dims

It would only consider the set to involve a dim if _all_ its subsets
would involve the dim, while it should consider the set to involve a
dim if _any_ of its subsets do.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_set_plain_is_fixed
Sven Verdoolaege [Thu, 22 Sep 2011 14:31:29 +0000 (16:31 +0200)]
add isl_set_plain_is_fixed

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_set_from_params
Sven Verdoolaege [Thu, 22 Sep 2011 10:00:28 +0000 (12:00 +0200)]
add isl_set_from_params

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_space_set_from_params
Sven Verdoolaege [Thu, 22 Sep 2011 10:00:15 +0000 (12:00 +0200)]
add isl_space_set_from_params

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoMerge branch 'maint'
Sven Verdoolaege [Thu, 22 Sep 2011 11:15:02 +0000 (13:15 +0200)]
Merge branch 'maint'

12 years agoisl_qpolynomial_morph: properly handle denominators in morph
Sven Verdoolaege [Tue, 20 Sep 2011 13:59:19 +0000 (15:59 +0200)]
isl_qpolynomial_morph: properly handle denominators in morph

Before, the denominator would get ignored during the morphing of the divs.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_mat_diag
Sven Verdoolaege [Tue, 20 Sep 2011 13:58:11 +0000 (15:58 +0200)]
add isl_mat_diag

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_tab_pip.c: sol_for_add: correctly set denominator
Sven Verdoolaege [Thu, 1 Sep 2011 09:42:16 +0000 (11:42 +0200)]
isl_tab_pip.c: sol_for_add: correctly set denominator

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_tab_pip.c: sol_map_add: fix double free on error path
Sven Verdoolaege [Thu, 1 Sep 2011 09:41:22 +0000 (11:41 +0200)]
isl_tab_pip.c: sol_map_add: fix double free on error path

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_stream: accept "==" token
Sven Verdoolaege [Sun, 18 Sep 2011 12:41:05 +0000 (14:41 +0200)]
isl_stream: accept "==" token

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_union_pw_*_plain_is_equal
Sven Verdoolaege [Sun, 18 Sep 2011 14:29:30 +0000 (16:29 +0200)]
add isl_union_pw_*_plain_is_equal

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_pw_*_plain_is_equal
Sven Verdoolaege [Mon, 5 Sep 2011 10:26:23 +0000 (12:26 +0200)]
add isl_pw_*_plain_is_equal

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_set_plain_cmp
Sven Verdoolaege [Mon, 5 Sep 2011 10:12:47 +0000 (12:12 +0200)]
add isl_set_plain_cmp

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_map_params
Sven Verdoolaege [Thu, 8 Sep 2011 14:55:41 +0000 (16:55 +0200)]
add isl_map_params

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_stream_next_token: treat "-0" as two tokens '-' and '0'
Sven Verdoolaege [Thu, 15 Sep 2011 12:25:51 +0000 (14:25 +0200)]
isl_stream_next_token: treat "-0" as two tokens '-' and '0'

Usually, a '-' followed by a sequence of digits is treated as a single
(negative) number.  When parsing affine expressions, negative numbers
are allowed without a preceding '+'.  However, if "-0" is parsed as '0'
then there is no way of distinguishing between "-0" and "0" and so "-0"
was not allowed in affine expressions.
We now treat "-0" as two tokens, so that it can be used in affine expressions.
The flip side is that "-0" can no longer be used where a single integer
is expected.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agodrop "nparam" argument from isl_{set,map}_read_from_{file,str}
Sven Verdoolaege [Wed, 14 Sep 2011 17:36:53 +0000 (19:36 +0200)]
drop "nparam" argument from isl_{set,map}_read_from_{file,str}

The "nparam" argument is removed because it is inconsistent with
the rest of the API.
The "nparam" argument was only ever useful for reading sets
represented in the original PolyLib format.
For reading maps, it was of limited use because there was no way
of specifying the number of input dimensions.
In both the isl format and the extended PolyLib format, the number
of parameters can be read off from the input.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agodoc: document *_move_dims functions
Sven Verdoolaege [Wed, 14 Sep 2011 17:50:57 +0000 (19:50 +0200)]
doc: document *_move_dims functions

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agodrop isl_div abstraction
Sven Verdoolaege [Fri, 9 Sep 2011 12:55:16 +0000 (14:55 +0200)]
drop isl_div abstraction

The isl_div abstraction has been superseded by the isl_aff abstraction,
so use that instead.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_{in,}equality_alloc: take isl_local_space intead of isl_space
Sven Verdoolaege [Tue, 13 Sep 2011 08:39:55 +0000 (10:39 +0200)]
isl_{in,}equality_alloc: take isl_local_space intead of isl_space

This makes it easier to construct constraints involving existentially
quantified variables.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agodoc: update example code to change in return type of isl_constraint_set_*
Sven Verdoolaege [Tue, 13 Sep 2011 10:51:12 +0000 (12:51 +0200)]
doc: update example code to change in return type of isl_constraint_set_*

The change happened way back in e2a2317 (reimplement isl_constraint in terms
of isl_aff, Fri Jul 1 17:20:52 2011 +0200).

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoMerge branch 'maint'
Sven Verdoolaege [Fri, 9 Sep 2011 15:45:51 +0000 (17:45 +0200)]
Merge branch 'maint'

12 years agoprovide full prototypes for some functions with no arguments
Sven Verdoolaege [Fri, 9 Sep 2011 15:40:06 +0000 (17:40 +0200)]
provide full prototypes for some functions with no arguments

Reported-by: Zbigniew Chamski <zbigniew.chamski@gmail.com>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agodoc: fix typo
Sven Verdoolaege [Fri, 2 Sep 2011 10:58:29 +0000 (12:58 +0200)]
doc: fix typo

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_set_gist_params
Sven Verdoolaege [Wed, 7 Sep 2011 14:38:50 +0000 (16:38 +0200)]
add isl_set_gist_params

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agomake isl_pw_* object live in a map space
Sven Verdoolaege [Tue, 30 Aug 2011 14:47:59 +0000 (16:47 +0200)]
make isl_pw_* object live in a map space

Before, the space of an isl_pw_* object was that of the cells.
Conceptually, however, they map elements from these cells to something
and so their space should be that of a map.
This is especially useful for isl_pw_multi_aff objects that will
be introduced later.  Since we want to be able to convert back and forth
between such objects and isl_maps, we need to keep track of the
complete map space.

isl_aff, isl_qpolynomial and isl_qpolynomial_fold objects now
also live in a map space, although internally, they still keep
track of the domain space.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_space_extend_domain_with_range
Sven Verdoolaege [Tue, 30 Aug 2011 12:26:18 +0000 (14:26 +0200)]
add isl_space_extend_domain_with_range

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_space_is_domain
Sven Verdoolaege [Tue, 30 Aug 2011 12:25:50 +0000 (14:25 +0200)]
add isl_space_is_domain

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_local_space_is_set
Sven Verdoolaege [Tue, 30 Aug 2011 07:59:43 +0000 (09:59 +0200)]
add isl_local_space_is_set

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_local_space_domain
Sven Verdoolaege [Mon, 29 Aug 2011 15:57:15 +0000 (17:57 +0200)]
add isl_local_space_domain

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoimplement isl_constraint on top of isl_vec
Sven Verdoolaege [Mon, 29 Aug 2011 13:34:59 +0000 (15:34 +0200)]
implement isl_constraint on top of isl_vec

In e2a2317 (reimplement isl_constraint in terms of isl_aff,
Fri Jul 1 17:20:52 2011 +0200), were reimplemented on top of isl_aff
because both objects share many features.
There are also some difference, however, and it is therefore better
to implement isl_constraint directly on top of isl_vec.
In particular, an isl_aff has a denominator, whereas an isl_constraint
does not.  Although the denominator of an isl_aff is usually 1, it may
not always be and could therefore lead to subtle bugs.

Moreover, the space of an isl_constraint may be either that of
a set or a map, whereas, in principle, the domain of isl_aff is always
a set.  We allowed the domain of an isl_aff to be a map when it was
used to implement an isl_constraint, but this was not very clean.
This would become even more dramatic when we change the space of an isl_aff
to be that of a map.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_vec_neg
Sven Verdoolaege [Mon, 29 Aug 2011 13:32:39 +0000 (15:32 +0200)]
add isl_vec_neg

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_aff.c: extract isl_local_space_get_active
Sven Verdoolaege [Mon, 29 Aug 2011 13:00:33 +0000 (15:00 +0200)]
isl_aff.c: extract isl_local_space_get_active

This function will also be useful for our new implementation of isl_constraints.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_output.c: drop redundant "set" argument
Sven Verdoolaege [Fri, 26 Aug 2011 08:35:05 +0000 (10:35 +0200)]
isl_output.c: drop redundant "set" argument

We used to have to keep track of whether a given isl_space was that
of a map or a set, but now the isl_space itself contains that information
so we no longer need this extra argument.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_union_*_alloc: project space onto parameters
Sven Verdoolaege [Fri, 2 Sep 2011 06:23:58 +0000 (08:23 +0200)]
isl_union_*_alloc: project space onto parameters

Before, we were expecting the user to provide a parameter space,
but we might as well project whatever the user gives us onto
its parameter space.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoexplicitly differentiate between spaces of maps, sets and parameter sets
Sven Verdoolaege [Thu, 25 Aug 2011 17:21:05 +0000 (19:21 +0200)]
explicitly differentiate between spaces of maps, sets and parameter sets

Before, no distinction was made internally between spaces of maps,
sets and parameter spaces.  In particular, an isl_space with zero
input and output dimensions could have been any of those.
When printing isl_sets and isl_maps, we could keep track of whether
the original object as a set or a map, but parametric domains and
zero-dimensional domains were still printed identically.

Now we explicitly keep track of whether a space is supposed to be
that of a map, set or parametric set.  This means for example that
"[N] -> { [] : N >= 0 }" and "[N] -> { : N >= 0 }" are no longer considered
to be identical.
This may break some code that was using one space in place of another,
especially since until recently there was no official way of creating
a parameter space.

The main advantage is that we can now recognize parameter spaces
and treat them appropriately.  In particular, the domains of affine
expressions can now be correctly identified as being either (possibly
zero-dimensional) sets or parameter domains.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoallow isl_ids with negative reference counts
Sven Verdoolaege [Thu, 25 Aug 2011 19:18:34 +0000 (21:18 +0200)]
allow isl_ids with negative reference counts

This will be useful for static isl_ids that are not supposed to change.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoproper implementation of isl_union_map_from_range
Sven Verdoolaege [Sat, 27 Aug 2011 15:41:45 +0000 (17:41 +0200)]
proper implementation of isl_union_map_from_range

The original implementation would just return the input
because isl_sets and isl_maps have the same internal representation.
This will change in the near future, however, and so we need
to actually compute the range of all the elements in the input.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_map_from_domain_and_range: drop explicit conversion to isl_map
Sven Verdoolaege [Sat, 27 Aug 2011 12:41:11 +0000 (14:41 +0200)]
isl_map_from_domain_and_range: drop explicit conversion to isl_map

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_set_apply_pw_qpolynomial_fold: drop explicit conversion to isl_map
Sven Verdoolaege [Sat, 27 Aug 2011 12:38:09 +0000 (14:38 +0200)]
isl_set_apply_pw_qpolynomial_fold: drop explicit conversion to isl_map

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_tab_basic_set_non_trivial_lexmin: drop explicit conversion to isl_basic_map
Sven Verdoolaege [Sat, 27 Aug 2011 12:31:31 +0000 (14:31 +0200)]
isl_tab_basic_set_non_trivial_lexmin: drop explicit conversion to isl_basic_map

And similarly for isl_tab_basic_set_non_neg_lexmin.

In future, the space of an isl_basic_map will be different from that
of an isl_basic_set.  Calling isl_basic_map_from_range may therefore
result in possibly costly changes.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_tab_pip.c: fix whitespace issue
Sven Verdoolaege [Sat, 27 Aug 2011 12:33:12 +0000 (14:33 +0200)]
isl_tab_pip.c: fix whitespace issue

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_set_read_from_*: coerce set-like maps into sets
Sven Verdoolaege [Sun, 28 Aug 2011 08:21:52 +0000 (10:21 +0200)]
isl_set_read_from_*: coerce set-like maps into sets

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_input.c: map_read_polylib: convert set-like maps to sets
Sven Verdoolaege [Sun, 28 Aug 2011 08:17:57 +0000 (10:17 +0200)]
isl_input.c: map_read_polylib: convert set-like maps to sets

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_input.c: obj_read: start off from parameter space
Sven Verdoolaege [Sun, 28 Aug 2011 07:53:27 +0000 (09:53 +0200)]
isl_input.c: obj_read: start off from parameter space

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_input.c: represent nested tuple as isl_set
Sven Verdoolaege [Sun, 28 Aug 2011 07:49:45 +0000 (09:49 +0200)]
isl_input.c: represent nested tuple as isl_set

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_input.c: obj_read_poly_or_fold: represent domain as isl_set
Sven Verdoolaege [Sat, 27 Aug 2011 12:17:32 +0000 (14:17 +0200)]
isl_input.c: obj_read_poly_or_fold: represent domain as isl_set

Although, internally, isl_sets and isl_maps are the same,
conceptually, the domain of an isl_pw_qpolynomial is an isl_set.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_basic_set_multiplicative_call: explicitly project on parameter space
Sven Verdoolaege [Sun, 28 Aug 2011 07:20:31 +0000 (09:20 +0200)]
isl_basic_set_multiplicative_call: explicitly project on parameter space

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_pw_qpolynomial_fold_bound: explicitly project on parameter space
Sven Verdoolaege [Sun, 28 Aug 2011 07:43:35 +0000 (09:43 +0200)]
isl_pw_qpolynomial_fold_bound: explicitly project on parameter space

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_qpolynomial_bound_on_domain_bernstein: explicitly project on parameter space
Sven Verdoolaege [Sun, 28 Aug 2011 07:31:01 +0000 (09:31 +0200)]
isl_qpolynomial_bound_on_domain_bernstein: explicitly project on parameter space

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_qpolynomial_bound_on_domain_range: explicitly project on parameter space
Sven Verdoolaege [Sun, 28 Aug 2011 07:15:25 +0000 (09:15 +0200)]
isl_qpolynomial_bound_on_domain_range: explicitly project on parameter space

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_union_map_from_map: explicitly project on parameter space
Sven Verdoolaege [Sat, 3 Sep 2011 19:34:15 +0000 (21:34 +0200)]
isl_union_map_from_map: explicitly project on parameter space

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_union_map_align_params: explicitly project on parameter space
Sven Verdoolaege [Sat, 3 Sep 2011 19:42:07 +0000 (21:42 +0200)]
isl_union_map_align_params: explicitly project on parameter space

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_polynomial.c: constant_on_domain: explicitly project on parameter space
Sven Verdoolaege [Sat, 27 Aug 2011 12:50:44 +0000 (14:50 +0200)]
isl_polynomial.c: constant_on_domain: explicitly project on parameter space

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agobasic_set_dim_max: explicitly project on parameter space
Sven Verdoolaege [Sun, 28 Aug 2011 08:36:00 +0000 (10:36 +0200)]
basic_set_dim_max: explicitly project on parameter space

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoisl_basic_set_compute_vertices: explicitly turn chambers into parameter sets
Sven Verdoolaege [Sun, 28 Aug 2011 07:00:20 +0000 (09:00 +0200)]
isl_basic_set_compute_vertices: explicitly turn chambers into parameter sets

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agobound.c: explicitly convert context into parameter set
Sven Verdoolaege [Sun, 28 Aug 2011 07:28:36 +0000 (09:28 +0200)]
bound.c: explicitly convert context into parameter set

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agopip.c: explicitly convert context into parameter set
Sven Verdoolaege [Sat, 27 Aug 2011 12:08:33 +0000 (14:08 +0200)]
pip.c: explicitly convert context into parameter set

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
12 years agoadd isl_pw_qpolynomial_fold_project_domain_on_params
Sven Verdoolaege [Fri, 26 Aug 2011 20:22:08 +0000 (22:22 +0200)]
add isl_pw_qpolynomial_fold_project_domain_on_params

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