gpu.c: interchange_for_unroll: perform test on isl_pw_multi_aff
commit08601a4607d2760d07ddef227a01b54196fb701f
authorSven Verdoolaege <skimo@kotnet.org>
Wed, 17 Oct 2012 08:34:50 +0000 (17 10:34 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Fri, 23 Nov 2012 10:14:02 +0000 (23 11:14 +0100)
tree71ec9c4fa2bf7d80fc4058884627dbc6f7f75d5b
parentbc675b0c330367ec46ed6549aa6fa43df3dffdd8
gpu.c: interchange_for_unroll: perform test on isl_pw_multi_aff

interchange_for_unroll, and in particular check_unroll, which is called
from interchange_for_unroll, assumes that the index expression can be
recovered from an equality on the ouput dimension in the map
describing the index expression.  However, this does not work if any
integer divisions are involved.

Explicitly convert the map to an isl_pw_multi_aff and check the affine
functions in the result instead.

Note that we could not do this originally because there were no
isl_pw_multi_aff objects at the time.

Reported-by: Tobias Grosser <tobias@grosser.es>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
gpu.c