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]

ssa-dce.c bugfix



SSA DCE connects infinite loops to the exit node via fake edges in the
CFG.  This patch removes those fake edges after SSA DCE has completed
its optimizations.

This change has been bootstrapped on a private source tree for IA64 with
SSA DCE enabled by default.  Bootstrapping it on the net sources isn't
all that useful right now given the current state of SSA.

	* ssa-dce.c (eliminate_dead_code): Remove fake edges from the
	CFG after dead code elimination is complete.

Index: ssa-dce.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/ssa-dce.c,v
retrieving revision 1.1
diff -c -3 -p -r1.1 ssa-dce.c
*** ssa-dce.c	2001/06/19 13:53:25	1.1
--- ssa-dce.c	2001/06/28 17:12:38
*************** Software Foundation, 59 Temple Place - S
*** 39,45 ****
     out-of-date.  
  
     Edges from some infinite loops to the exit block can be added to
!    the control-flow graph.
  
     It Does Not Perform:
     We decided to not simultaneously perform jump optimization and dead
--- 39,46 ----
     out-of-date.  
  
     Edges from some infinite loops to the exit block can be added to
!    the control-flow graph but will be removed after this pass is
!    complete.
  
     It Does Not Perform:
     We decided to not simultaneously perform jump optimization and dead
*************** eliminate_dead_code ()
*** 606,611 ****
--- 607,615 ----
        delete_insn_bb (insn);
    });
    
+   /* Remove fake edges from the CFG.  */
+   remove_fake_edges ();
+ 
    /* Release allocated memory.  */
    for (insn = get_insns (); insn != NULL_RTX; insn = NEXT_INSN (insn))
      RESURRECT_INSN (insn);



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