RFC delete_insn jump.c deleting BLOCK_HEAD/BLOCK_END
Mark Mitchell
mark@codesourcery.com
Fri Dec 31 20:54:00 GMT 1999
>>>>> "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
More information about the Gcc-bugs
mailing list