This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: RFC delete_insn jump.c deleting BLOCK_HEAD/BLOCK_END
- To: grahams at rcp dot co dot uk
- Subject: Re: RFC delete_insn jump.c deleting BLOCK_HEAD/BLOCK_END
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Sun, 12 Dec 1999 10:52:11 -0800
- Cc: egcs-bugs at egcs dot cygnus dot com
- Organization: CodeSourcery, LLC
- References: <38529E98.FC096D8@rcp.co.uk>
>>>>> "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