This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]