This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Ada] Fix unexpectedly large frame with calls manipulating strings
- From: Tom de Vries <Tom_deVries at mentor dot com>
- To: Eric Botcazou <ebotcazou at adacore dot com>, <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 1 Mar 2016 16:57:23 +0100
- Subject: Re: [Ada] Fix unexpectedly large frame with calls manipulating strings
- Authentication-results: sourceware.org; auth=none
- References: <10048785 dot 2YUzE6MUlj at polaris>
On 29-02-16 10:17, Eric Botcazou wrote:
Another long-standing regression present in the compiler (dating back to the
Tree-SSA merge): the compiler generates code that has an unexpectedly large
stack usage for nested calls on strings, because the gimplifier creates
temporaries in the outermost scope that have overlapping live ranges.
Tested on x86_64-suse-linux, applied on the mainline.
2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (finalize_nrv_r): Remove obsolete code.
(build_return_expr): Likewise.
(Call_to_gnu): If this is a function call and there is no target,
create a temporary for the return value for all aggregate types,
but never create it for a return statement. Push a binding level
around the call in more cases. Remove obsolete code.
2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/stack_usage3.adb: New test.
* gnat.dg/stack_usage3_pkg.ads: New helper.
Hi,
This new test fails for me with -m32.
Thanks,
- Tom