Index: gcse.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/gcse.c,v
retrieving revision 1.340
diff -c -p -r1.340 gcse.c
*** gcse.c	23 Apr 2005 21:27:44 -0000	1.340
--- gcse.c	22 May 2005 07:10:19 -0000
*************** static int
*** 1370,1375 ****
--- 1370,1380 ----
  load_killed_in_block_p (basic_block bb, int uid_limit, rtx x, int avail_p)
  {
    rtx list_entry = modify_mem_list[bb->index];
+ 
+   /* If this is a readonly then we aren't going to be chaning it.  */
+   if (MEM_READONLY_P (x))
+     return 0;
+ 
    while (list_entry)
      {
        rtx setter;
*************** compute_transp (rtx x, int indx, sbitmap
*** 2462,2512 ****
        return;
  
      case MEM:
!       {
! 	bitmap_iterator bi;
! 	unsigned bb_index;
  
! 	/* First handle all the blocks with calls.  We don't need to
! 	   do any list walking for them.  */
! 	EXECUTE_IF_SET_IN_BITMAP (blocks_with_calls, 0, bb_index, bi)
! 	  {
! 	    if (set_p)
! 	      SET_BIT (bmap[bb_index], indx);
! 	    else
! 	      RESET_BIT (bmap[bb_index], indx);
! 	  }
  
! 	/* Now iterate over the blocks which have memory modifications
! 	   but which do not have any calls.  */
! 	EXECUTE_IF_AND_COMPL_IN_BITMAP (modify_mem_list_set, blocks_with_calls,
! 					0, bb_index, bi)
! 	  {
! 	    rtx list_entry = canon_modify_mem_list[bb_index];
  
! 	    while (list_entry)
  	      {
! 		rtx dest, dest_addr;
  
! 		/* LIST_ENTRY must be an INSN of some kind that sets memory.
! 		   Examine each hunk of memory that is modified.  */
  
! 		dest = XEXP (list_entry, 0);
! 		list_entry = XEXP (list_entry, 1);
! 		dest_addr = XEXP (list_entry, 0);
  
! 		if (canon_true_dependence (dest, GET_MODE (dest), dest_addr,
! 					   x, rtx_addr_varies_p))
! 		  {
! 		    if (set_p)
! 		      SET_BIT (bmap[bb_index], indx);
! 		    else
! 		      RESET_BIT (bmap[bb_index], indx);
! 		    break;
! 		  }
! 		list_entry = XEXP (list_entry, 1);
  	      }
! 	  }
!       }
  
        x = XEXP (x, 0);
        goto repeat;
--- 2467,2520 ----
        return;
  
      case MEM:
!       if (! MEM_READONLY_P (x))
! 	{
  
! 	  bitmap_iterator bi;
! 	  unsigned bb_index;
  
! 	  /* First handle all the blocks with calls.  We don't need to
! 	     do any list walking for them.  */
! 	  EXECUTE_IF_SET_IN_BITMAP (blocks_with_calls, 0, bb_index, bi)
! 	    {
! 	      if (set_p)
! 		SET_BIT (bmap[bb_index], indx);
! 	      else
! 		RESET_BIT (bmap[bb_index], indx);
! 	    }
  
! 	    /* Now iterate over the blocks which have memory modifications
! 	       but which do not have any calls.  */
! 	    EXECUTE_IF_AND_COMPL_IN_BITMAP (modify_mem_list_set, 
! 					    blocks_with_calls,
! 					    0, bb_index, bi)
  	      {
! 		rtx list_entry = canon_modify_mem_list[bb_index];
  
! 		while (list_entry)
! 		  {
! 		    rtx dest, dest_addr;
  
! 		    /* LIST_ENTRY must be an INSN of some kind that sets memory.
! 		       Examine each hunk of memory that is modified.  */
  
! 		    dest = XEXP (list_entry, 0);
! 		    list_entry = XEXP (list_entry, 1);
! 		    dest_addr = XEXP (list_entry, 0);
! 
! 		    if (canon_true_dependence (dest, GET_MODE (dest), dest_addr,
! 					       x, rtx_addr_varies_p))
! 		      {
! 			if (set_p)
! 			  SET_BIT (bmap[bb_index], indx);
! 			else
! 			  RESET_BIT (bmap[bb_index], indx);
! 			break;
! 		      }
! 		    list_entry = XEXP (list_entry, 1);
! 	          }
  	      }
! 	}
  
        x = XEXP (x, 0);
        goto repeat;
