This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Ada] Fix unexpectedly large frame with calls manipulating strings


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]