[tree-ssa] Minor cleanups

law@redhat.com law@redhat.com
Fri Feb 21 15:59:00 GMT 2003



	* ssa.c: Revert caching of immediate dominators change made on
	Jan 28, 2003.

	* tree-dfa.c: Fix comment.

Index: ssa.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ssa.c,v
retrieving revision 1.52.2.9
diff -c -3 -p -r1.52.2.9 ssa.c
*** ssa.c	12 Feb 2003 19:52:02 -0000	1.52.2.9
--- ssa.c	21 Feb 2003 15:47:38 -0000
*************** struct rename_context;
*** 170,177 ****
  static inline rtx * phi_alternative
    PARAMS ((rtx, int));
  static void compute_dominance_frontiers_1
!   PARAMS ((bitmap *frontiers, dominance_info idom, int bb,
! 	   sbitmap done, basic_block * cached_idoms));
  static void find_evaluations_1
    PARAMS ((rtx dest, rtx set, void *data));
  static void find_evaluations
--- 170,176 ----
  static inline rtx * phi_alternative
    PARAMS ((rtx, int));
  static void compute_dominance_frontiers_1
!   PARAMS ((bitmap *frontiers, dominance_info idom, int bb, sbitmap done));
  static void find_evaluations_1
    PARAMS ((rtx dest, rtx set, void *data));
  static void find_evaluations
*************** find_evaluations (evals, nregs)
*** 520,531 ****
  */
  
  static void
! compute_dominance_frontiers_1 (frontiers, idom, bb, done, cached_idoms)
       bitmap *frontiers;
       dominance_info idom;
       int bb;
       sbitmap done;
-      basic_block *cached_idoms;
  {
    basic_block b = BASIC_BLOCK (bb);
    edge e;
--- 519,529 ----
  */
  
  static void
! compute_dominance_frontiers_1 (frontiers, idom, bb, done)
       bitmap *frontiers;
       dominance_info idom;
       int bb;
       sbitmap done;
  {
    basic_block b = BASIC_BLOCK (bb);
    edge e;
*************** compute_dominance_frontiers_1 (frontiers
*** 567,574 ****
        {
          c = BASIC_BLOCK (i);
          if (! TEST_BIT (done, c->index))
!           compute_dominance_frontiers_1 (frontiers, idom, c->index,
! 				         done, cached_idoms);
        });
        
    /* Find blocks conforming to rule (1) above.  */
--- 565,571 ----
        {
          c = BASIC_BLOCK (i);
          if (! TEST_BIT (done, c->index))
!           compute_dominance_frontiers_1 (frontiers, idom, c->index, done);
        });
        
    /* Find blocks conforming to rule (1) above.  */
*************** compute_dominance_frontiers_1 (frontiers
*** 576,582 ****
      {
        if (e->dest == EXIT_BLOCK_PTR)
  	continue;
!       if (cached_idoms[e->dest->index]->index != bb)
          bitmap_set_bit (frontiers[bb], e->dest->index);
      }
  
--- 573,579 ----
      {
        if (e->dest == EXIT_BLOCK_PTR)
  	continue;
!       if (get_immediate_dominator (idom, e->dest)->index != bb)
          bitmap_set_bit (frontiers[bb], e->dest->index);
      }
  
*************** compute_dominance_frontiers_1 (frontiers
*** 589,595 ****
  
          EXECUTE_IF_SET_IN_BITMAP (frontiers[c->index], 0, x,
  	  {
! 	    if (cached_idoms[BASIC_BLOCK (x)->index]->index != bb)
  	      bitmap_set_bit (frontiers[bb], x);
  	  });
        });
--- 586,592 ----
  
          EXECUTE_IF_SET_IN_BITMAP (frontiers[c->index], 0, x,
  	  {
! 	    if (get_immediate_dominator (idom, BASIC_BLOCK (x))->index != bb)
  	      bitmap_set_bit (frontiers[bb], x);
  	  });
        });
*************** compute_dominance_frontiers (frontiers, 
*** 605,625 ****
       bitmap *frontiers;
       dominance_info idom;
  {
-   basic_block bb, *cached_idoms;
    sbitmap done = sbitmap_alloc (last_basic_block);
  
    timevar_push (TV_DOM_FRONTIERS);
  
    sbitmap_zero (done);
  
!   cached_idoms = xmalloc (n_basic_blocks * sizeof (bb));
  
-   FOR_EACH_BB (bb)
-     cached_idoms[bb->index] = get_immediate_dominator (idom, bb);
- 
-   compute_dominance_frontiers_1 (frontiers, idom, 0, done, cached_idoms);
- 
-   free (cached_idoms);
    sbitmap_free (done);
  
    timevar_pop (TV_DOM_FRONTIERS);
--- 602,615 ----
       bitmap *frontiers;
       dominance_info idom;
  {
    sbitmap done = sbitmap_alloc (last_basic_block);
  
    timevar_push (TV_DOM_FRONTIERS);
  
    sbitmap_zero (done);
  
!   compute_dominance_frontiers_1 (frontiers, idom, 0, done);
  
    sbitmap_free (done);
  
    timevar_pop (TV_DOM_FRONTIERS);
Index: tree-dfa.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-dfa.c,v
retrieving revision 1.1.4.80
diff -c -3 -p -r1.1.4.80 tree-dfa.c
*** tree-dfa.c	20 Feb 2003 19:09:06 -0000	1.1.4.80
--- tree-dfa.c	21 Feb 2003 15:47:41 -0000
*************** find_vars_r (tp, walk_subtrees, data)
*** 2190,2196 ****
     same tree.
     
     Also add VAR to the ALIASED_OBJECTS set of varrays that are needed for
!    alias analysis.  DATA is an array with three two tables used to avoid
     adding the same variable more than once to its corresponding set as
     well as a bit indicating if we're processing a load or store.  Note
     that this function assumes that VAR is a valid SSA variable.  */
--- 2190,2196 ----
     same tree.
     
     Also add VAR to the ALIASED_OBJECTS set of varrays that are needed for
!    alias analysis.  DATA is an array with two hash tables used to avoid
     adding the same variable more than once to its corresponding set as
     well as a bit indicating if we're processing a load or store.  Note
     that this function assumes that VAR is a valid SSA variable.  */




More information about the Gcc-patches mailing list