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 <99021414363500.00519@ns1102.munich.netsurf.de>you write:
  > here's the debug output of cc1 before the loop.c patch:
[ ... ]
Thanks.   I made a minor goof when converting this code to work on the egcs-1.1
branch (this part of scan loop has been hacked up a lot since egcs-1.1
branched).  I put a paren in the wrong place, which caused the if statement
to behave differently before & after the patch.

A hint -- since we had a change which should not have changed the behavior
of the compiler you can debug the problem by tracking exactly where the
compiler's behavior changed.  ie

          /* In order to move a register, we need to have either:
             (1) it is used only in the same basic block as the set
             (2) the set is guaranteed to be executed once the loop starts,
                 and the reg is not used until after that.  */
          else if (! (reg_in_basic_block_p (p, SET_DEST (set))
                      || (! maybe_never
                          && ! loop_reg_used_before_p (set, p, loop_start,
                                                       scan_start, end))))
	    ;


Get two compilers, one with, one without the patch run them side by side in
two windows.  Put a breakpoint on the bare ";"  If the patch really doesn't
change the behavior of the compiler, then each compiler should have the exact
same state each time you hit that breakpoint.  

If they don't behave in a 100% identical manner, then the patch changed the
behavior of the compiler.    Which in this case means I botched the patch.


Thanks for finding this.  I'll check in a fix in a minute.

jeff







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