This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
delete a basic block, and maintain CFG of remaining BBs
- From: "sean yang" <seanatpurdue at hotmail dot com>
- To: gcc at gcc dot gnu dot org
- Date: Sun, 28 May 2006 02:17:23 +0000
- Subject: delete a basic block, and maintain CFG of remaining BBs
- Bcc:
Hi folks,
Can anyone give an advice on how to delete a basic block and maintain the
CFG for the remaining code valid? i.e, I want to delete a basic block (all
the code within that basic block) satisfying a specific criteria, yet
maintaining the validity of CFG. Is there a simple API to do it? It seems
expunge_block() does not do that successfully.
----------------------Here is what I want to do,
basically--------------------------
FOR_EACH_BB(bb){
if (the basic block contains instruction sequence "A,B,C")
{
delete bb;
make predecessors of bb as the predecessors of bb's successor;
}
}
-------------------------------------------------------------------------------------------
Thanks for any advice,
Sean
_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar ? get it now!
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/