public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/46837] New: induct compiled with -ffast-math -fschedule-insns -fsched-pressure -O3 ~30% slower
@ 2010-12-07 15:10 howarth at nitro dot med.uc.edu
2010-12-07 16:23 ` [Bug middle-end/46837] " howarth at nitro dot med.uc.edu
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: howarth at nitro dot med.uc.edu @ 2010-12-07 15:10 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46837
Summary: induct compiled with -ffast-math -fschedule-insns
-fsched-pressure -O3 ~30% slower
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: howarth@nitro.med.uc.edu
The Polyhedron 2005 benchmark induct is 28% slower when compiled with
-ffast-math -fschedule-insns -fsched-pressure -O3 compared to -ffast-math -O3
(15.86 sec vs 12.43 sec) on x86_64-apple-darwin10 using -mtune=core2. This same
performance regression doesn't occur at -ffast-math -fschedule-insns
-fsched-pressure -O2 vs -ffast-math -O2.
The same effect is seen with both -mtune=generic (24%) as -mtune=core2 (28%) as
well as at
-m32 (33% with -mtune=core2 and 5% with -mtune=generic).
gfortran -ffast-math -O3 induct.f90 -o induct
tuning -mtune=core2
mtune=generic
------------------------------------
---------------------------------------
stock -fschedule-insns -fsched-pressure
stock -fschedule-insns -fsched-pressure
-m64 12.43s 15.86s
12.44s 15.57s
-m32 13.91s 18.63s
13.93s 14.69s
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/sw/lib/gcc4.6/libexec/gcc/x86_64-apple-darwin10.5.0/4.6.0/lto-wrapper
Target: x86_64-apple-darwin10.5.0
Configured with: ../gcc-4.6-20101206/configure --prefix=/sw
--prefix=/sw/lib/gcc4.6 --mandir=/sw/share/man --infodir=/sw/lib/gcc4.6/info
--enable-languages=c,c++,fortran,objc,obj-c++,java --with-gmp=/sw
--with-libiconv-prefix=/sw --with-ppl=/sw --with-cloog=/sw --with-mpc=/sw
--with-system-zlib --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib
--program-suffix=-fsf-4.6 --enable-checking=yes --enable-cloog-backend=isl
Thread model: posix
gcc version 4.6.0 20101207 (experimental) (GCC)
r167525 with
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/46837] induct compiled with -ffast-math -fschedule-insns -fsched-pressure -O3 ~30% slower
2010-12-07 15:10 [Bug middle-end/46837] New: induct compiled with -ffast-math -fschedule-insns -fsched-pressure -O3 ~30% slower howarth at nitro dot med.uc.edu
@ 2010-12-07 16:23 ` howarth at nitro dot med.uc.edu
2010-12-07 16:48 ` howarth at nitro dot med.uc.edu
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: howarth at nitro dot med.uc.edu @ 2010-12-07 16:23 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46837
--- Comment #1 from Jack Howarth <howarth at nitro dot med.uc.edu> 2010-12-07 16:22:55 UTC ---
The -fschedule-insns option alone is sufficient to regress the induct
benchmark...
gfortran -mtune=core2 -fschedule-insns -ffast-math -O3 induct.f90 -o induct
15.57s
gfortran -mtune=core2 -ffast-math -O3 induct.f90 -o induct
12.42s
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/46837] induct compiled with -ffast-math -fschedule-insns -fsched-pressure -O3 ~30% slower
2010-12-07 15:10 [Bug middle-end/46837] New: induct compiled with -ffast-math -fschedule-insns -fsched-pressure -O3 ~30% slower howarth at nitro dot med.uc.edu
2010-12-07 16:23 ` [Bug middle-end/46837] " howarth at nitro dot med.uc.edu
@ 2010-12-07 16:48 ` howarth at nitro dot med.uc.edu
2010-12-07 19:08 ` dominiq at lps dot ens.fr
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: howarth at nitro dot med.uc.edu @ 2010-12-07 16:48 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46837
--- Comment #2 from Jack Howarth <howarth at nitro dot med.uc.edu> 2010-12-07 16:48:11 UTC ---
The runtime performance reduction from...
gfortran -mtune=core2 -fschedule-insns -ffast-math -O3 induct.f90 -o induct
compared to...
gfortran -mtune=core2 -ffast-math -O3 induct.f90 -o induct
...is very confusing. According to the man page...
-fschedule-insns
If supported for the target machine, attempt to reorder instructions
to eliminate execution stalls due to required data
being unavailable. This helps machines that have slow floating
point or memory load instructions by allowing other
instructions to be issued until the result of the load or floating
point instruction is required.
Enabled at levels -O2, -O3.
So shouldn't this already be defaulted on by -O3 in the second case?
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/46837] induct compiled with -ffast-math -fschedule-insns -fsched-pressure -O3 ~30% slower
2010-12-07 15:10 [Bug middle-end/46837] New: induct compiled with -ffast-math -fschedule-insns -fsched-pressure -O3 ~30% slower howarth at nitro dot med.uc.edu
2010-12-07 16:23 ` [Bug middle-end/46837] " howarth at nitro dot med.uc.edu
2010-12-07 16:48 ` howarth at nitro dot med.uc.edu
@ 2010-12-07 19:08 ` dominiq at lps dot ens.fr
2010-12-08 0:36 ` steven at gcc dot gnu.org
2012-12-12 16:59 ` howarth at nitro dot med.uc.edu
4 siblings, 0 replies; 6+ messages in thread
From: dominiq at lps dot ens.fr @ 2010-12-07 19:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46837
--- Comment #3 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2010-12-07 19:08:09 UTC ---
See http://gcc.gnu.org/ml/gcc-patches/2010-12/msg00604.html for a possible
explanation.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/46837] induct compiled with -ffast-math -fschedule-insns -fsched-pressure -O3 ~30% slower
2010-12-07 15:10 [Bug middle-end/46837] New: induct compiled with -ffast-math -fschedule-insns -fsched-pressure -O3 ~30% slower howarth at nitro dot med.uc.edu
` (2 preceding siblings ...)
2010-12-07 19:08 ` dominiq at lps dot ens.fr
@ 2010-12-08 0:36 ` steven at gcc dot gnu.org
2012-12-12 16:59 ` howarth at nitro dot med.uc.edu
4 siblings, 0 replies; 6+ messages in thread
From: steven at gcc dot gnu.org @ 2010-12-08 0:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46837
Steven Bosscher <steven at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2010.12.08 00:35:39
CC| |steven at gcc dot gnu.org
Ever Confirmed|0 |1
--- Comment #4 from Steven Bosscher <steven at gcc dot gnu.org> 2010-12-08 00:35:39 UTC ---
Re. comment #2: For the i386 backends -fschedule-insns is disabled even at -O2
and -O3. See gcc/config/i386/i386.c:ix86_option_optimization_table:
static const struct default_options ix86_option_optimization_table[] =
{
/* Turn off -fschedule-insns by default. It tends to make the
problem with not enough registers even worse. */
#ifdef INSN_SCHEDULING
{ OPT_LEVELS_ALL, OPT_fschedule_insns, NULL, 0 },
#endif
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/46837] induct compiled with -ffast-math -fschedule-insns -fsched-pressure -O3 ~30% slower
2010-12-07 15:10 [Bug middle-end/46837] New: induct compiled with -ffast-math -fschedule-insns -fsched-pressure -O3 ~30% slower howarth at nitro dot med.uc.edu
` (3 preceding siblings ...)
2010-12-08 0:36 ` steven at gcc dot gnu.org
@ 2012-12-12 16:59 ` howarth at nitro dot med.uc.edu
4 siblings, 0 replies; 6+ messages in thread
From: howarth at nitro dot med.uc.edu @ 2012-12-12 16:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46837
Jack Howarth <howarth at nitro dot med.uc.edu> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #5 from Jack Howarth <howarth at nitro dot med.uc.edu> 2012-12-12 16:58:49 UTC ---
This issue doesn't appear to be present for the induct.f90 benchmark in current
gcc trunk on x86_64-apple-darwin12.
-ffast-math -fschedule-insns -fsched-pressure -O3 -m64 = 11.92867 sec
-ffast-math -O3 -m64 = 12.26822 sec
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-12-12 16:59 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-07 15:10 [Bug middle-end/46837] New: induct compiled with -ffast-math -fschedule-insns -fsched-pressure -O3 ~30% slower howarth at nitro dot med.uc.edu
2010-12-07 16:23 ` [Bug middle-end/46837] " howarth at nitro dot med.uc.edu
2010-12-07 16:48 ` howarth at nitro dot med.uc.edu
2010-12-07 19:08 ` dominiq at lps dot ens.fr
2010-12-08 0:36 ` steven at gcc dot gnu.org
2012-12-12 16:59 ` howarth at nitro dot med.uc.edu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).