This is the mail archive of the
mailing list for the GCC project.
Re: -Wstack-usage and alloca in loops
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: gcc at gcc dot gnu dot org, Dmitry Antipov <dmantipov at yandex dot ru>
- Date: Mon, 22 Sep 2014 19:38:27 +0200
- Subject: Re: -Wstack-usage and alloca in loops
- Authentication-results: sourceware.org; auth=none
- References: <542046AC dot 60902 at yandex dot ru> <54205796 dot 7010500 at redhat dot com>
> The implementation of -Wstack-usage is a bit lame in that it does not do
> any flow analysis or tie into the range information computed by VRP.
Right, that was by design in order to be conservatively correct. May I remind
you of where we came from with -Wframe-larger-than? :-)
> Moving the stack usage computation into its own analysis phase which has
> access to VRP bounds and such would be a a significant improvement and
> one which I think would be quite useful.
Yes, provided the outcome is still guaranteed to be conservatively correct.