No Subject

John Wehle john@feith.com
Mon Jun 1 09:05:00 GMT 1998


> Well, my experiments how this is generally a lose, though a rather
> small one.   Have you done any experiments which show that register
> allocation is improved with this patch?

Crafty (a chess program) shows a 2 percent improvement on its internal
benchmark when using this patch and compiled in both cases with
-march=pentiumpro -O3.  The assembler resulting from compiling with
-O (without specifiying -march) cse.c, gcse.c, optabs.c, and reload1.c
shows changes similar to:

***************
*** 6447,6456 ****
  	cmpw $50,(%ecx)
  	jne L1067
  	movzbl 2(%edx),%eax
! 	cmpl %eax,12(%ebp)
  	jne L1067
! 	movzbl 2(%ecx),%edx
! 	cmpl %edx,12(%ebp)
  	jne L1067
  	leal -72(%ebp),%eax
  	pushl %eax
--- 6447,6457 ----
  	cmpw $50,(%ecx)
  	jne L1067
  	movzbl 2(%edx),%eax
! 	movl 12(%ebp),%edx
! 	cmpl %eax,%edx
  	jne L1067
! 	movzbl 2(%ecx),%eax
! 	cmpl %eax,%edx
  	jne L1067
  	leal -72(%ebp),%eax
  	pushl %eax

Which appears to better register usage.  Can you supply a example of
where it loses?

-- John
-------------------------------------------------------------------------
|   Feith Systems  |   Voice: 1-215-646-8000  |  Email: john@feith.com  |
|    John Wehle    |     Fax: 1-215-540-5495  |                         |
-------------------------------------------------------------------------




More information about the Gcc-patches mailing list