platform/upstream/isl.git
10 years agoisl_basic_set_opt: avoid invalid access on error path
Sven Verdoolaege [Wed, 5 Jun 2013 07:50:16 +0000 (09:50 +0200)]
isl_basic_set_opt: avoid invalid access on error path

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
10 years agoisl_tab_pip.c: context_gbr_save: avoid invalid access on error path
Sven Verdoolaege [Tue, 4 Jun 2013 12:27:57 +0000 (14:27 +0200)]
isl_tab_pip.c: context_gbr_save: avoid invalid access on error path

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
10 years agoisl_tab_pip.c: use_shifted: avoid invalid access on error path
Sven Verdoolaege [Tue, 4 Jun 2013 12:22:06 +0000 (14:22 +0200)]
isl_tab_pip.c: use_shifted: avoid invalid access on error path

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
10 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>
10 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 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_map_simplify.c: div_is_redundant: ignore coefficients of unknown divs
Sven Verdoolaege [Tue, 16 Apr 2013 09:49:05 +0000 (11:49 +0200)]
isl_map_simplify.c: div_is_redundant: ignore coefficients of unknown divs

If a div is unknown, then its coefficients are undefined so we should
not take them into account while checking if some other div is redundant.
In rare cases, looking at those undefined coefficients could result
in system dependent behavior.

Reported-by: Tobias Grosser <tobias@grosser.es>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_ast_build_ast_from_schedule: properly handle union atomic options
Sven Verdoolaege [Mon, 15 Apr 2013 12:02:05 +0000 (14:02 +0200)]
isl_ast_build_ast_from_schedule: properly handle union atomic options

In particular, if the domain for which a given dimension should
be atomic is a union of basic sets, then the actual atomic domain
may be larger than this union and we need to make sure that this
larger set is removed from the remainder domain to preserve
the invariant that the elements of the list computed by compute_domains
are disjoint.

Reported-by: Tobias Grosser <tobias@grosser.es>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_ast_codegen.c: update_unrolling_lower_bound: check for overflow
Sven Verdoolaege [Mon, 15 Apr 2013 10:55:59 +0000 (12:55 +0200)]
isl_ast_codegen.c: update_unrolling_lower_bound: check for overflow

If the number of slices along a given lower bound exceeds the maximal
value of an integer, then it would mistakenly be replaced by its
least signficant bits, resulting in slices being dropped if the lower
bound ends up being selected as the best (based on the wrong number).
If the number of slices really exceeds the maximal value of an integer,
then we do not want to honor the request of the user anyway.
We should probably set an even smaller limit.

Reported-by: Tobias Grosser <tobias@grosser.es>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_basic_map_insert_dims: plug memory leak when called on empty input
Sven Verdoolaege [Thu, 11 Apr 2013 15:47:21 +0000 (17:47 +0200)]
isl_basic_map_insert_dims: plug memory leak when called on empty input

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoChangeLog: drop some text that appears to have been copied by mistake
Sven Verdoolaege [Thu, 11 Apr 2013 10:32:23 +0000 (12:32 +0200)]
ChangeLog: drop some text that appears to have been copied by mistake

In particular, the text was copied by 9fe3e28 (isl 0.10,
Sun Jun 3 15:47:09 2012 +0200).

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl 0.11.2 isl-0.11.2
Sven Verdoolaege [Tue, 9 Apr 2013 09:51:29 +0000 (11:51 +0200)]
isl 0.11.2

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd missing interface/all.h and interface/isl.py.top to distribution
Sven Verdoolaege [Tue, 9 Apr 2013 16:36:35 +0000 (18:36 +0200)]
add missing interface/all.h and interface/isl.py.top to distribution

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_schedule_get_map: pad schedule map with zeros if reconstructed from bands
Sven Verdoolaege [Tue, 9 Apr 2013 15:37:35 +0000 (17:37 +0200)]
isl_schedule_get_map: pad schedule map with zeros if reconstructed from bands

