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]

Re: Patch installed in combine.c


On Fri, 24 Nov 2000, Bernd Schmidt wrote:

> I've noticed that Richard approved Jan's patch to avoid combining
> hard register moves, but the patch hasn't been installed yet.  I've
> installed the following variant of it, which does the tests earlier
> (this should allow us to get rid of more SMALL_REGISTER_CLASSES tests),
> and also allows the combination if the hard register involved is a
> fixed reg.

It turns out that this pessimizes code on the x86, since it disables
combinations involving the flag registers.  Fixed by the patch below;
bootstrapped on i686-linux.  (This causes some regressions, but these
were present before yesterday's patch to combine.c and only hidden by
the lack of optimizations).

Looking around in some machine descriptions it seems like the sparc, and
possibly others, can also suffer from the same problem.  While we probably
should mark the cc registers fixed in such cases, I'll probably turn off
the new checks in combine for non-SMALL_REGISTER_CLASSES machines.


Bernd

	* config/i386/i386.h (FIXED_REGS): Make the three flags registers
	fixed.

Index: config/i386/i386.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i386/i386.h,v
retrieving revision 1.137
diff -u -p -r1.137 i386.h
--- i386.h	2000/11/02 23:29:09	1.137
+++ i386.h	2000/11/25 16:28:37
@@ -628,7 +628,7 @@ extern int ix86_arch;
 /*ax,dx,cx,bx,si,di,bp,sp,st,st1,st2,st3,st4,st5,st6,st7*/	\
 {  0, 0, 0, 0, 0, 0, 0, 1, 0,  0,  0,  0,  0,  0,  0,  0,	\
 /*arg,flags,fpsr,dir,frame*/					\
-    1,    0,   0,  0,    1,					\
+    1,    1,   1,  1,    1,					\
 /*xmm0,xmm1,xmm2,xmm3,xmm4,xmm5,xmm6,xmm7*/			\
      0,   0,   0,   0,   0,   0,   0,   0,			\
 /*mmx0,mmx1,mmx2,mmx3,mmx4,mmx5,mmx6,mmx7*/			\


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