i386 CONST_COSTS take 2

Joern Rennecke amylaar@redhat.com
Wed Jun 20 19:07:00 GMT 2001


> this patch sets costs to 0 instead of negative values.
> I've checked on compiling combine.c, that it basically just avoids
> extra register used to hold "funny" constants we used previously.
> 
> Code size grows slightly (<1%), but I believe it to be win perofrmance wise.

The cost used to be zero before, and that caused cse to do massive constant
propagation.  So where you said to put a 32 bit value into a variable and
use it tren times, gcc will replicate the value ten times into the insn
instead.  If the processor its the memory wall due to instruction fetch
and/or i-cache pollution, that means it will go slower.



More information about the Gcc-patches mailing list