This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFA] Limit stack usage growth caused by inliner
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Jan Hubicka <jh at suse dot cz>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 30 Nov 2006 10:03:34 -0500
- Subject: Re: [RFA] Limit stack usage growth caused by inliner
- References: <20061105212725.GH15935@kam.mff.cuni.cz>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Sun, Nov 05, 2006 at 10:27:25PM +0100, Jan Hubicka wrote:
> * invoke.texi (large-stack-frame, large-stack-frame-growth): New params.
> * cgraph.c (dump_cgraph_node): Dump stack usage.
> * cgraph.h (cgraph_local_info): Add estimated_self_stack_size.
> (cgraph_global_info): Add estimated_stack_size and stack_frame_offset.
> * cgraphunit.c (cgraph_analyze_function): Analyze stack sizes.
> * ipa-inline.c (cgraph_clone_inlined_nodes): Propagate stack usage.
> (cgraph_check_inline_limits): Limit stack growth.
> * cfgexpand.c: Include tree-inline.h.
> (account_stack_vars): New function.
> (expand_one_var): New param to just account the stack; return estimated
> size.
> (expand_used_vars_for_block): Update call of expand_one_var.
> (account_used_vars_for_block): New function.
> (estimated_stack_frame_size): Likewise.
> (init_vars_expansion, fini_vars_expansion): Break out from..
> (expand_used_vars): ... here.
> * tree-inline.h (estimated_stack_frame_size): Declare.
> * params.def (PARAM_LARGE_STACK_FRAME, PARAM_STACK_FRAME_GROWTH): New.
FYI, this patch causes a bunch of regressions on the trunk, x86_64-linux:
FAIL: libgomp.c++/nested-1.C -O0 execution test
FAIL: libgomp.c++/nested-1.C -O1 execution test
FAIL: libgomp.c++/pr27337.C -O1 execution test
FAIL: libgomp.fortran/character1.f90 -O0 execution test
FAIL: libgomp.fortran/omp_parse4.f90 -O1 execution test
FAIL: libgomp.fortran/reference1.f90 -O0 execution test
FAIL: libgomp.fortran/reference2.f90 -O0 execution test
Reverting the {cgraph{,unit},ipa-inline,cfgexpand}.c changes cures all of
these.
Jakub