This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch for scan_loop [Re: EGCS EXTREME optimization times...]
- To: law at cygnus dot com, 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: Franz Sirl <Franz dot Sirl-kernel at lauterbach dot com>
- Date: Sat, 13 Feb 1999 21:51:44 +0100
- Cc: egcs-patches at cygnus dot com, egcs-bugs at cygnus dot com
- References: <10837.918886785@hurl.cygnus.com>
Am Sat, 13 Feb 1999 schrieb Jeffrey A Law:
>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?
Hmm, on the egcs_1_1_branch this patch solves this testcase on ppc-linux-gnu:
FAIL: gcc.c-torture/compile/980329-1.c, -O2 -fomit-frame-pointer
-finline-functions -funroll-all-loops
I'm a little bit worried about that, cause this thread implied that this patch
should only improve compilation speed and not change the behaviour of the
compiler.
Thoughts?
Franz.