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>
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>
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>
Merge branch 'maint'
isl_input.c: read_conjuncts: stop parsing conjuncts after first error

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
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>
add isl_union_pw_multi_aff_from_union_set

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

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

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

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
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>
isl_schedule.c: fix typo in comment

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
Merge branch 'maint'
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>
document that isl_local_space_get_div cannot be used on map spaces

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_aff_scale: special case scaling by a factor of the denominator

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
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>
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>
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>
isl_arg.c: extract out free_user

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