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

compute_flow_dominators



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.  */


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