This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR rtl-optimization/28071 (domwalk recursion)
- From: Jeffrey Law <law at redhat dot com>
- To: Jan Hubicka <jh at suse dot cz>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 02 Aug 2006 00:49:15 -0600
- Subject: Re: PR rtl-optimization/28071 (domwalk recursion)
- References: <20060727072258.GR20536@kam.mff.cuni.cz>
- Reply-to: law at redhat dot com
On Thu, 2006-07-27 at 09:22 +0200, Jan Hubicka wrote:
> Hi,
> at -O3 the testcase builds huge CFG with depth of dominator tree about
> 15000 blocks. This makes GCC to run out of stack space when not built
> with optimization and without checking even on Linux.
> In RTL world we avoid recusion whose depth depends on CFG size, it is
> probably good time to start re-inforcing this on trees. This patch
> avoids recusion on domwalk that is source of most of the stack space
> consumption. The patch does not make non-bootstrapped compiler to work
> for me as tree-into-ssa contains one recursive walk of dominator tree
> written by hand, but it still shave of few seconds out of the
> compilation.
>
> For GCC modules test I also get speedup of about 2 seconds out of 4
> minutes.
>
> If accepted, i will send patches for the other few recursive walks as
> followups.
>
> Except for fair amount of re-indenting the patch is rather easy. It is
> simply using already existing stack walk_data->block_data_stack for the
> stack of basic blocks too.
>
> :ADDPATCH middle-end:
>
> Honza
>
> 2006-07-27 Jan Hubicka <jh@suse.cz>
> PR rtl-optimization/28071
> (walk_dominator_tree): Rewrite to be non-recursive.
Just an FYI -- this isn't forgotten. I'll be looking at it Wed
evening.
Jeff