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: Regclass cleanups


> this part of your patch breaks a few testcases on powerpc-linux-gnu. Simply
> reverting it fixes it for me.
> 
> Franz.
> 
> FAIL: gcc.c-torture/execute/930106-1.c execution,  -O0
> FAIL: gcc.c-torture/execute/960512-1.c execution,  -O0
> FAIL: gcc.c-torture/execute/980604-1.c execution,  -O0
> FAIL: gcc.c-torture/execute/990117-1.c execution,  -O0
> FAIL: gcc.c-torture/execute/991202-3.c execution,  -O0
> FAIL: gcc.c-torture/execute/conversion.c execution,  -O0
> FAIL: gcc.c-torture/execute/cvt-1.c execution,  -O0
> FAIL: gcc.c-torture/execute/gofast.c execution,  -O0
> 
> FAIL: g77.f-torture/execute/970625-2.f execution,  -O0
> FAIL: g77.f-torture/execute/claus.f execution,  -O0
> FAIL: g77.f-torture/execute/le.f execution,  -O0
Hi
I've checked in following patch as obvious fix.
The actual problem was that REG_N_REFS was not initialized and thus
regclass ignored some pseudos.
It is initialized right after regclass in stupid_life_analysis.
I've kept the test only for nonoptimizing compilation. I believe it is
the best solution, since the condition is needed to get sane debug
output anyway adn in optimizing cases it is more probable
that many registers will be ureferenced in optimizing compilation
and because the searching of best class is expensive, we may save some
time.


Tue Jan  4 19:09:45 MET 2000  Jan Hubicka  <hubicka@freesoft.cz>
	* regclass.c (regclass): Do not obey REG_N_REFS in non-optimizing
	compilation.

Index: egcs/gcc/regclass.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/regclass.c,v
retrieving revision 1.86
diff -c -3 -p -r1.86 regclass.c
*** regclass.c	2000/01/04 07:26:08	1.86
--- regclass.c	2000/01/04 18:09:04
*************** regclass (f, nregs, dump)
*** 1141,1147 ****
  	  register int class;
  	  register struct costs *p = &costs[i];
  
! 	  if (!REG_N_REFS (i))
  	    continue;
  
  	  for (class = (int) ALL_REGS - 1; class > 0; class--)
--- 1141,1149 ----
  	  register int class;
  	  register struct costs *p = &costs[i];
  
! 	  /* In non-optimizing compilation REG_N_REFS is not initialized
! 	     yet.  */
! 	  if (optimize && !REG_N_REFS (i))
  	    continue;
  
  	  for (class = (int) ALL_REGS - 1; class > 0; class--)

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