This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] MIPS - Adjust cost for mult/div when optimizing forsize.
- From: Eric Christopher <echristo at redhat dot com>
- To: David Ung <davidu at mips dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 09 May 2005 11:47:14 -0700
- Subject: Re: [patch] MIPS - Adjust cost for mult/div when optimizing forsize.
- References: <1115659535.1621.76.camel@localhost.localdomain>
On Mon, 2005-05-09 at 18:25 +0100, David Ung wrote:
> When optimizing for size (-Os), the compiler often replaces a multiply
> with a sequence of shifts and adds. This is desirable for speed
> optimizations, but not so when optimizing for size.
> The following patch takes size into account when optimizing for size.
>
> David.
>
>
> 2005-05-09 David Ung <davidu@mips.com>
>
> * config/mips/mips.c (mips_rtx_costs): Adjust cost for mult/div
> when optimizing for size by reflecting the number instructions
> used instead of execution time.
I've got another patch in this area that I'll be committing in the next
couple of days so I'd appreciate you holding off on this for a few days.
thanks.
-eric