isl_aff.c: extract_isl_multi_aff_from_basic_map: do not perform projection
commitc3dfcdb3d5571d0cc3385fa8256dd00da9d76e4c
authorSven Verdoolaege <skimo@kotnet.org>
Thu, 3 Dec 2015 09:47:24 +0000 (3 10:47 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Tue, 22 Dec 2015 15:40:26 +0000 (22 16:40 +0100)
treec21a1a7f0fe0fbd16422efecfbe649fdc0f1017a
parent69a99379aadca32867e4df65040624d005ba3a80
isl_aff.c: extract_isl_multi_aff_from_basic_map: do not perform projection

extract_isl_multi_aff_from_basic_map gets called from
plain_pw_multi_aff_from_map, which in turn is only called
when the input is considered to be obviously single valued
by isl_basic_map_plain_is_single_valued.
The implementation of extract_isl_multi_aff_from_basic_map relies
on rediscovering the same equality constraints that led
isl_basic_map_plain_is_single_valued to believe that the input
is single-valued.

Internally, extract_isl_multi_aff_from_basic_map performs a projection,
which may change the appearance of the equality constraints, meaning that
extract_isl_multi_aff_from_basic_map does not look at the same
constraints as isl_basic_map_plain_is_single_valued did such
that it may not be able to find the same constraints again.
This should not be an issue at present because only equality constraints
are involved.  However, isl_basic_map_plain_is_single_valued
will be extended in an upcoming commit to also take into account
some pairs of inequalities and these are more easily affected
by a projection.

Do not perform any projection, such that isl_basic_map_plain_is_single_valued
and extract_isl_multi_aff_from_basic_map look at the same constraints.
The projection was however useful for projecting out references
to earlier output dimensions in the equality constraints.
Now that no such projection is performed, the extraction needs
to explicitly take these earlier output dimensions into account.

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