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] |
Other format: | [Raw text] |
On Tue, Apr 16, 2013 at 6:39 PM, Steven Bosscher wrote: >> My new delay branch scheduler uses TODO_verify_rtl_sharing but it >> turns out that verify_rtl_sharing doesn't handle SEQUENCEs correctly: >> Clearing the used-flags is done correctly, but verifying insns in the >> SEQUENCE fails. The problem is that every insn in the SEQUENCE is >> marked used via PATTERN(SEQUENCE) and also via PREV_INSN/NEXT_INSN of >> the insns in the SEQUENCE. >> >> Fixed with the attached patch. Bootstrapepd&tested on >> sparc64-unknown-linux-gnu, and cross-built&tested on mips-elf, both >> with TODO_verify_rtl_sharing added to the passes in reorg.c. >> Will commit as obvious. > > Andreas Krebbel's patch > (http://gcc.gnu.org/ml/gcc-patches/2013-04/msg00714.html) makes the > problem go away for me, so I'm not going to commit this patch after > all. Hmm, no it hasn't. What happens is this: reset_all_used_flags resets the "used" flags via mark_used_flags, which doesn't mark or unmark insns: case DEBUG_INSN: case INSN: case JUMP_INSN: case CALL_INSN: case NOTE: case LABEL_REF: case BARRIER: /* The chain of insns is not being copied. */ return; But verify_rtx_sharing sets the "used" flag on insns if they are reached via a SEQUENCE. So the first verify_rtl_sharing call with SEQUENCEs in the insn chain passes, but a second call will fail because the "used" flags on insns in the SEQUENCE isn't cleared. So, updated patch attached, will commit after testing on sparc64-linux. Ciao! Steven
Attachment:
fix_verify_rtl_sharing.diff.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |