isl_ast_expr_from_constraint: split off constant term if it avoids operation
authorSven Verdoolaege <skimo@kotnet.org>
Sun, 19 May 2013 15:35:48 +0000 (17:35 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Thu, 23 May 2013 12:25:36 +0000 (14:25 +0200)
commitfdb83b54ec6834a91899cf68effa99a3e80a609f
treebb84b3cec8f48f878d5c6095913684627774d151
parent3a5dc6ec7cdcad307ae599afa1eff97b56f3af8c
isl_ast_expr_from_constraint: split off constant term if it avoids operation

If one hand of the comparison operation that is constructed would be
exactly zero, then we put the constant term on that side.
This avoids the operation that adds the constant term to the other side,
resulting in slightly smaller expressions that are easier to read and
that may also reduce the risk of overflows.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_ast_build_expr.c
test_inputs/codegen/cloog/reservoir-liu-zhuge1.c
test_inputs/codegen/cloog/unroll2.c
test_inputs/codegen/omega/ts1d-mp-i_ts-m_b-0.c
test_inputs/codegen/unroll6.c