This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch to improve Pentium III double performance
- From: Will Cohen <wcohen at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 02 Jul 2002 16:51:47 -0400
- Subject: Patch to improve Pentium III double performance
- Organization: Red Hat, Inc.
According to the Intel optimization manuals for the Pentium Pro and
Pentium III smaller writes to a memory region should not be followed by
larger reads from that same regions. GCC violates this rule for the
Pentium Pro/II/III. The common examples of where this happens is copying
double arguments for a function call or putting a DFmode value on the
stack as a return value. The simple attached patch avoids generating
this type of code for the Pentium Pro/II/III. This change improved the
performance of the Whetstone benchmark by about 5% on a pentium 3 computer.
2002-07-02 Will Cohen <wcohen@redhat.com>
* config/i386.c (x86_integer_DFmode_moves): Disable for PPro.
Okay to check in?
-Will
--
Will Cohen, GCC Engineer ------ ,__o
Red Hat, 1801 Varsity Dr., Raleigh, NC 27606 ------ _-\_<,
Office (919)-754-3700 x44390 Fax (919)-754-3701------ (*)/'(*)
Index: i386.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/config/i386/i386.c,v
retrieving revision 1.368.2.9
diff -U2 -r1.368.2.9 i386.c
--- i386.c 23 Apr 2002 08:11:22 -0000 1.368.2.9
+++ i386.c 2 Jul 2002 20:34:39 -0000
@@ -386,5 +386,5 @@
const int x86_add_esp_4 = m_ATHLON | m_K6 | m_PENT4;
const int x86_add_esp_8 = m_ATHLON | m_PPRO | m_K6 | m_386 | m_486 | m_PENT4;
-const int x86_integer_DFmode_moves = ~(m_ATHLON | m_PENT4);
+const int x86_integer_DFmode_moves = ~(m_ATHLON | m_PENT4 | m_PPRO);
const int x86_partial_reg_dependency = m_ATHLON | m_PENT4;
const int x86_memory_mismatch_stall = m_ATHLON | m_PENT4;