fix pr23303

Paolo Bonzini paolo.bonzini@lu.unisi.ch
Fri Sep 9 21:33:00 GMT 2005


> > Ok for mainline?
> 
> No.
> 
>   "The patch saves about 15% of compilation time for tramp3d with profiling
>    as all those tons of counters increments can now be direct.  It also
>    seems to have relatively positive effect on SPEC ..."

Let me say that this patch only affects !TARGET_READ_MODIFY targets, and
Honza most likely did not test these (Pentium/PPro), but an AMD target.

However I won't defend the patch much further than this, because there
are a lot of places in the RTL optimization pipeline that could modify
the instructions so that the peephole2 triggers and the leal is not
emitted.  For example, combine could decide to create a (plus (reg) 
(mem)) rather than a (plus (ashift (reg) (const_int 2)) (reg)).  It 
could actually be just luck that a leal was produced in 4.0 or earlier 
compilers.

Paolo



More information about the Gcc-patches mailing list