The schedule map extracted from the isl_schedule_nodes is padded with zeros
by construction.  However, if the schedule map is reconstructed from the
band forest, then the schedule map was not be padded with zeros.
Pad this schedule as well.

We may want to change isl_band_list_get_suffix_schedule to perform this
padded instead.

Reported-by: Ali El Moussawi <elmoussawi.ali@gmail.com>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_ast_node_print: avoid duplicate declarations in printed code
Sven Verdoolaege [Fri, 29 Mar 2013 13:53:13 +0000 (14:53 +0100)]
isl_ast_node_print: avoid duplicate declarations in printed code

If a loop has only one iteration but if the expression
for this single iteration is too complicated to be substituted into the AST,
then the expression is assigned to a variable corresponding to the loop
iterator.
If two such loops occur in the same block, then we would end up with
two declarations of the same variable.  Avoid this problem by introducing
a block around the declaration if it appears in a sequence of statements.

Reported-by: Tobias Grosser <tobias@grosser.es>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_ast.c: extract out start_block and end_block from print_ast_node_c
Sven Verdoolaege [Sun, 7 Apr 2013 15:13:12 +0000 (17:13 +0200)]
isl_ast.c: extract out start_block and end_block from print_ast_node_c

We will be able to reuse them in the next commit.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoconfigure.ac: explicitly link in llvm bitreader component in extract_interface
Sven Verdoolaege [Sun, 7 Apr 2013 12:07:27 +0000 (14:07 +0200)]
configure.ac: explicitly link in llvm bitreader component in extract_interface

Apparently, the bitreader component is required for ASTReader and
is no longer included implicitly.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoupdate for change in arguments of clang's HeaderSearchOptions::AddPath
Sven Verdoolaege [Sun, 7 Apr 2013 11:20:41 +0000 (13:20 +0200)]
update for change in arguments of clang's HeaderSearchOptions::AddPath

In particular, the IsUserSpecified argument has been removed.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoupdate for change in arguments of clang's CompilerInstance::createDiagnostics
Sven Verdoolaege [Sun, 7 Apr 2013 11:13:14 +0000 (13:13 +0200)]
update for change in arguments of clang's CompilerInstance::createDiagnostics

In particular, CompilerInstance::createDiagnostics no longer takes
argc and argv as arugments.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_tab_basic_map_partial_lexopt: disable use of shifted tableau on equalities
Sven Verdoolaege [Sun, 24 Mar 2013 12:46:44 +0000 (13:46 +0100)]
isl_tab_basic_map_partial_lexopt: disable use of shifted tableau on equalities

If the input context already involves equalities then the shfited tableau
is not used as it would be empty.  However, if equalities are added at
a later stage (e.g., transferred for the input map), then we would fail
to disable the use of the shifted tableau, possibly resulting in invalid
sample values being computing from this shifted tableau.

Reported-by: Tobias Grosser <tobias@grosser.es>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_tab_pip.c: context_gbr_detect_equalities: improve error handling
Sven Verdoolaege [Sun, 24 Mar 2013 09:20:24 +0000 (10:20 +0100)]
isl_tab_pip.c: context_gbr_detect_equalities: improve error handling

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_basic_map_foreach_lexopt: properly merge partial solutions
Sven Verdoolaege [Wed, 20 Mar 2013 08:55:50 +0000 (09:55 +0100)]
isl_basic_map_foreach_lexopt: properly merge partial solutions

If we detect two identical solutions in adjacent parts of the search space,
then we merge them into a single solution.  The combined domain may however
have fewer existentially quantified variables and so we also need to adjust
the matrix representing the solution on that domain to no longer refer
to the extra existentially quantified variables.  Otherwise, the code
in sol_for_add could end up accessing elements of aff->v outside its bounds.
Note that it is safe to remove the columns that refer to the extra
existentially quantified variables since their coefficients need to be zero
for the two partial solutions to be considered identical.

