This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Patch for scan_loop [Re: EGCS EXTREME optimization times...]
- To: Michael Hayes <m dot hayes at elec dot canterbury dot ac dot nz>
- Subject: Re: Patch for scan_loop [Re: EGCS EXTREME optimization times...]
- From: Jeffrey A Law <law at hurl dot cygnus dot com>
- Date: Fri, 12 Feb 1999 23:19:45 -0700
- cc: egcs-patches at cygnus dot com, David G Hough at validgh <validgh at validgh dot com>, egcs-bugs at cygnus dot com, lm at bitmover dot com
- Reply-To: law at cygnus dot com
In message <14020.52936.784843.61964@ongaonga.elec.canterbury.ac.nz>you write
> Michael Hayes writes:
> > The culprit is the loop optimizer (but not strength reduction this
> > time). During scan_loop, loop_reg_used_before_p is called for most of
> > the loop insns and since loop_reg_used_before_p checks every loop insn
> > we have quadratic behavior.
>
> Here's a patch that just swaps the calls to loop_reg_used_before_p
> and reg_in_basic_block_p. There's no point embarking on a long search
> if the subsequent test will fail. With -O2 the compilation time drops
> from 333 seconds to 2 seconds with David's testcase.
>
> Michael.
>
> * loop.c (scan_loop): Call reg_in_basic_block_p before
> loop_reg_used_before_p.
This is fine. I'm going to install it on the egcs-1.1 branch, can you please
install it into the mainline sources?
Thanks!
jeff