[PATCH] RTL PRE speedup

Richard Biener rguenther@suse.de
Wed Feb 12 14:43:00 GMT 2014


No magic bullet for the insn-recog.c testcase I'm looking at but
quite obvious and should save half of the canon_true_dependence calls
for blocks that end up non-transparent.

Now one of the main weakness of compute_transp is that we call it
for all expressions but for the MEM case it's certainly not
interesting to know whether it is transparent in _all_ blocks
but just a subset (dependent on the actual transform we do - either
where it's available or where its anticipated).

Committed as obvious.

Richard.

2014-02-12  Richard Biener  <rguenther@suse.de>

	* gcse.c (compute_transp): break from loop over canon_modify_mem_list
	when we found a dependence.

Index: gcc/gcse.c
===================================================================
*** gcc/gcse.c	(revision 207718)
--- gcc/gcse.c	(working copy)
*************** compute_transp (const_rtx x, int indx, s
*** 1735,1741 ****
  
  		  if (canon_true_dependence (dest, GET_MODE (dest),
  					     dest_addr, x, x_addr))
! 		    bitmap_clear_bit (bmap[bb_index], indx);
  	        }
  	    }
  	}
--- 1735,1744 ----
  
  		  if (canon_true_dependence (dest, GET_MODE (dest),
  					     dest_addr, x, x_addr))
! 		    {
! 		      bitmap_clear_bit (bmap[bb_index], indx);
! 		      break;
! 		    }
  	        }
  	    }
  	}



More information about the Gcc-patches mailing list