Reported-by: Andreas Kloeckner <lists@informa.tiker.net>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_map_coalesce: avoid dropping constraints redundant wrt implicit equalities
Sven Verdoolaege [Sat, 16 Mar 2013 13:40:56 +0000 (14:40 +0100)]
isl_map_coalesce: avoid dropping constraints redundant wrt implicit equalities

isl_map_coalesce first detects implicit equalities in the basic maps.
If two basic maps can indeed be coalesced, then fuse() would
only add this constraint to the fused basic map as an inequality.
Other constraints that imply that this constraint is actually an equality
are redundant with respect to the equality and would not get copied
inside fuse() either.  The end result is that we would lose information.

In principle, we could just modify fuse() to add the implicit equalities
to the fused basic map as equalities, but it seems more prudent to
turn them into explicit equalities from the start.

Reported-by: Tobias Grosser <tobias@grosser.es>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_basic_map_simplify: avoid infinite loop on empty input
Sven Verdoolaege [Thu, 14 Mar 2013 16:47:14 +0000 (17:47 +0100)]
isl_basic_map_simplify: avoid infinite loop on empty input

eliminate_divs_ineq skips the step of actually removing the div
if the basic map is marked empty.  This is needed because in the
process of marking the basic map empty, the constraints may have
been replaced by the canonical representation of an empty basic map
which does not have any divs.
However, the basic map may have already been marked empty before,
possibly without having the constraints replaced by the canonical
representation.  In such cases, we would also skip the step that
remove the div, but it would actually still be present and we would
keep making "progress" in every iteration of isl_basic_map_simplify,
resulting in an infinite loop.

Reported-by: Tobias Grosser <tobias@grosser.es>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_basic_set_parameter_compression: extend assertion
Sven Verdoolaege [Wed, 13 Mar 2013 07:43:59 +0000 (08:43 +0100)]
isl_basic_set_parameter_compression: extend assertion

We were only checking if the number of equalities is less than
or equal to the number of variables, while the code also assumes
that all of the equalities involves at least one variable.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_map.c: parameter_compute_divs: check result of isl_basic_set_gauss call
Sven Verdoolaege [Wed, 13 Mar 2013 07:13:00 +0000 (08:13 +0100)]
isl_map.c: parameter_compute_divs: check result of isl_basic_set_gauss call

The return value has been completely ignored ever since the call
was introduced in 2bc8301 (isl_pip_basic_map_compute_divs: remove some
equalities first, Mon May 25 12:59:23 2009 +0200).  This may be harmless
in practice at the moment, but it may lead to future bugs.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_arg.c: drop_argument: avoid out-of-bounds array accesses
Sven Verdoolaege [Sat, 9 Mar 2013 20:19:13 +0000 (21:19 +0100)]
isl_arg.c: drop_argument: avoid out-of-bounds array accesses

Reported-by: Tobias Grosser <tobias@grosser.es>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_map_gist_basic_map: avoid invalid access on error
Sven Verdoolaege [Tue, 12 Mar 2013 13:56:12 +0000 (14:56 +0100)]
isl_map_gist_basic_map: avoid invalid access on error

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_ast_build_ast_from_schedule: avoid introducing iterator in hoisted condition
Sven Verdoolaege [Sat, 9 Mar 2013 20:19:13 +0000 (21:19 +0100)]
isl_ast_build_ast_from_schedule: avoid introducing iterator in hoisted condition

ast_graft_list_fuse was being passed the build of the inner level from
create_node_scaled, which could result in the current loop iterator
getting introduced in the hoisted condition.
Since we need the inner build for simplifying the expressions generated
from the conditions that are not hoisted out, we now pass two builds
to ast_graft_list_fuse.

Reported-by: Tobias Grosser <tobias@grosser.es>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_basic_set_sort_constraints: take into account all coefficients
Sven Verdoolaege [Thu, 7 Mar 2013 12:48:18 +0000 (13:48 +0100)]
isl_basic_set_sort_constraints: take into account all coefficients

