pet_expr_extract_affine: exploit domain information while extracting divs/mods
commit494d2314b27bab0ecd37eb2bb2a74ec85d3e2dfd
authorSven Verdoolaege <skimo@kotnet.org>
Sat, 4 Jan 2014 19:35:30 +0000 (4 20:35 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Tue, 25 Mar 2014 13:36:29 +0000 (25 14:36 +0100)
tree00ade46f25d03cc104d0c584075d04de4ead7d68
parentc4a438bf47e706302f99ee63973d54ef2f57e2cb
pet_expr_extract_affine: exploit domain information while extracting divs/mods

An integer division in C is represented by a piecewise affine expression
because the result is different for negative and positive values of the lhs.
If we know that this lhs is positive (or negative), then we can avoid
adding extra pieces, so it is worthwhile to try and simplify the extracted
affine expression in the context of the outer iterators domain.

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