Convert -Walloca pass to ranger.
authorAldy Hernandez <aldyh@redhat.com>
Mon, 19 Oct 2020 14:52:51 +0000 (16:52 +0200)
committerAldy Hernandez <aldyh@redhat.com>
Tue, 20 Oct 2020 18:45:14 +0000 (20:45 +0200)
commit495ec0b2aa808a6463b8c24288a1730cbae1cfca
tree6483a62d876e9978edd7ffaff217f83a92b7a167
parent522307281ce9042e0bb3044f4a162adcdee0f9f6
Convert -Walloca pass to ranger.

gcc/ChangeLog:

* gimple-ssa-warn-alloca.c (enum alloca_type): Remove
ALLOCA_BOUND_UNKNOWN and ALLOCA_CAST_FROM_SIGNED.
(warn_limit_specified_p): New.
(alloca_call_type_by_arg): Remove.
(cast_from_signed_p): Remove.
(is_max): Remove.
(alloca_call_type): Remove heuristics and replace with call into
ranger.
(pass_walloca::execute): Instantiate ranger.

gcc/testsuite/ChangeLog:

* gcc.dg/Walloca-1.c: Adjust for ranger.
* gcc.dg/Walloca-12.c: Same.
* gcc.dg/Walloca-13.c: Same.
* gcc.dg/Walloca-2.c: Same.
* gcc.dg/Walloca-3.c: Same.
* gcc.dg/Walloca-6.c: Same.
* gcc.dg/Wvla-larger-than-2.c: Same.
gcc/gimple-ssa-warn-alloca.c
gcc/testsuite/gcc.dg/Walloca-1.c
gcc/testsuite/gcc.dg/Walloca-12.c
gcc/testsuite/gcc.dg/Walloca-13.c
gcc/testsuite/gcc.dg/Walloca-2.c
gcc/testsuite/gcc.dg/Walloca-3.c
gcc/testsuite/gcc.dg/Walloca-6.c
gcc/testsuite/gcc.dg/Wvla-larger-than-2.c