The comparison function was mistakenly not taking into account
the coefficient of the last variable.  By ignoring this last
coefficient, the comparison could not guarantee the property required
by uset_gist.
Moreover, since constraints that only differ in this last coefficient
would compare equal to each other, the order of such constraints
could depend on the implementation of qsort, resulting in failing
test cases on Solaris 10.

We fix this problem by ignoring the constant term instead of
the last coefficient.  If two constraints only differ in the
constant term, then one of them should have been eliminated
already.

Reported-by: Amos <a.goo0h@gmail.com>
Tested-by: Marc Girod <marc.girod@gmail.com>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_ast_build_ast_from_schedule: fix unrolling corner case
Sven Verdoolaege [Tue, 5 Mar 2013 20:35:22 +0000 (21:35 +0100)]
isl_ast_build_ast_from_schedule: fix unrolling corner case

In some rare cases, the constraint added to perform the unrolling
could get simplied away and then dropped after a simplification
of the domain.  We add the constraint back after the simplification
to ensure that it is present in the result.

Reported-by: Tobias Grosser <tobias@grosser.es>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_basic_map_uncurry: add missing isl_basic_map_cow
Sven Verdoolaege [Wed, 27 Feb 2013 13:42:50 +0000 (14:42 +0100)]
isl_basic_map_uncurry: add missing isl_basic_map_cow

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_basic_map_curry: add missing isl_basic_map_cow
Sven Verdoolaege [Wed, 27 Feb 2013 13:42:44 +0000 (14:42 +0100)]
isl_basic_map_curry: add missing isl_basic_map_cow

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agocodegen_test.sh: avoid use of constructs not supported by /bin/sh on Solaris
Sven Verdoolaege [Thu, 28 Feb 2013 15:59:03 +0000 (16:59 +0100)]
codegen_test.sh: avoid use of constructs not supported by /bin/sh on Solaris

Reported-by: Amos <a.goo0h@gmail.com>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_ast_codegen.c: generate_domain: avoid infinite recursion
Sven Verdoolaege [Tue, 19 Feb 2013 15:46:33 +0000 (16:46 +0100)]
isl_ast_codegen.c: generate_domain: avoid infinite recursion

generate_domain checks if the inverse schedule is single-valued
so that the inverse schedule can be extended if needed.
Since this check is performed on the gisted inverse schedule,
it may fail even in a recursive call on an inverse schedule
that has been extended to ensure that it is single valued.
We may then end up in an infinite recursion.

To avoid this problem, we keep track of the fact that we have
already extended the inverse schedule to not be single-valued.
In such cases, we revert to the ungisted inverse schedule
if the gisted inverse schedule turns out not to be single-valued.

Reported-by: Tobias Grosser <tobias@grosser.es>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_band_tile: set parent field of the child band
Sven Verdoolaege [Thu, 14 Feb 2013 20:23:48 +0000 (21:23 +0100)]
isl_band_tile: set parent field of the child band

The original code would leave it pointing to the parent of the original
band, i.e., the grandparent of the child band.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_pw_multi_aff_drop_dims: fix dropping of output dimensions
Sven Verdoolaege [Thu, 14 Feb 2013 17:53:43 +0000 (18:53 +0100)]
isl_pw_multi_aff_drop_dims: fix dropping of output dimensions

Most isl_pw_*_drop_dims functions don't support dropping of output dimensions
because their pieces have a fixed single output dimension.
However, the pieces of isl_pw_multi_* objects do support dropping of output
dimensions and therefore so should the isl_pw_multi_*_drop_dims functions.

We simply need to skip dropping dimensions from the domains.
The original code would leave the result in an inconsistent state.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_ctx_free: properly free allocated options
Sven Verdoolaege [Tue, 5 Feb 2013 13:21:11 +0000 (14:21 +0100)]
isl_ctx_free: properly free allocated options

