This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch: clear NEXT_INSN, PREV_INSN and JUMP_LABEL on deleted insns
- From: "Richard Guenther" <richard dot guenther at gmail dot com>
- To: "Laurynas Biveinis" <laurynas dot biveinis at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sat, 8 Sep 2007 19:13:29 +0200
- Subject: Re: Patch: clear NEXT_INSN, PREV_INSN and JUMP_LABEL on deleted insns
- References: <d1e3ff2b0709051147x739b7c86n665ba49cdb58d3ab@mail.gmail.com>
On 9/5/07, Laurynas Biveinis <laurynas.biveinis@gmail.com> wrote:
> Hello,
>
> This cleanup patch changes remove_insn to clear NEXT_INSN, PREV_INSN,
> and if applicable, JUMP_LABEL fields on the deleted insn. This exposed
> several places where these insn fields were in fact accessed after the
> insn was deleted and this patch fixes them all, in a sense completing
> transition to FOR_BB_INSNS_SAFE.
>
> The motivation for this change is general cleanliness and also the
> fact, that some GC implementations (e.g. Boehm's GC) put inaccessible
> objects on the free lists without cleaning them and later tries to
> mark them. Also, it is a little step towards being able to do GC
> collection at arbitrary points.
>
> It is quite possible that my testing did not detect all the places
> where the fields are accessed after deletion and thus breaks
> something. Luckily, any such places should be easy to fix.
>
> The patch seems larger than it is because of necessary indentation
> changes. Bootstrapped/regtested on i686-pc-linux-gnu. OK for mainline?
FYI this patch has caused at least PR33351 on i686 and from hearsay
similar problems on other architectures. Looks like you missed to
update some places?
Richard.