platform/upstream/isl.git
11 years agoadd isl_multi_aff_sub
Sven Verdoolaege [Thu, 14 Mar 2013 08:11:28 +0000 (09:11 +0100)]
add isl_multi_aff_sub

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agogeneralize isl_multi_aff_add
Sven Verdoolaege [Wed, 13 Mar 2013 12:08:20 +0000 (13:08 +0100)]
generalize isl_multi_aff_add

In the short term, this generalization will be useful to implement
an isl_multi_aff_sub.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_ast_build_ast_from_schedule: make construction of ors in ifs optional
Sven Verdoolaege [Thu, 28 Feb 2013 15:54:00 +0000 (16:54 +0100)]
isl_ast_build_ast_from_schedule: make construction of ors in ifs optional

If disjunctions in if conditions are not allowed by the user, then
the node is duplicated and each each disjunct is inserted separately.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoMerge branch 'maint'
Sven Verdoolaege [Fri, 8 Mar 2013 10:14:01 +0000 (11:14 +0100)]
Merge branch 'maint'

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_arg.c: extract out free_child
Sven Verdoolaege [Wed, 20 Feb 2013 11:53:23 +0000 (12:53 +0100)]
isl_arg.c: extract out free_child

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_arg.c: extract out free_user
Sven Verdoolaege [Wed, 20 Feb 2013 11:42:35 +0000 (12:42 +0100)]
isl_arg.c: extract out free_user

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoargument parsing: set structure field even if setter is available
Sven Verdoolaege [Wed, 20 Feb 2013 11:34:49 +0000 (12:34 +0100)]
argument parsing: set structure field even if setter is available

If a setter is available for an option, we would only call the setter
and not make any changes to the structure field itself.  It turns out
that the first thing each of the setters does is to set the structure
field to the given value, so we might as well do that directly.
We set the value before calling the setter such that the setter can
still override the value.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoargument parsing: handle --help option in order
Sven Verdoolaege [Wed, 20 Feb 2013 15:44:13 +0000 (16:44 +0100)]
argument parsing: handle --help option in order

In the original code, we would first scan for any --help option
before processing any other options.  Now we first consider the options
before --help.  If any of these options change the defaults for any other
options, then those changed defaults will be reflected in the --help output.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_map_simplify.c: check_for_div_constraints: also check for "better" ones
Sven Verdoolaege [Tue, 19 Feb 2013 14:44:19 +0000 (15:44 +0100)]
isl_map_simplify.c: check_for_div_constraints: also check for "better" ones

In check_for_div_constraints we check if two "opposite" constraints
can be used to define a div.  However, a given div may be definable
by multiple pairs of constraints and then we would just pick the pair
we come across.

We now also consider possible defining constraints for divs for which
we already have a definition, which makes the result less dependent
on the order of the constraints.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_aff_scale: special case scaling by a factor of the denominator
Sven Verdoolaege [Mon, 18 Feb 2013 10:37:43 +0000 (11:37 +0100)]
isl_aff_scale: special case scaling by a factor of the denominator

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agodocument that isl_local_space_get_div cannot be used on map spaces
Sven Verdoolaege [Fri, 15 Feb 2013 15:05:25 +0000 (16:05 +0100)]
document that isl_local_space_get_div cannot be used on map spaces

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agocodegen_test.sh: keep track of failure rather than exiting on first failure
Sven Verdoolaege [Fri, 15 Feb 2013 15:55:54 +0000 (16:55 +0100)]
codegen_test.sh: keep track of failure rather than exiting on first failure

If some change to isl changes the code generation output, we usually
want to see all such changes together.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoMerge branch 'maint'
Sven Verdoolaege [Tue, 19 Feb 2013 17:25:31 +0000 (18:25 +0100)]
Merge branch 'maint'

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_schedule.c: fix typo in comment
Sven Verdoolaege [Fri, 28 Dec 2012 11:02:02 +0000 (12:02 +0100)]
isl_schedule.c: fix typo in comment

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_ast_graft.c: extract_hoistable_guard: drop divs involving current depth
Sven Verdoolaege [Mon, 11 Feb 2013 17:10:27 +0000 (18:10 +0100)]
isl_ast_graft.c: extract_hoistable_guard: drop divs involving current depth

If the current guard involves any integer divisions that refer
to the dimension corresponding to the current depth, then the expressions
for these integer divisions will be invalidated after projecting out
this dimension.  This means that new expressions will have to be computed
and this may in some cases lead to complicated results with many subcases.
Such complicated guards will not be useful for the purpose of simplifying
the AST and so there is little point in hoisting such guards.