The original code would only free the outer structure, without
freeing any of the internally allocated memory.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_input.c: accept_affine_factor: drop unexpected unknown identifier
Sven Verdoolaege [Sun, 3 Feb 2013 12:50:49 +0000 (13:50 +0100)]
isl_input.c: accept_affine_factor: drop unexpected unknown identifier

accept_affine_factor errors out on seeing an unknown identifier, but
the identifier was incorrectly kept in the vars data structure,
possibly resulting in bad accesses if parsing continues after the error.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agointerface/python.cc: add missing include
Sven Verdoolaege [Thu, 27 Dec 2012 10:06:46 +0000 (11:06 +0100)]
interface/python.cc: add missing include

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_ast_codegen.c: compute_class_domains: compute gist of class domains
Sven Verdoolaege [Sun, 16 Dec 2012 18:38:32 +0000 (19:38 +0100)]
isl_ast_codegen.c: compute_class_domains: compute gist of class domains

The class domains may reference variables that been eliminated from
the "executed" map.  Constraints involving these variables may
therefore get accidentally reintroduced into the "executed" map,
which can render the AST build unable to detect whether the inner
"executed" map is single-valued, possibly causing an infinite recursion.
Plug in the values that caused the variables to be eliminated from
the "executed" map to remove any reference to them from the class domains.

Reported-by: Tobias Grosser <tobias@grosser.es>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl 0.11.1 isl-0.11.1
Sven Verdoolaege [Mon, 10 Dec 2012 10:56:26 +0000 (11:56 +0100)]
isl 0.11.1

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_hash_dim: make result independent of endianness
Sven Verdoolaege [Fri, 7 Dec 2012 16:51:13 +0000 (17:51 +0100)]
isl_hash_dim: make result independent of endianness

The result computed by isl_hash_dim may affect the order of maps
in a union map, which may in turn affect the result of AST generation.
In particular, we would generate slightly different output depending
on endianness, causing the tests to fail on big endian machines since
the generated output is compared to output generated on a little endian
machine.

Instead of hashing in the dimensions of the space as integers,
we now only hash in the least significant byte.
This has some effect on the results of AST generation, but the output
should now be the same on little endian and big endian.

Reported-by: Richard Biener <rguenther@suse.de>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_basic_map_move_dims: avoid invalid access on error
Sven Verdoolaege [Fri, 7 Dec 2012 10:42:09 +0000 (11:42 +0100)]
isl_basic_map_move_dims: avoid invalid access on error

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_basic_set_expand_divs: avoid invalid access on error
Sven Verdoolaege [Tue, 4 Dec 2012 16:47:54 +0000 (17:47 +0100)]
isl_basic_set_expand_divs: avoid invalid access on error

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd LICENSE to the distribution
Sven Verdoolaege [Tue, 4 Dec 2012 15:55:44 +0000 (16:55 +0100)]
add LICENSE to the distribution

