RFC: a patch for tuning gcc to PENTIUM_M

Vladimir N. Makarov vmakarov@redhat.com
Fri Apr 2 16:18:00 GMT 2004


   This is not a patch which I propose to commit.  This patch could be
used for tuning gcc for pentium-m.  I tested it on pentium-m with
128Mb two months ago.  This memory is not enough for SPEC2000.  So I
tested it on SPEC95.  Unfortunately, I have no available PENTIUM-M
machine now.  So somebody could use this patch for further tuning.

   The patch resulted in 1-2% better SPEC2000 in comparison with all
other possible tunings.

   One problem with the patch is that PentiumPro DFA description has
been added since my work on the patch and old code for tuning the insn
scheduler has been gone.  I used pentium-pro old description and
functions for tuning scheduler (I found important to follow PENTIUMPRO
4-1-1 mops rule).  Therefore I modify the patch to
reflect this change.  I've missed discussion about PentiumPro DFA
description.  I'd have recommended to use a Pentium-M machine to
compare with the old description.

  Another problem with the patch is a bigger code than for pentiumpro.
But as I found it is really important to align labels to 16 byte
boundary.  We could switch such aligment off when -Os is used.


Base flags: -O2 -march=i686 -mtune=i686
Peak flags: -O2 -march=i686 -mtune=pentium-m

   ========================================================================
   099.go            4600      71.1      64.7      4600      71.8      64.1 
   124.m88ksim       1900      35.5      53.5      1900      35.6      53.4 
   126.gcc           1700     135        12.6      1700     121        14.1 
   129.compress      1800      29.2      61.6      1800      29.8      60.5 
   130.li            1900      32.4      58.6      1900      29.9      63.5 
   132.ijpeg         2400      45.7      52.5      2400      43.6      55.1 
   134.perl          1900      25.3      75.0      1900      25.5      74.6 
   147.vortex        2700      44.5      60.6      2700      43.4      62.2 
   SPECint_base95 (Geom. Mean)           49.8                              
   SPECint95 (Geom. Mean)                                              51.2

----------------CINT95-----------------
 2.589%         192228         197204 099.go
 3.045%         113328         116779 124.m88ksim
 1.567%    1.12991e+06    1.14762e+06 126.gcc
 4.058%           6308           6564 129.compress
 2.776%          48808          50163 130.li
 2.736%         126141         129592 132.ijpeg
 0.328%         237804         238583 134.perl
 4.334%         574533         599432 147.vortex
Average = 1.94841%

   ========================================================================
   101.tomcatv       3700      51.8      71.4      3700      51.1      72.3 
   102.swim          8600      83.6     103        8600      83.6     103   
   103.su2cor        1400      41.0      34.2      1400      41.1      34.1 
   104.hydro2d       2400      78.1      30.7      2400      78.7      30.5 
   107.mgrid         2500      46.5      53.8      2500      46.2      54.1 
   110.applu         2200      68.5      32.1      2200      69.1      31.8 
   125.turb3d        4100      78.3      52.3      4100      78.1      52.5 
   141.apsi          2100      36.3      57.8      2100      35.8      58.7 
   145.fpppp         9600      83.1     115        9600      77.6     124   
   146.wave5         3000      43.0      69.7      3000      42.8      70.1 
   SPECfp_base95 (Geom. Mean)            56.4                              
   SPECfp95 (Geom. Mean)                                               56.9

Base flags: -O2 -g -march=i386 -mtune=i386
Peak flags: -O2 -g -march=i386 -mtune=pentium-m
   ========================================================================
   099.go            4600      75.3      61.1      4600      78.0     59.0  
   124.m88ksim       1900      37.4      50.8      1900      36.5     52.0  
   126.gcc           1700     166        10.3      1700     191        8.91 
   129.compress      1800      31.1      57.9      1800      31.2     57.8  
   130.li            1900      32.0      59.3      1900      30.8     61.7  
   132.ijpeg         2400      54.0      44.5      2400      46.2     52.0  
   134.perl          1900      28.2      67.3      1900      26.1     72.9  
   147.vortex        2700      43.6      61.9      2700      46.1     58.6  
   SPECint_base95 (Geom. Mean)           46.1                              
   SPECint95 (Geom. Mean)                                             46.4 

   ========================================================================
   101.tomcatv       3700      51.6      71.7      3700      51.3      72.1 
   102.swim          8600      83.9     103        8600      83.1     103   
   103.su2cor        1400      42.0      33.4      1400      41.1      34.1 
   104.hydro2d       2400      80.2      29.9      2400      79.5      30.2 
   107.mgrid         2500      47.3      52.9      2500      46.8      53.4 
   110.applu         2200      66.5      33.1      2200      69.0      31.9 
   125.turb3d        4100      80.3      51.0      4100      76.9      53.3 
   141.apsi          2100      36.7      57.3      2100      36.6      57.4 
   145.fpppp         9600      83.7     115        9600      77.2     124   
   146.wave5         3000      43.3      69.3      3000      43.1      69.5 
   SPECfp_base95 (Geom. Mean)            55.9                              
   SPECfp95 (Geom. Mean)                                               56.7

Base flags: -O2 -g -march=pentium4 -mtune=pentium4
Peak flags: -O2 -g -march=pentium4 -mtune=pentium-m
   ========================================================================
   099.go            4600      74.6      61.7      4600      71.8      64.1 
   124.m88ksim       1900      37.1      51.2      1900      35.0      54.4 
   126.gcc           1700     147        11.6      1700     150        11.3 
   129.compress      1800      29.7      60.7      1800      30.8      58.4 
   130.li            1900      32.4      58.7      1900      29.9      63.6 
   132.ijpeg         2400      44.3      54.2      2400      45.0      53.3 
   134.perl          1900      24.5      77.4      1900      25.8      73.6 
   147.vortex        2700      43.8      61.6      2700      43.7      61.8 
   SPECint_base95 (Geom. Mean)           49.1                              
   SPECint95 (Geom. Mean)                                              49.4

   ========================================================================
   101.tomcatv       3700      51.9      71.4      3700      51.9      71.3 
   102.swim          8600      83.6     103        8600      84.2     102   
   103.su2cor        1400      41.3      33.9      1400      41.3      33.9 
   104.hydro2d       2400      78.8      30.5      2400      78.2      30.7 
   107.mgrid         2500      46.4      53.9      2500      44.4      56.3 
   110.applu         2200      67.6      32.5      2200      70.1      31.4 
   125.turb3d        4100      75.2      54.5      4100      80.8      50.8 
   141.apsi          2100      37.3      56.4      2100      35.8      58.6 
   145.fpppp         9600      83.7     115        9600      77.4     124   
   146.wave5         3000      37.2      80.7      3000      37.2      80.8 
   SPECfp_base95 (Geom. Mean)            57.2                              
   SPECfp95 (Geom. Mean)                                               57.6


Vlad

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pm.patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20040402/18dff50b/attachment.ksh>


More information about the Gcc-patches mailing list