This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: adjust ivopts costs for -Os
- From: Zdenek Dvorak <rakdver at kam dot mff dot cuni dot cz>
- To: Sandra Loosemore <sandra at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 9 Jun 2010 12:08:08 +0200
- Subject: Re: PATCH: adjust ivopts costs for -Os
- References: <4C0F0ADC.9090909@codesourcery.com>
Hi,
> This patch fixes a problem I spotted while working on PR42505. It does
> not fix the test case reported in that issue.
>
> Currently, the ivopts costs model divides costs for IV setup by the
> expected number of loop iterations. This is OK when optimizing for
> speed, but when optimizing for code size, the code required for IV setup
> doesn't magically become smaller just because it's located outside the
> loop.
>
> I benchmarked this with CSiBE on x86-64, and the total code size measured
> was 3482313 originally, 3481067 with this patch. I also tried on ARM
> with the options mentioned in PR42505 and came up with 2640825 vs
> 2639463. So, as well as seeming like the abstractly Right Thing, there
> does seem to be a measurable improvement from this patch.
>
> OK to check in?
OK.
Zdenek