Reported-by: Richard Biener <rguenther@suse.de>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_schedule.c: add_inter_constraints: avoid invalid access on error
Sven Verdoolaege [Mon, 3 Dec 2012 12:37:42 +0000 (13:37 +0100)]
isl_schedule.c: add_inter_constraints: avoid invalid access on error

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_schedule.c: add_intra_constraints: avoid invalid access on error
Sven Verdoolaege [Mon, 3 Dec 2012 12:37:42 +0000 (13:37 +0100)]
isl_schedule.c: add_intra_constraints: avoid invalid access on error

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_tab_basic_set_non_neg_lexmin: handle NULL input
Sven Verdoolaege [Mon, 3 Dec 2012 12:37:28 +0000 (13:37 +0100)]
isl_tab_basic_set_non_neg_lexmin: handle NULL input

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl 0.11 isl-0.11
Sven Verdoolaege [Mon, 3 Dec 2012 07:17:26 +0000 (08:17 +0100)]
isl 0.11

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_schedule.c: add_inter_validity_constraints: avoid invalid access on error
Sven Verdoolaege [Sun, 2 Dec 2012 20:56:45 +0000 (21:56 +0100)]
isl_schedule.c: add_inter_validity_constraints: avoid invalid access on error

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_tab_basic_set_non_trivial_lexmin: handle NULL input
Sven Verdoolaege [Sun, 2 Dec 2012 16:37:44 +0000 (17:37 +0100)]
isl_tab_basic_set_non_trivial_lexmin: handle NULL input

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_tab.c: push_union: handle NULL input
Sven Verdoolaege [Sun, 2 Dec 2012 16:37:17 +0000 (17:37 +0100)]
isl_tab.c: push_union: handle NULL input

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_mat_transpose: handle NULL input
Sven Verdoolaege [Sun, 2 Dec 2012 15:56:50 +0000 (16:56 +0100)]
isl_mat_transpose: handle NULL input

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_basic_map_foreach_lexopt: avoid invalid access on error
Sven Verdoolaege [Sun, 2 Dec 2012 14:38:13 +0000 (15:38 +0100)]
isl_basic_map_foreach_lexopt: avoid invalid access on error

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_pw_*_on_shared_domain_in: avoid double free on error path
Sven Verdoolaege [Sun, 2 Dec 2012 14:35:49 +0000 (15:35 +0100)]
isl_pw_*_on_shared_domain_in: avoid double free on error path

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_output.c: print_set_c: handle NULL input
Sven Verdoolaege [Sun, 2 Dec 2012 14:35:19 +0000 (15:35 +0100)]
isl_output.c: print_set_c: handle NULL input

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_basic_map_eliminate_vars: avoid invalid access on error
Sven Verdoolaege [Sun, 2 Dec 2012 14:34:09 +0000 (15:34 +0100)]
isl_basic_map_eliminate_vars: avoid invalid access on error

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_map_simplify.c: remove_dependent_vars: handle NULL input
Sven Verdoolaege [Sun, 2 Dec 2012 14:33:42 +0000 (15:33 +0100)]
isl_map_simplify.c: remove_dependent_vars: handle NULL input

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_tab_pip.c: sol_pop: avoid invalid access on error
Sven Verdoolaege [Sun, 2 Dec 2012 13:17:31 +0000 (14:17 +0100)]
isl_tab_pip.c: sol_pop: avoid invalid access on error

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_basic_map_deltas: fix error handling
Sven Verdoolaege [Sun, 2 Dec 2012 12:29:05 +0000 (13:29 +0100)]
isl_basic_map_deltas: fix error handling

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_ast_codegen.c: generate_sorted_domains: avoid invalid access on error
Sven Verdoolaege [Sun, 2 Dec 2012 12:23:06 +0000 (13:23 +0100)]
isl_ast_codegen.c: generate_sorted_domains: avoid invalid access on error

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_test.c: test_ast: avoid invalid access on error
Sven Verdoolaege [Sun, 2 Dec 2012 12:17:16 +0000 (13:17 +0100)]
isl_test.c: test_ast: avoid invalid access on error

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_parameter_alignment_reordering: fix error handling
Sven Verdoolaege [Sun, 2 Dec 2012 12:16:02 +0000 (13:16 +0100)]
isl_parameter_alignment_reordering: fix error handling

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_basic_map_normalize: avoid invalid access on error
Sven Verdoolaege [Sun, 2 Dec 2012 12:14:19 +0000 (13:14 +0100)]
isl_basic_map_normalize: avoid invalid access on error

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_map.c: basic_set_maximal_difference_at: fix error handling
Sven Verdoolaege [Sun, 2 Dec 2012 12:13:26 +0000 (13:13 +0100)]
isl_map.c: basic_set_maximal_difference_at: fix error handling

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_convex_hull.c: map_simple_hull: avoid invalid access on error
Sven Verdoolaege [Sun, 2 Dec 2012 12:11:01 +0000 (13:11 +0100)]
isl_convex_hull.c: map_simple_hull: avoid invalid access on error

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_ast_codegen.c: compute_domains: avoid invalid access on error
Sven Verdoolaege [Sun, 2 Dec 2012 12:10:31 +0000 (13:10 +0100)]
isl_ast_codegen.c: compute_domains: avoid invalid access on error

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_basic_map_is_empty: avoid invalid access on error
Sven Verdoolaege [Sun, 2 Dec 2012 11:31:20 +0000 (12:31 +0100)]
isl_basic_map_is_empty: avoid invalid access on error

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_space_extend: avoid invalid access on error
Sven Verdoolaege [Sun, 2 Dec 2012 11:23:02 +0000 (12:23 +0100)]
isl_space_extend: avoid invalid access on error

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_map_subtract.c: basic_map_collect_diff: avoid invalid access on error
Sven Verdoolaege [Sun, 2 Dec 2012 11:22:48 +0000 (12:22 +0100)]
isl_map_subtract.c: basic_map_collect_diff: avoid invalid access on error

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_basic_map_overlying_set: avoid invalid access on error
Sven Verdoolaege [Sun, 2 Dec 2012 11:21:46 +0000 (12:21 +0100)]
isl_basic_map_overlying_set: avoid invalid access on error

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_map.c: basic_map_space_reset: handle NULL input
Sven Verdoolaege [Sun, 2 Dec 2012 11:20:44 +0000 (12:20 +0100)]
isl_map.c: basic_map_space_reset: handle NULL input

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_basic_set_swap_vars: handle NULL input
Sven Verdoolaege [Sun, 2 Dec 2012 11:19:40 +0000 (12:19 +0100)]
isl_basic_set_swap_vars: handle NULL input

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_input.c: construct_constraints: respect memory management annotations
Sven Verdoolaege [Sun, 2 Dec 2012 11:18:26 +0000 (12:18 +0100)]
isl_input.c: construct_constraints: respect memory management annotations

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_ast_codegen.c: create_node: avoid invalid access on error
Sven Verdoolaege [Sun, 2 Dec 2012 11:15:00 +0000 (12:15 +0100)]
isl_ast_codegen.c: create_node: avoid invalid access on error

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_ast_codegen.c: for_inc: handle NULL input
Sven Verdoolaege [Sun, 2 Dec 2012 11:13:57 +0000 (12:13 +0100)]
isl_ast_codegen.c: for_inc: handle NULL input

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_pw_aff_set_rational: avoid invalid access on error
Sven Verdoolaege [Sun, 2 Dec 2012 11:12:14 +0000 (12:12 +0100)]
isl_pw_aff_set_rational: avoid invalid access on error

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_vec_dup: avoid invalid accesses on error
Sven Verdoolaege [Sun, 2 Dec 2012 10:00:22 +0000 (11:00 +0100)]
isl_vec_dup: avoid invalid accesses on error

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_map.c: map_intersect_internal: properly plug memory leak on error path
Sven Verdoolaege [Sun, 2 Dec 2012 09:57:46 +0000 (10:57 +0100)]
isl_map.c: map_intersect_internal: properly plug memory leak on error path

