minor reload changes

Jeffrey A Law law@cygnus.com
Wed Feb 10 09:27:00 GMT 1999


Based on feedback from Joern I have slightly amended my last change to
reload1.c.  Mostly this ensures that we handle ZERO_EXTRACT, SIGN_EXTRACT
for multi-register modes in reload_combine_note_store.  The rest of the
stuff is just cleanup.



------- Forwarded Message

From:     Jeffrey A Law <law@chunks.cygnus.com>
To:       amylaar@cygnus.com
cc:       gcc-local@cygnus.com
Date:     Tue, 09 Feb 1999 20:24:34 -0700
Subject:  reload_cse/reload_combine fixes


Was this something like what you had in mind?

	* reload1.c (reload_combine_note_store): Second argument is no
	longer unused/ignored.  Handle multi-register hard regs.
	(move2add_note_store): Simplify.
	

Index: reload1.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/reload1.c,v
retrieving revision 1.128
diff -c -3 -p -r1.128 reload1.c
*** reload1.c	1999/02/06 09:41:08	1.128
--- reload1.c	1999/02/10 02:57:18
*************** reload_combine ()
*** 9714,9724 ****
  
  /* Check if DST is a register or a subreg of a register; if it is,
     update reg_state[regno].store_ruid and reg_state[regno].use_index
!    accordingly.  Called via note_stores from reload_combine.
!    The second argument, SET, is ignored.  */
  static void
  reload_combine_note_store (dst, set)
!      rtx dst, set ATTRIBUTE_UNUSED;
  {
    int regno = 0;
    int i;
--- 9714,9723 ----
  
  /* Check if DST is a register or a subreg of a register; if it is,
     update reg_state[regno].store_ruid and reg_state[regno].use_index
!    accordingly.  Called via note_stores from reload_combine.  */
  static void
  reload_combine_note_store (dst, set)
!      rtx dst, set;
  {
    int regno = 0;
    int i;
*************** reload_combine_note_store (dst, set)
*** 9742,9749 ****
        || GET_CODE (SET_DEST (set)) == SIGN_EXTRACT
        || GET_CODE (SET_DEST (set)) == STRICT_LOW_PART)
      {
!       reg_state[regno].use_index = -1;
!       reg_state[regno].store_ruid = reload_combine_ruid;
      }
    else
      {
--- 9741,9751 ----
        || GET_CODE (SET_DEST (set)) == SIGN_EXTRACT
        || GET_CODE (SET_DEST (set)) == STRICT_LOW_PART)
      {
!       for (i = size / UNITS_PER_WORD - 1 + regno; i >= regno; i--)
! 	{
! 	  reg_state[i].use_index = -1;
! 	  reg_state[i].store_ruid = reload_combine_ruid;
! 	}
      }
    else
      {
*************** move2add_note_store (dst, set)
*** 10058,10077 ****
  
    regno += REGNO (dst);
  
!   if (HARD_REGNO_NREGS (regno, mode) == 1 && GET_CODE (set) == SET)
      {
        rtx src = SET_SRC (set);
- 
-       /* Indicate that this register has been recently written to,
- 	 but the exact contents are not available.  */
-       if (GET_CODE (SET_DEST (set)) == ZERO_EXTRACT
- 	  || GET_CODE (SET_DEST (set)) == SIGN_EXTRACT
- 	  || GET_CODE (SET_DEST (set)) == STRICT_LOW_PART)
- 	{
- 	  reg_set_luid[regno] = move2add_luid;
- 	  reg_offset[regno] = dst;
- 	  return;
- 	}
  
        reg_mode[regno] = mode;
        switch (GET_CODE (src))
--- 10060,10071 ----
  
    regno += REGNO (dst);
  
!   if (HARD_REGNO_NREGS (regno, mode) == 1 && GET_CODE (set) == SET
!       && GET_CODE (SET_DEST (set)) != ZERO_EXTRACT
!       && GET_CODE (SET_DEST (set)) != SIGN_EXTRACT
!       && GET_CODE (SET_DEST (set)) != STRICT_LOW_PART)
      {
        rtx src = SET_SRC (set);
  
        reg_mode[regno] = mode;
        switch (GET_CODE (src))

------- End of Forwarded Message



More information about the Gcc-patches mailing list