[RFC] Do pointer comparison first in operand_equal_p

Jeffrey A Law law@redhat.com
Fri May 13 15:17:00 GMT 2005


On Fri, 2005-05-13 at 11:00 -0400, Diego Novillo wrote:
> This patch implements what I asked in
> http://gcc.gnu.org/ml/gcc/2005-05/msg00601.html.
> 
> The time savings are negligible but measurable in the tree passes
> (saves about 1% of compile time in the tree optimizers).
> 
> Bootstrapped and tested x86, x86_64, ia64 and ppc64.
> 
> Jeff had some doubts about the approach.  Roger, what do you
> think?  Any reason why this would be unsafe in general?
> 
> 
> Thanks.  Diego.
> 
> 
> 	* fold-const.c (operand_equal_p): Do pointer comparison first
> 	for operands with no side effects.
I think it's OK.  

jeff




More information about the Gcc-patches mailing list