Patch for scan_loop [Re: EGCS EXTREME optimization times...]
Jeffrey A Law
law@hurl.cygnus.com
Fri Feb 12 22:20:00 GMT 1999
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
More information about the Gcc-patches
mailing list