isl_aff.c: pw_multi_aff_from_map_div: allow nested integer divisions
commitd18103e58a9a7781067f6141eab3227a2d75cc6c
authorSven Verdoolaege <sven@cerebras.net>
Wed, 22 Jul 2020 14:44:18 +0000 (22 16:44 +0200)
committerSven Verdoolaege <sven.verdoolaege@gmail.com>
Thu, 16 Mar 2023 21:07:28 +0000 (16 22:07 +0100)
tree98aeb04e0ea6ff89862e2e2f87d38e779a31c48a
parentb4a1d980fadb49a2a2988cdc6a8c89ece4764547
isl_aff.c: pw_multi_aff_from_map_div: allow nested integer divisions

That is, allow the constraint from which an integer division
is constructed to itself involve integer divisions.
This prepares for an upcoming commit that will extend the detection
of the constraint in isl_basic_map_find_output_lower_div_constraint
in a similar way.

Note that pw_multi_aff_from_map_div now uses the local space
of the basic map, which may involve local variables
without a known integer division expression, even though
the coefficients of those variables are known to be zero
in the constraint from which the affine expression is constructed.
This still causes problems since such local variables
are not expected to appear in the local space at all.
Remove these local variables before the construction
of the affine expression.

Reviewed-by: Tianjiao Sun <tianjiao.sun@cerebras.net>
Signed-off-by: Sven Verdoolaege <sven@cerebras.net>
isl_aff.c
isl_map.c