This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch RFC] Fix bogus RTL sharing error
Ian Lance Taylor <iant@google.com> wrote:
>> I've looked at the errors for invalid RTL sharing for Mips and
>> SH with the RTL sharing verifier.
>
> [ details omitted ]
>
> I think you should just handle SEQUENCE specially. SEQUENCE is
> expected to contain INSNs.
Like this? Or should we handle them recursively?
Regards,
kaz
--
* emit-rtl.c (verify_rtl_sharing): Handle SEQUENCE specially
when clearing the used flags.
--- ORIG/trunk/gcc/emit-rtl.c 2006-11-12 20:14:34.000000000 +0900
+++ LOCAL/trunk/gcc/emit-rtl.c 2006-11-29 07:25:30.000000000 +0900
@@ -2292,6 +2292,22 @@ verify_rtl_sharing (void)
reset_used_flags (PATTERN (p));
reset_used_flags (REG_NOTES (p));
reset_used_flags (LOG_LINKS (p));
+ if (GET_CODE (PATTERN (p)) == SEQUENCE)
+ {
+ int i;
+ rtx q, sequence = PATTERN (p);
+
+ for (i = 0; i < XVECLEN (sequence, 0); i++)
+ {
+ q = XVECEXP (sequence, 0, i);
+ if (INSN_P (q))
+ {
+ reset_used_flags (PATTERN (q));
+ reset_used_flags (REG_NOTES (q));
+ reset_used_flags (LOG_LINKS (q));
+ }
+ }
+ }
}
for (p = get_insns (); p; p = NEXT_INSN (p))