On Wed, 19 Jun 2013, Joern Rennecke wrote:

> > I.e. the arguments after your patch are exactly swapped.  This is usually
> > harmless, but not always, so that should be corrected before check in.
> > The change in cselib.c:cselib_invalidate_mem has the same problem.
> 
> Well, I have already committed the patch, so attached is a patch to fix
> things up.


>  int                                                                          
>   
>  anti_dependence (const_rtx mem, const_rtx x)                                 
>   
>  {                                                                            
>   

...

>  int                                                                          
>   
> -canon_anti_dependence (const_rtx mem, enum machine_mode mem_mode,            
>   
> -                      rtx mem_addr, const_rtx x)                             
>   
> +canon_anti_dependence (const_rtx x, enum machine_mode x_mode, rtx x_addr,    
>   
> +                      const_rtx mem, bool mem_canonicalized)                 
>   
 {                                                                              

That's not good.  You now have different order of parameters between 
anti_dependence and canon_anti_dependence.  That will be mightily 
confusing, please instead change the caller.  Currently these predicates 
take their arguments in the order of the corresponding instructions, that 
should better be retained:

true_dependence:  write-then-(depending)read
anti_dependence:  read-then-(clobbering)write
write_dependence: write-then-(clobbering)write

We could change the order of arguments to something else, like first the 
clobber, then the clobbered, but then that should be done for all the 
predicates at the same time (and I would suggest to not do it).


Ciao,
Michael.

Reply via email to