This is the mail archive of the gcc-patches@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: miscompiled loop condition



  In message <Pine.LNX.4.04.9911301140440.12104-100000@pathia.cygnus.co.uk>you 
write:
  > They won't get replaced, and the initializing insn should not be deleted.
  > The two new variables keep track of whether the initializing insn had the
  > first occurrence of the replaced reg, and whether the last use we replaced
  > was the last occurrence of the reg.  Only if both conditions are true will
  > the initializing insn be deleted.
OK.  I missed the bit about only deleting the initializing insn if both
conditions where true.  Thanks.


  > [It turns out there's another bug; we can't use REGNO_FIRST/LAST_UID on all
  > registers; if the replaced reg was made by the loop optimizer itself we'll
  > get crashes.  This occurs both with and without the patch we are currently
  > discussing.  I think I'm going to fix this kind of thing once and for all
  > by biting the bullet and doing reg_scan updates in between loop passes.]
Sigh.  What we might want to do instead is run a rescan update on each loop
after we're finished optimizing it.  I believe we've got most of the bits
we need to do that now.

jeff


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