Re: gcc compile for code size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/11/2012 07:59 PM, Xin Tong wrote:

> On Sun, Nov 11, 2012 at 2:54 PM, Andrew Haley <aph@xxxxxxxxxx> wrote:
>> On 11/11/2012 07:47 PM, Xin Tong wrote:
>>> when gcc is set to compile for minimal code size, what kind of
>>> optimizations does gcc apply in comparison to compile for performance
>>> ? or it is just gcc spends more time doing the compilation, selecting
>>> instruction sequences that are optimal for code size.
>>
>> No.  GCC does all optimizations *except* those known to increase
>> program size.  This usually works pretty well, but isn't perfect.
>>
> so as to how the instructions are selected. compiling for code size
> does not have an effect ?

Please don't top-post on this list.

Any target could, in principle, select instructions based on size
and -OS, but I don't know any that do.

Andrew.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux