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: apply_change_group optimization


>     > object at the start of the loop ("If there is no object to test or if it
>     > is the same as the one we already tested, ignore it.").
> 
> I was hoping you'd add that text as a comment ...
> 
>         if (GET_CODE (object) == MEM)
>   	{
>   	  if (! memory_address_p (GET_MODE (object), XEXP (object, 0)))
>   	    break;
> + 	  last_validated = object;
>   	}
> 
> Is that still needed?
Oops. Sorry - I sometimes need quite a lot of time to wake up.

Mon May 14 16:19:10 CEST 2001  Jan Hubicka  <jh@suse.cz>

	* recog.c (apply_change_group): Avoid unneeded validating.

Index: recog.c
===================================================================
RCS file: /home/cvs/Repository/gcc/gcc/recog.c,v
retrieving revision 1.8
diff -c -3 -p -r1.8 recog.c
*** recog.c	2001/05/03 15:57:43	1.8
--- recog.c	2001/05/15 10:23:40
*************** int
*** 314,319 ****
--- 314,320 ----
  apply_change_group ()
  {
    int i;
+   rtx last_validated = NULL_RTX;
  
    /* The changes have been applied and all INSN_CODEs have been reset to force
       rerecognition.
*************** apply_change_group ()
*** 328,334 ****
      {
        rtx object = changes[i].object;
  
!       if (object == 0)
  	continue;
  
        if (GET_CODE (object) == MEM)
--- 329,337 ----
      {
        rtx object = changes[i].object;
  
!       /* if there is no object to test or if it is the same as the one we
!          already tested, ignore it.  */
!       if (object == 0 || object == last_validated)
  	continue;
  
        if (GET_CODE (object) == MEM)
*************** apply_change_group ()
*** 374,379 ****
--- 377,383 ----
  		  but this shouldn't occur.  */
  
  	       validate_change (object, &PATTERN (object), newpat, 1);
+ 	       continue;
  	     }
  	  else if (GET_CODE (pat) == USE || GET_CODE (pat) == CLOBBER)
  	    /* If this insn is a CLOBBER or USE, it is always valid, but is
*************** apply_change_group ()
*** 382,387 ****
--- 386,392 ----
  	  else
  	    break;
  	}
+       last_validated = object;
      }
  
    if (i == num_changes)


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