-Os in conjunction with -fno-inline

Ryan Mansfield RMansfield@qnx.com
Fri Sep 30 05:41:00 GMT 2005


The idea of inlining is to remove function prologues and epilogues. When you
set -fno-inline, the functions do not get inlined and the prologues and
epilogues account for the slight increase in size.

Inlining can result in some code bloat when procedure cloning is done.

Regards,

Ryan Mansfield

 

-----Original Message-----
From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org] On
Behalf Of Ilja Golshtein
Sent: Friday, September 30, 2005 1:26 AM
To: gcc-help@gcc.gnu.org
Subject: -Os in conjunction with -fno-inline

Hello!

I've came across with a strange thing.
After adding "-fno-inline" to g++ command line just after "-Os" size of
binary was slightly increased.

Two question. Why any difference exists? Why size increased not reduced? The
code   optimized indeed.

I use gcc 3.2.2 from RH 9.0 distribution.
No optimization related options besides mentioned above.

Thanks.

--
Best regards
Ilja Golshtein



More information about the Gcc-help mailing list