PATCH: adjust ivopts costs for -Os
Zdenek Dvorak
rakdver@kam.mff.cuni.cz
Wed Jun 9 10:23:00 GMT 2010
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
More information about the Gcc-patches
mailing list