This is the mail archive of the gcc-bugs@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]

Re: RFC delete_insn jump.c deleting BLOCK_HEAD/BLOCK_END


>>>>> "grahams" == grahams  <grahams@rcp.co.uk> writes:

    grahams> My question, should delete_insn () ever delete a
    grahams> BLOCK_HEAD/BLOCK_END and if so what should it do.

RTH is the expert here.  But, I think the easiest thing is to make
delete_insn use NOTE_INSN_DELETEDs in this case, rather than actually
deleting ithe instruction.  I guess this means we have to use
NOTE_INSN_DELETEDs once the flow graph has been first calculated.

Slightly more elegant, but also more complicated, would be to flag
each such instruction as a block-head or block-end instruction; then
delete_insn could go update the flow graph itself.  Even then, there
might be issues if all the instructions in a block went away.

So, I'm thinking that making sure delete_insn uses NOTE_INSN_DELETEDs
after some point is probably the way to go.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]