This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: i386 CONST_COSTS take 2
- To: jh at suse dot cz (Jan Hubicka)
- Subject: Re: i386 CONST_COSTS take 2
- From: Joern Rennecke <amylaar at redhat dot com>
- Date: Thu, 21 Jun 2001 03:07:12 +0100 (BST)
- Cc: gcc-patches at gcc dot gnu dot org, rth at cygnus dot com, patches at x86-64 dot org
> 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.