Abort in redirect_edge_and_branch on vax at line 866

Jan Hubicka jh@suse.cz
Thu Jan 10 09:14:00 GMT 2002


>   > Really?  I'd have thought that only merging basic blocks would
>   > cause problems.  We're not doing that.
> Nope.  My recollection was that removing the jump itself along with
> removing any code which becomes unreachable as a side effect of removing
> the jump as causing implementation problems.
> 
> I see that delete_insn no longer has the side effect of deleting code
> which becomes unreachable due to deleting the original insn.  That makes
> me feel a lot better!  Boy I need to keep up with development better.
> 
> Probably the only problem that I can envision arising now would be 
> looking at BLOCK_{HEAD,END} and getting back an insn that has been deleted
The remove_insn called from delete_insn does the trick for you as well,
so it should be OK.
> and removed from the chain of insns.    That would make a loop like this
> do the wrong thing:
> 
>       for (insn = BLOCK_HEAD (bb);
>            insn != NULL && insn != NEXT_INSN (BLOCK_END (bb));
>            insn = NEXT_INSN (insn))
The deleteed insn remains in memory and NEXT_INSN still points to the
NEXT_INSN (BLOCK_END) - the original predecesor of deleted insn, so
the loop terminates.
We use similar construction in other parts too - even when it does look
tricky, it is most convenient I was able to come with.

Honza



More information about the Gcc-patches mailing list