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

Dimitry Andric dimitry at andric.com
Mon Oct 20 11:11:58 PDT 2014


> On 19 Oct 2014, at 05:28, Nick Lewycky <nicholas at mxc.ca> wrote:
> 
> 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?

I did not yet create a bug for it.  I think it's easiest to just post the preprocessed code for that boot loader, plus the flags used to compile it.  There is probably an easy way to get the total size of code and data produced by clang, which could be a criterion for passing or failing a test, or just as a metric which can be logged over time.

I'll create something and post it to Bugzilla.

-Dimitry





More information about the llvm-commits mailing list