This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: patch for flow.c: flow_delete_insn
Denis
Richard Henderson wrote:
>
> On Tue, May 09, 2000 at 08:35:30PM +0400, Denis Chertykov wrote:
> > * flow.c (flow_delete_insn): Use INSN_DELETED_P for marking insn
> > as deleted.
>
> Ok.
>
> r~
Have you bootstrapped with this changed?
The reason I ask is that with this patch applied
a bootstrap on i686-linux fails due to ICE.
The ICE occurs in add_insn_after () because it is
asked to add a insn after a insn which has been
marked as deleted.
The problem is flow uses flow_delete_insn ()
to remove a NOTE insn and then later add it
back.
Here's the relevant code from flow which is using
flow_delete_insn.
/* Look for basic block notes with which to keep the
basic_block_info pointers stable. Unthread the note now;
we'll put it back at the right place in create_basic_block.
Or not at all if we've already found a note in this block. */
else if (kind == NOTE_INSN_BASIC_BLOCK)
{
if (bb_note == NULL_RTX)
bb_note = insn;
next = flow_delete_insn (insn);
}
I have a work around which is to reset the DELETED
flag after calling flow_delte_insn () as follows.
/* Look for basic block notes with which to keep the
basic_block_info pointers stable. Unthread the note now;
we'll put it back at the right place in create_basic_block.
Or not at all if we've already found a note in this block. */
else if (kind == NOTE_INSN_BASIC_BLOCK)
{
next = flow_delete_insn (insn);
if (bb_note == NULL_RTX)
{
bb_note = insn;
INSN_DELETED_P (bb_note) = 0;
}
}
I don't like this it's functional but it's a hack.
Richard do you have a better solution ?
Graham