This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: i386 CONST_COSTS take 2


> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]