This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: miscompiled loop condition
- To: Bernd Schmidt <bernds at pathia dot cygnus dot co dot uk>
- Subject: Re: miscompiled loop condition
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Tue, 30 Nov 1999 20:22:36 -0700
- cc: Stephen L Moshier <moshier at mediaone dot net>, gcc-bugs at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Reply-To: law at cygnus dot com
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