On Thu, Nov 18, 2010 at 3:58 AM, Jan Hubicka <hubi...@ucw.cz> wrote:
>> Some text size measurement.
>>
>> Summary:
>> 1) LTO with -O3 bloats up code considerably;
> Yes, you need either -fwhole-program or -fuse-linker-plugin to make it behave
> sanely.
>
> For Mozilla I have best experience with -fuse-linker-plugin --param
> inline-unit-growth=5 That gives me about 16% code size savings (so LTO -O3 is
> same size as -Os).  This means that it is smaller than 
> -O2+LTO+-fwhole-program.
>
>> 2) LTO with -O2 reduces text size compared with -O2
>
> An more so with -fwhole-program as you noticed ;)

Actually all the LTO experiments were done with -fwhole-program.

>
>> 3) Google 4.4.3 based compiler is really effective in reducing C++
>> program size -- this is where the focus of the tuning was done.
>> Witnessed by eon in SPEC2k and all C++ apps in SPEC06
>
> Again, I would be very interested to see the patches (and sooner than later
> given tham I am re-tunning inliner for 4.6 now). Looking at Mozilla I also
> concluded that we have a lot of room for improvement.  How old is the tree you
> use for testing?  I recently improved code size somewhat at mainline.
>

yes -- it may take a while as the code base for our tuning is 4.4.3.

>>
>> SPEC06 C++ program Data (the first data column is the TOT O2 base number)
>>
>> 1. TOT O3 vs TOT O2 ( 3.35% total increase)
>>
>>         471.omnetpp/    853708    867988      1.67%
>>          450.soplex/    643273    656349         2.03%
>>       483.xalancbmk/   3634416   3777600      3.94%
>>            444.namd/    393142    402038        2.26%
>>           473.astar/    102182    111038          8.67%
>>             size_sum   5626721   5815013      3.35%
>>
>> 2. TOT LTO+whole program + O3 vs TOT O2 (0.35% total increase)
>>
>>         471.omnetpp/    853708    937728      9.84%
>>          450.soplex/    643273    654057      1.68%
>>       483.xalancbmk/   3634416   3540646     -2.58%
>>            444.namd/    393142    401318      2.08%
>>           473.astar/    102182    112538     10.13%
>>             size_sum   5626721   5646287      0.35%
>>
>> 3. TOT LTO+whole program + O2 vs TOT O2 (8.10% total reduction)
>>
>>         471.omnetpp/    853708    822868     -3.61%
>>          450.soplex/    643273    611653     -4.92%
>>       483.xalancbmk/   3634416   3245157    -10.71%
>>            444.namd/    393142    391698     -0.37%
>>           473.astar/    102182     99586     -2.54%
>>             size_sum   5626721   5170962     -8.10%
>>
>> 4. google 4.4.3 compiler  O2 vs TOT O2 (13.95% total reduction)
>>
>>         471.omnetpp/    853708    545840    -36.06%
>>          450.soplex/    643273    374674    -41.76%
>>       483.xalancbmk/   3634416   3556306     -2.15%
>>            444.namd/    393142    329897    -16.09%
>>           473.astar/    102182     35301    -65.45%
>>             size_sum   5626721   4842018    -13.95%
>
> Hmm, this really seems interesting. Why the changes was not contributed this 
> stage1?
>

As you can see, the savings are mainly for C++, and may hurt C --
there are more work needed to make it suitable upstream.

Thanks,

David


> Honza
>

Reply via email to