[llvm-commits] [llvm] r96066 - /llvm/trunk/lib/Transforms/IPO/Inliner.cpp

Jakob Stoklund Olesen stoklund at 2pi.dk
Sat Feb 13 08:35:48 PST 2010


On Feb 13, 2010, at 5:55 AM, Anton Korobeynikov wrote:

> Hi, Jakob
> 
>> Functions explicitly marked inline will get an inlining threshold slightly
>> more aggressive than the default for -O3. This means than -O3 builds are
>> mostly unaffected while -Os builds will be a bit bigger and faster.
>> 
>> The difference depends entirely on how many 'inline's are sprinkled on the
>> source.
>> 
>> In the CINT2006 suite, only these tests are significantly affected under -Os:
>> 
>>               Size   Time
>> 471.omnetpp   +1.63% -1.85%
>> 473.astar     +4.01% -6.02%
>> 483.xalancbmk +4.60%  0.00%
> What's the point then? This looks like a significant pessimization -
> the code is 5% larger.

You say pessimization, I say tradeoff. Runtime performance is also 6% better.

The idea is to make -Os more generally useful by allowing more inlining of functions /explicitly/ marked inline. We are assuming that programmers know what they are doing when they write 'inline', and that those functions are performance critical. It should make it possible for -Os to get closer to -O3 performance without the code bloat.

I should have included -O3 numbers in the table to make it clear.

/jakob





More information about the llvm-commits mailing list