The proposed fix in f85421c (isl_map.c: map_intersect_internal: plug memory
leak on error path, Fri Nov 30 18:10:08 2012 +0100) would only free "result",
but not "part".  Revert that commit and make sure both are freed.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoupdate for change in the constructor of the clang Driver
Sven Verdoolaege [Sat, 1 Dec 2012 14:17:15 +0000 (15:17 +0100)]
update for change in the constructor of the clang Driver

In particular, the Driver constructor no longer takes an IsProduction argument.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_vertices.c: vertices_from_list: plug memory leak on error path
Sven Verdoolaege [Sat, 1 Dec 2012 09:40:49 +0000 (10:40 +0100)]
isl_vertices.c: vertices_from_list: plug memory leak on error path

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_basic_set_compute_vertices: plug memory leak on error path
Sven Verdoolaege [Sat, 1 Dec 2012 09:39:37 +0000 (10:39 +0100)]
isl_basic_set_compute_vertices: plug memory leak on error path

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_test.c: fix typo
Sven Verdoolaege [Sat, 1 Dec 2012 09:38:51 +0000 (10:38 +0100)]
isl_test.c: fix typo

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_test.c: test_output: avoid invalid access on error
Sven Verdoolaege [Thu, 29 Nov 2012 21:53:30 +0000 (22:53 +0100)]
isl_test.c: test_output: avoid invalid access on error

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_test.c: before_for: return early on error
Sven Verdoolaege [Sat, 1 Dec 2012 09:34:41 +0000 (10:34 +0100)]
isl_test.c: before_for: return early on error

