This is the mail archive of the gcc-bugs@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]

Re: Patch for scan_loop [Re: EGCS EXTREME optimization times...]



  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


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