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]

Re: fix gcse breakage


On Sunday 13 June 2004 13:54, Steven Bosscher wrote:
> But CALL_P should stay as it is IMO.  There was no CALL_P before,
> and I named it CALL_P analoguous to JUMP_P: check if the insn is
> a CALL_INSN.  The ones where I replaced (GET_CODE (X) == CALL)
> with CALL_P (X) should be reverted, instead of redefining CALL_P.

Like so,

	* gcse.c (hash_scan_set, hash_scan_insn, mark_set, mark_oprs_set):
	Revert previous change, don't use CALL_P.

Index: gcse.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/gcse.c,v
retrieving revision 1.304
diff -c -3 -p -r1.304 gcse.c
*** gcse.c	12 Jun 2004 13:17:39 -0000	1.304
--- gcse.c	13 Jun 2004 12:00:37 -0000
*************** hash_scan_set (rtx pat, rtx insn, struct
*** 2071,2077 ****
    rtx dest = SET_DEST (pat);
    rtx note;
  
!   if (CALL_P (src))
      hash_scan_call (src, insn, table);
  
    else if (REG_P (dest))
--- 2071,2077 ----
    rtx dest = SET_DEST (pat);
    rtx note;
  
!   if (GET_CODE (src) == CALL)
      hash_scan_call (src, insn, table);
  
    else if (REG_P (dest))
*************** hash_scan_insn (rtx insn, struct hash_ta
*** 2231,2243 ****
  	  hash_scan_set (x, insn, table);
  	else if (GET_CODE (x) == CLOBBER)
  	  hash_scan_clobber (x, insn, table);
! 	else if (CALL_P (x))
  	  hash_scan_call (x, insn, table);
        }
  
    else if (GET_CODE (pat) == CLOBBER)
      hash_scan_clobber (pat, insn, table);
!   else if (CALL_P (pat))
      hash_scan_call (pat, insn, table);
  }
  
--- 2231,2243 ----
  	  hash_scan_set (x, insn, table);
  	else if (GET_CODE (x) == CLOBBER)
  	  hash_scan_clobber (x, insn, table);
! 	else if (GET_CODE (x) == CALL)
  	  hash_scan_call (x, insn, table);
        }
  
    else if (GET_CODE (pat) == CLOBBER)
      hash_scan_clobber (pat, insn, table);
!   else if (GET_CODE (pat) == CALL)
      hash_scan_call (pat, insn, table);
  }
  
*************** mark_set (rtx pat, rtx insn)
*** 2745,2751 ****
    else if (MEM_P (dest))
      record_last_mem_set_info (insn);
  
!   if (CALL_P (SET_SRC (pat)))
      mark_call (insn);
  }
  
--- 2745,2751 ----
    else if (MEM_P (dest))
      record_last_mem_set_info (insn);
  
!   if (GET_CODE (SET_SRC (pat)) == CALL)
      mark_call (insn);
  }
  
*************** mark_oprs_set (rtx insn)
*** 2785,2797 ****
  	  mark_set (x, insn);
  	else if (GET_CODE (x) == CLOBBER)
  	  mark_clobber (x, insn);
! 	else if (CALL_P (x))
  	  mark_call (insn);
        }
  
    else if (GET_CODE (pat) == CLOBBER)
      mark_clobber (pat, insn);
!   else if (CALL_P (pat))
      mark_call (insn);
  }
  
--- 2785,2797 ----
  	  mark_set (x, insn);
  	else if (GET_CODE (x) == CLOBBER)
  	  mark_clobber (x, insn);
! 	else if (GET_CODE (x) == CALL)
  	  mark_call (insn);
        }
  
    else if (GET_CODE (pat) == CLOBBER)
      mark_clobber (pat, insn);
!   else if (GET_CODE (pat) == CALL)
      mark_call (insn);
  }
  


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