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]

[new-ra] DF_REF_REG_CLOBBER related bugfix


Hi Michael !

Current `insert_stores' handle (clobber REG) as def. It's wrong.
The slot for REG must be deleted from `slots' hash list.

It's not committed patch. Bootstrapped c,c++,f77.

Denis.

2003-10-23  Denis Chertykov  <denisc@overta.ru>

	* ra-rewrite.c (insert_stores): Skip clobbered REGs.
        Remove slot for REG from slots hash list.
	(coalesce_spill_slot): Handle webs without conflicts.


Index: ra-rewrite.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ra-rewrite.c,v
retrieving revision 1.1.2.22
diff -c -3 -p -r1.1.2.22 ra-rewrite.c
*** ra-rewrite.c	13 Oct 2003 13:02:27 -0000	1.1.2.22
--- ra-rewrite.c	23 Oct 2003 19:38:54 -0000
*************** delete_overlapping_uses (rtx *px, void *
*** 685,691 ****
    }
  }
  
! /* Returns nonzero, of X is member of LIST.  */
  
  static int
  slot_member_p (struct rtx_list *list, rtx x)
--- 685,691 ----
    }
  }
  
! /* Returns nonzero, if X is member of LIST.  */
  
  static int
  slot_member_p (struct rtx_list *list, rtx x)
*************** insert_stores (bitmap new_deaths)
*** 744,750 ****
  	      rtx slot, source;
  	      struct web *web = def2web[DF_REF_ID (info.defs[n])];
  	      struct web *aweb = alias (find_web_for_subweb (web));
! 	      
  	      if (aweb->type != SPILLED || !aweb->stack_slot)
  		continue;
  	      if (web->pattern || aweb->pattern)
--- 744,756 ----
  	      rtx slot, source;
  	      struct web *web = def2web[DF_REF_ID (info.defs[n])];
  	      struct web *aweb = alias (find_web_for_subweb (web));
! 
! 	      /* Clobber is not a def.  */
! 	      if (DF_REF_TYPE (info.defs[n]) == DF_REF_REG_CLOBBER)
! 		{
! 		  delete_overlapping_slots (&slots, DF_REF_REG (info.defs[n]));
! 		  continue;
! 		}
  	      if (aweb->type != SPILLED || !aweb->stack_slot)
  		continue;
  	      if (web->pattern || aweb->pattern)
*************** coalesce_spill_slot (web, ref, place)
*** 2339,2345 ****
      }
    else
      return 0;
!   
    if (s == web)
      dweb = t;
    else if (t == web)
--- 2345,2355 ----
      }
    else
      return 0;
! 
!   /*  Webs without conflicts must be rejected.  */
!   if (!s->conflict_list || !t->conflict_list)
!     return 0;
! 
    if (s == web)
      dweb = t;
    else if (t == web)


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