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: PR rtl-optimization/28071 (domwalk recursion)


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



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