We therefore first drop any integer divisions that refer
to the dimension corresponding to the current depth.
This should typically lead to simpler hoisted guards.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agodeclare isl_union_pw_multi_aff_to_str
Sven Verdoolaege [Sun, 27 Jan 2013 13:18:02 +0000 (14:18 +0100)]
declare isl_union_pw_multi_aff_to_str

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agodeclare isl_union_pw_multi_aff_dump
Sven Verdoolaege [Sun, 27 Jan 2013 13:12:30 +0000 (14:12 +0100)]
declare isl_union_pw_multi_aff_dump

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_union_pw_multi_aff_read_from_str
Sven Verdoolaege [Sat, 26 Jan 2013 17:40:59 +0000 (18:40 +0100)]
add isl_union_pw_multi_aff_read_from_str

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoadd isl_union_pw_multi_aff_from_union_set
Sven Verdoolaege [Sat, 26 Jan 2013 17:40:18 +0000 (18:40 +0100)]
add isl_union_pw_multi_aff_from_union_set

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_union_map_alloc: project space argument onto its parameters
Sven Verdoolaege [Sun, 3 Feb 2013 15:18:55 +0000 (16:18 +0100)]
isl_union_map_alloc: project space argument onto its parameters

We are only interested in the parameters anyway, so we might as well
project out all the other dimensions.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_input.c: read_conjuncts: stop parsing conjuncts after first error
Sven Verdoolaege [Sun, 3 Feb 2013 12:55:28 +0000 (13:55 +0100)]
isl_input.c: read_conjuncts: stop parsing conjuncts after first error

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 agoMerge branch 'maint'
Sven Verdoolaege [Thu, 27 Dec 2012 10:20:13 +0000 (11:20 +0100)]
Merge branch 'maint'

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_basic_map_from_constraint_matrices: (simplify and) finalize result
Sven Verdoolaege [Mon, 22 Oct 2012 21:46:31 +0000 (23:46 +0200)]
isl_basic_map_from_constraint_matrices: (simplify and) finalize result

isl_basic_map_from_constraint_matrices belongs to the public API so it
should return a finalized basic relation.  The user probably expects
the result to be simplified as well.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_stream_read_map: allow anonymous unconstrained dimensions
Sven Verdoolaege [Sat, 15 Dec 2012 13:44:55 +0000 (14:44 +0100)]
isl_stream_read_map: allow anonymous unconstrained dimensions

In particular, allow a '*' in tuples to represent such anonymous
unconstrained dimensions.  The same syntax is used by Omega.

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_map_inline_foreach_basic_map: drop basic maps that have become empty
Sven Verdoolaege [Fri, 7 Dec 2012 12:20:15 +0000 (13:20 +0100)]
isl_map_inline_foreach_basic_map: drop basic maps that have become empty

In particular, drop basic maps that have become empty in
isl_map_detect_equalities (which calls isl_map_inline_foreach_basic_map).

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>
11 years agoisl_ast_build_init_derived: check build->domain
Sven Verdoolaege [Fri, 30 Nov 2012 17:01:42 +0000 (18:01 +0100)]
isl_ast_build_init_derived: check build->domain

If something has gone wrong during the construction of the isl_ast_build,
its domain field may be NULL.  Since isl_ast_build_get_ctx obtains
the isl_ctx from this field, we should not continue if build->domain is NULL.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_input.c: read_aff_domain: remove spurious vars_free on error path
Sven Verdoolaege [Fri, 30 Nov 2012 16:59:58 +0000 (17:59 +0100)]
isl_input.c: read_aff_domain: remove spurious vars_free on error path

The vars structure passed to read_aff_domain is owned by the caller.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_input.c: read_map_tuple: return early on error
Sven Verdoolaege [Fri, 30 Nov 2012 16:57:23 +0000 (17:57 +0100)]
isl_input.c: read_map_tuple: return early on error

This avoids spurious error messages.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_input.c: accept_affine_list: plug memory leak on error path
Sven Verdoolaege [Fri, 30 Nov 2012 16:55:30 +0000 (17:55 +0100)]
isl_input.c: accept_affine_list: plug memory leak on error path

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_affine_hull.c: equalities_in_underlying_set: plug memory leak on error path
Sven Verdoolaege [Fri, 30 Nov 2012 16:50:37 +0000 (17:50 +0100)]
isl_affine_hull.c: equalities_in_underlying_set: plug memory leak on error path

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
11 years agoisl_tab_detect_equalities: plug memory leak on error path
Sven Verdoolaege [Fri, 30 Nov 2012 16:46:13 +0000 (17:46 +0100)]
isl_tab_detect_equalities: plug memory leak on error path

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