[Patch, i386] Turn on -fschedule-insns and -fsched-pressure by default for x86-64
Fang, Changpeng
Changpeng.Fang@amd.com
Tue Dec 7 18:45:00 GMT 2010
________________________________________
From: Jack Howarth [howarth@bromo.med.uc.edu]
Sent: Tuesday, December 07, 2010 12:10 AM
To: Fang, Changpeng
Cc: gcc-patches@gcc.gnu.org; sebpop@gmail.com; hjl.tools@gmail.com; Yazdani, Reza
>According to the Polyhedron 2005 benchmarks, -fschedule-insns and -fsched-pressure
>result in a net performance loss (at least for -mtune=core2) at both -m32 and -m64
>on x86_64-apple-darwin10. The induct benchmark in particular suffers a severe
>regression with those options.
>x86_64-apple-darwin10
>gfortran -m64 -mtune=core2 -ffast-math -funroll-loops -O3 %n.f90 -o %n
>benchmark stock -fschedule-insns %change
-fsched-pressure
>ac 8.81 8.75 -0.7
>aermod 17.21 17.21 0.0
>air 5.53 5.53 0.0
>capacita 32.39 32.89 1.5
>channel 1.84 1.84 0.0
>doduc 26.40 26.55 0.6
>fatigue 8.14 8.22 1.0
>gas_dyn 4.31 4.29 -0.5
>induct 12.85 15.89 19.1
>linpk 15.47 15.47 0.0
>mdbx 11.21 11.19 -0.2
>nf 29.98 29.96 -0.1
>protein 34.03 33.44 -1.8
>rnflow 23.13 22.91 -1.0
>test_fpu 8.03 8.11 1.0
>tfft 1.87 1.87 0.0
>Geometric Mean 10.84 10.99 1.4
For -m64, it seems only induct is a concern. The performance degradation depends on optimization level.
Here is my measurement on amdfam10 for induct:
-O2 -O2 -fschedule-insns -fsched-pressure improvement
33.77 34.11 -1.01%
-O3 -O3 -fschedule-insns -fsched-pressure improvement
28.44 27.47 +2.80%
-Ofast -Ofast -fschedule-insns -fsched-pressure improvement
16.94 18.95 -11.87%
-Ofast -funroll-loops -Ofast -funroll-loops -fschedule-insns -fsched-pressure improvement
17.14 18.97 -10.68%
I guess, with -Ofast (-O3 -ffast-math), register pressure is higher, which makes the scheduling optimization less
effective in general.
Thanks,
Changpeng
More information about the Gcc-patches
mailing list