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: [patches] Fix for latent twolf spec2000 test failures II


> On Fri, Aug 03, 2001 at 10:27:46PM +0200, Jan Hubicka wrote:
> > No, I was keeping in my mind that there is function to remove notes
> > but then somehow jumped to assumption that it isn't
> 
> It isn't what?
I just wasn't able to figure out how the hell remove_note is called :)
(it was about 3:00 morning after spending half a day and night by localizing
the twolf problem.  It is tricky to localize problem caused in 8000 lines
long function.  The problem has been triggered only when unreachable loop
was present (that loop changed gcse decision), that drove me to wrong
conclusion that the loop is buggy).

Can be such patch candidate for 3.0? The twolf failure appears and disappears
for few gcc releases (egcs1.2 was first I remember to fail), so it must
be causing problem for few years now.
Unfortunately 3.0 is the case where bug is mood, as it requires crossjumping
to work in that particular testcase and crossjumping is dead.
> 
> > OK With remove note there?
> 
> Post the patch.
Here it comes.  OK assuming it passes?

Pá srp  3 16:34:53 CEST 2001  Jan Hubicka  <jh@suse.cz>

	* loop.c (try_copy_prop); Kill invalidated REG_EQUAL notes.

*** loop.c.old	Fri Aug  3 14:31:40 2001
--- loop.c	Fri Aug  3 23:50:51 2001
*************** try_copy_prop (loop, replacement, regno)
*** 9306,9312 ****
  	  arg.set_seen = 0;
  	  note_stores (PATTERN (insn), note_reg_stored, &arg);
  	  if (arg.set_seen)
! 	    break;
  	}
      }
    if (! init_insn)
--- 9291,9306 ----
  	  arg.set_seen = 0;
  	  note_stores (PATTERN (insn), note_reg_stored, &arg);
  	  if (arg.set_seen)
! 	    {
! 	      rtx note = find_reg_note (insn, REG_EQUAL, NULL);
! 
! 	      /* It is possible that we've turned previously valid REG_EQUAL to
! 	         invalid, as we change the REGNO to REPLACEMENT and unlike REGNO,
! 	         REPLACEMENT is modified, we get different meaning.  */
! 	      if (note && reg_mentioned_p (replacement, XEXP (note, 0)))
! 		remove_note (insn, note);
! 	      break;
! 	    }
  	}
      }
    if (! init_insn)


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