Your change breaks MIPS.

Jan Hubicka jh@suse.cz
Thu Jan 3 06:06:00 GMT 2002


> On Sun, Dec 30, 2001 at 12:44:31AM +0100, Jan Hubicka wrote:
> > >  > BTW, am I the only one seeing bootstrap failure on mips?
> > >  > Thanks.
> > >  > H.J.
> > > 
> > > No, I see it also on irix6.2.
> > I got it now too.  I hoped the problem to be cc0 issue related to jump threading,
> > but jump threading code appears to handle cc0 conservatively - in fact disable wast
> > majority of threading - I need to fix that separately.
> > 
> > Does someone have simplified testcase or can reproduce similar breakage on other target?
> > 
> 
> I am testing this patch on mips now. I don't know it will solve the
> mips bootstrap problem. But Jan, I blieve you really meant
> 
>   cleanup_cfg ((optimize ? CLEANUP_EXPENSIVE : 0)
> 	       | (flag_thread_jumps ? CLEANUP_THREADING : 0));
Yes, I did. Thanks for catching that!
if I read that properly, without the parenthesis and optimize set it should
not do any threading, but it definitly does - I need to check.
> 
> Please note | has a higher precedence than ?:.
> 
> 
> H.J.
> ---
> 2002-01-02  H.J. Lu <hjl@gnu.org>
> 
> 	* cfgcleanup.c: Include "tm_p.h".
> 	(mark_effect): Handle hard registers.
> 
> 	* toplev.c (rest_of_compilation): Fix a typo when calling
> 	cleanup_cfg.
> 
> --- gcc/cfgcleanup.c.bad	Wed Jan  2 13:54:51 2002
> +++ gcc/cfgcleanup.c	Wed Jan  2 16:47:56 2002
> @@ -43,6 +43,7 @@ Software Foundation, 59 Temple Place - S
>  #include "recog.h"
>  #include "toplev.h"
>  #include "cselib.h"
> +#include "tm_p.h"
>  
>  #include "obstack.h"
>  
> @@ -188,6 +189,8 @@ mark_effect (exp, nonequal)
>    rtx exp;
>    regset nonequal;
>  {
> +  int regno;
> +
>    switch (GET_CODE (exp))
>      {
>        /* In case we do clobber the register, mark it as equal, as we know the
> @@ -201,7 +204,14 @@ mark_effect (exp, nonequal)
>  	  return false;
>  	if (GET_CODE (SET_SRC (exp)) != REG)
>  	  return true;
> -	SET_REGNO_REG_SET (nonequal, REGNO (SET_SRC (exp)));
> +	regno = REGNO (SET_SRC (exp));
> +	SET_REGNO_REG_SET (nonequal, regno);
> +	if (regno < FIRST_PSEUDO_REGISTER)
> +	  {
> +	    int n = HARD_REGNO_NREGS (regno, GET_MODE (SET_SRC (exp)));
> +	    while (--n > 0)
> +	      SET_REGNO_REG_SET (nonequal, regno + n);
> +	  }
Uhm... I was catching this over an hour today... Silly me! and thanks
a lot for investigation!

I will re-start my MIPS bootstrap now!

Honza



More information about the Gcc-patches mailing list