[PATCH] After llvm r195496, code compiled with -Os get substantially larger

Nick Lewycky nicholas at mxc.ca
Sat Oct 18 20:28:27 PDT 2014


Dimitry Andric wrote:
> On 18 Oct 2014, at 21:30, Tim Northover<t.p.northover at gmail.com>  wrote:
>>
>> Hi Dimitry,
>>
>>> In FreeBSD, we have a particular piece of code, a boot loader, which must always fit in 7 kiB, so it is compiled with -Os, and various other parameters that minimize its size.
>>
>> That kind of hard size requirement sounds like what -Oz was designed for.
>
> Yes, I saw the option, but in my case it makes the code *bigger* than with -Os.  So it does not help at all. :(

What's the bug number for this?

>> Lots of people use -Os as the default optimisation level, and it's
>> supposed to be more balanced. Given the large performance benefits and
>> small size penalties mentioned in the original thread, I'm not so sure
>> about switching this one.
>
> In this case I'm just a user, who saw a change in the behavior of -Os.  This change seems to fix it partially, at least for me.
>
> (Note that I'm bisecting for yet another size optimization regression, so I'll probably post another diff for review soonish.)
>
> -Dimitry
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>




More information about the llvm-commits mailing list