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]
Other format: [Raw text]

[tree-ssa] switch_expr lowering, part 2


On Wed, Oct 29, 2003 at 07:15:05PM -0800, Richard Henderson wrote:
> (2) tree-ssa/20030814-2.c fails.  I thought I took care of this with
>     the tree-ssa-dom.c part of the patch; havn't looked at why that 
>     didn't work yet.

The dominator routine was looking for BB_CONTROL_STRUCTURE,
which never gets set anymore.  Ought to clean out that bit...


r~


        * domwalk.c (walk_dominator_tree): Pass any final is_ctrl_stmt
        down the recursive walk.

Index: domwalk.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/domwalk.c,v
retrieving revision 1.1.2.2
diff -c -p -d -r1.1.2.2 domwalk.c
*** domwalk.c	25 Oct 2003 17:48:23 -0000	1.1.2.2
--- domwalk.c	30 Oct 2003 21:46:09 -0000
*************** walk_dominator_tree (struct dom_walk_dat
*** 79,95 ****
    children = dom_children (bb);
    if (children)
      {
!       tree last;
        unsigned long i;
  
!       /* If this block ends with a control structure, then get the
! 	 control structure so we can pass it down.  */
!       if ((bb->flags & BB_CONTROL_STRUCTURE)
! 	  || (bb->succ && (bb->succ->flags & (EDGE_TRUE_VALUE
! 					      | EDGE_FALSE_VALUE))))
! 	last = last_stmt (bb);
!       else
! 	last = NULL;
  
        EXECUTE_IF_SET_IN_BITMAP (children, 0, i,
  	{
--- 79,92 ----
    children = dom_children (bb);
    if (children)
      {
!       tree clast;
        unsigned long i;
  
!       /* If this block ends with a control statement, pass it down
! 	 so that we might reason with it.  */
!       clast = last_stmt (bb);
!       if (clast && !is_ctrl_stmt (clast))
! 	clast = NULL;
  
        EXECUTE_IF_SET_IN_BITMAP (children, 0, i,
  	{
*************** walk_dominator_tree (struct dom_walk_dat
*** 98,104 ****
  	  /* The destination block may have become unreachable, in
  	     which case there's no point in optimizing it.  */
  	  if (dest->pred)
! 	    walk_dominator_tree (walk_data, dest, last);
  	});
      }
  
--- 95,101 ----
  	  /* The destination block may have become unreachable, in
  	     which case there's no point in optimizing it.  */
  	  if (dest->pred)
! 	    walk_dominator_tree (walk_data, dest, clast);
  	});
      }
  


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