compute_array_dim_size: detect equalities on index expression
commit024f12291fa114dd56c609c17c83ee61b831dba9
authorSven Verdoolaege <skimo@kotnet.org>
Mon, 9 Jan 2012 17:35:35 +0000 (9 18:35 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Mon, 9 Jan 2012 17:35:35 +0000 (9 18:35 +0100)
treecb9d4393710d541adc919436dc8fb05ee292b800
parentdbc728d13196b061945a27cbf0f848072ab118ba
compute_array_dim_size: detect equalities on index expression

In some cases, the array index may be uniquely determined
by the parameters, while this property may not be apparent
from the constraints.  compute_size_in_direction may then
fail to find the right lower bound and compute an overly
large approximation of the size.
Detecting equalities makes this relation explicit, so
that compute_size_in_direction is able to find the
appropriate lower bound and size (1).

Reported-by: Carlos Juega Reimundez <cjuega@fdi.ucm.es>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
cuda.c