In particular, don't print any spurious error messages.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_test.c: test_sample: return early on error
Sven Verdoolaege [Sat, 1 Dec 2012 09:34:41 +0000 (10:34 +0100)]
isl_test.c: test_sample: return early on error

In particular, don't print any spurious error messages.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_tab_pip.c: find_in_pos: plug memory leak on error path
Sven Verdoolaege [Fri, 30 Nov 2012 23:30:18 +0000 (00:30 +0100)]
isl_tab_pip.c: find_in_pos: plug memory leak on error path

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_tab_pip.c: add_parametric_cut: plug memory leak on error path
Sven Verdoolaege [Fri, 30 Nov 2012 23:29:56 +0000 (00:29 +0100)]
isl_tab_pip.c: add_parametric_cut: plug memory leak on error path

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_tab_pip.c: sol_push_sol: plug memory leak on error path
Sven Verdoolaege [Fri, 30 Nov 2012 23:28:49 +0000 (00:28 +0100)]
isl_tab_pip.c: sol_push_sol: plug memory leak on error path

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_space_dup: avoid invalid accesses on error
Sven Verdoolaege [Fri, 30 Nov 2012 23:25:49 +0000 (00:25 +0100)]
isl_space_dup: avoid invalid accesses on error

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_schedule.c: add_*_constraints: avoid invalid accesses on error
Sven Verdoolaege [Fri, 30 Nov 2012 23:24:02 +0000 (00:24 +0100)]
isl_schedule.c: add_*_constraints: avoid invalid accesses on error

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_reordering_extend_space: fix error handling
Sven Verdoolaege [Fri, 30 Nov 2012 23:22:27 +0000 (00:22 +0100)]
isl_reordering_extend_space: fix error handling

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_multi_*_realign_domain: plug memory leak on error path
Sven Verdoolaege [Fri, 30 Nov 2012 23:21:40 +0000 (00:21 +0100)]
isl_multi_*_realign_domain: plug memory leak on error path

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_map_subtract.c: map_is_subset: fix error handling
Sven Verdoolaege [Fri, 30 Nov 2012 23:19:27 +0000 (00:19 +0100)]
isl_map_subtract.c: map_is_subset: fix error handling

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_map.c: update_dim_opt: return early on error
Sven Verdoolaege [Fri, 30 Nov 2012 22:23:29 +0000 (23:23 +0100)]
isl_map.c: update_dim_opt: return early on error

In particular, don't print any error messages based on the number
of elements in the list if the list doesn't exist.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_basic_map_underlying_set: plug memory leak on error path
Sven Verdoolaege [Fri, 30 Nov 2012 17:27:22 +0000 (18:27 +0100)]
isl_basic_map_underlying_set: plug memory leak on error path

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_map.c: map_intersect_internal: plug memory leak on error path
Sven Verdoolaege [Fri, 30 Nov 2012 17:10:08 +0000 (18:10 +0100)]
isl_map.c: map_intersect_internal: plug memory leak on error path

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