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]
Other format: [Raw text]

Re: PATCH: adjust ivopts costs for -Os


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


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