This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
patch: sh wrong scheduling description
- From: Christian BRUEL <christian dot bruel at st dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>, aoliva at redhat dot com
- Date: Wed, 28 Mar 2007 10:03:52 +0200
- Subject: patch: sh wrong scheduling description
Hello,
the attached patch fixes a scheduling performance issue with nofpu sh
models.
Memory accesses was issuing a d_lock reservation instead of an sh4_load
reservation. (Similarly the type for the mac constraints looks mixed up).
This was noticed by measuring integer only code compiled with -m4-nofpu
that was surprisingly performing worst that when compiled with -m4. for
instance the following sequence
mov.l r8,@-r15
mov.l r9,@-r15
mov.l r10,@-r15
mov.l r11,@-r15
mov.l r12,@-r15
mov.w .L8,r11
mov #0,r0
now compiles as :
mov.l r8,@-r15
mov #0,r0
mov.l r9,@-r15
mov.l r10,@-r15
mov.l r11,@-r15
mov.l r12,@-r15
mov.w .L8,r11
one cycle better.
Regards,
Christian
2007-03-28 Christian Bruel <christian.bruel@st.com>
* config/sh/sh.md (movsi_i): Fix type attribute for r,m and x,<
constraints.
Index: sh.md
===================================================================
--- sh.md (revision 132)
+++ sh.md (working copy)
@@ -4923,7 +4923,7 @@
lds.l %1,%0
lds.l %1,%0
fake %1,%0"
- [(set_attr "type" "pcload_si,move,movi8,mt_group,load_si,mac_gp,prget,arith,mac_mem,store,pstore,gp_mac,prset,mem_mac,pload,pcload_si")
+ [(set_attr "type" "pcload_si,move,movi8,mt_group,load_si,mac_gp,prget,arith,store,mac_mem,pstore,gp_mac,prset,mem_mac,pload,pcload_si")
(set_attr "length" "*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*")])
;; t/r must come after r/r, lest reload will try to reload stuff like