This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
compute_flow_dominators
- To: law at cygnus dot com
- Subject: compute_flow_dominators
- From: Michael Hayes <m dot hayes at elec dot canterbury dot ac dot nz>
- Date: Mon, 08 Nov 1999 16:59:55 +1300 (NZDT)
- Cc: gcc-patches at gcc dot gnu dot org
The new version of compute_flow_dominators dies if there is only a
single basic block.
The following patch seems to handle the problematical case.
Michael.
Mon Nov 8 16:56:00 1999 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
* flow.c (compute_flow_dominators): Check for exit edge from entry
block.
Index: flow.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/flow.c,v
retrieving revision 1.183
diff -c -3 -p -r1.183 flow.c
*** flow.c 1999/11/07 00:36:35 1.183
--- flow.c 1999/11/08 03:54:14
*************** compute_flow_dominators (dominators, pos
*** 5346,5353 ****
/* Put the successors of the entry block on the worklist. */
for (e = BASIC_BLOCK (0)->succ; e; e = e->succ_next)
{
! *tos++ = e->dest;
! e->dest->aux = e;
}
/* Iterate until the worklist is empty. */
--- 5355,5365 ----
/* Put the successors of the entry block on the worklist. */
for (e = BASIC_BLOCK (0)->succ; e; e = e->succ_next)
{
! if (e->dest != EXIT_BLOCK_PTR)
! {
! *tos++ = e->dest;
! e->dest->aux = e;
! }
}
/* Iterate until the worklist is empty. */