gigi.h (is_simple_additive_expression): Declare.
authorEric Botcazou <ebotcazou@adacore.com>
Mon, 30 Nov 2015 11:46:32 +0000 (11:46 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Mon, 30 Nov 2015 11:46:32 +0000 (11:46 +0000)
commit933a73251d95fb930028cb76eee7a892f41f867b
tree04f64660b152400aaf2762b907ade2f74782d611
parentf8125f0c9ce43aac6d7a96753e4617af68ee0009
gigi.h (is_simple_additive_expression): Declare.

* gcc-interface/gigi.h (is_simple_additive_expression): Declare.
* gcc-interface/trans.c (struct range_check_info_d): Add DISP and
NEG_P fields.
(find_loop_for): Add DISP and NEG_P parameters with default value.
Call is_simple_additive_expression to handle additive expressions.
(Loop_Statement_to_gnu): Deal with displacement in range checks.
(Raise_Error_to_gnu): Likewise.
(gnat_to_gnu): Add call to find_loop_for.
(is_simple_additive_expression): New function extracted from...
(gnat_invariant_expr): ...here.  Call it on the expression.

From-SVN: r231064
gcc/ada/ChangeLog
gcc/ada/gcc-interface/gigi.h
gcc/ada/gcc-interface/trans.c
gcc/ada/gcc-interface/utils2.c
gcc/testsuite/gnat.dg/loop_optimization22.adb