isl_basic_map_from_constraint: return copy of bmap in constraint if possible
commitb39d157f3a67e4d81b436a092c0cbb1cc4ae5299
authorSven Verdoolaege <skimo@purples.(none)>
Wed, 16 Sep 2009 11:19:12 +0000 (16 13:19 +0200)
committerSven Verdoolaege <skimo@purples.(none)>
Wed, 16 Sep 2009 11:19:12 +0000 (16 13:19 +0200)
tree8526abc2b8522ea9d81af761abc0127f3243ef5e
parent22c7e83cd416fd9860697cf739c9ee4a090d375b
isl_basic_map_from_constraint: return copy of bmap in constraint if possible

Commit fa1cd4b (isl_basic_map_add_constraint: handle constraints obtained from
basic maps) fixed isl_basic_map_add_constraint to also work with constraints
obtained from iterating over the constraints of a basic map by
calling isl_basic_map_from_constraint.
However, this broke the case where a new constraint is created with
existentially quantified variables.  In this case, the divs may be
unknown and we can't compute them because that may result in a union.
So, try to detect this special case in isl_basic_map_from_constraint
and return the basic map stored inside the constraint.
isl_constraint.c