RFA: Fix rtl-optimization/57425

Joern Rennecke joern.rennecke@embecosm.com
Sun Jun 16 12:11:00 GMT 2013


Quoting Eric Botcazou <ebotcazou@adacore.com>:

> The patch is OK on principle but I think that we should use the same  
>  interface
> for write_dependence_p as for true_dependence_1, i.e. add a mem_mode  
>  parameter
> instead of a mem_size and add both mem_addr and mem_canonicalized (and since
> it doesn't seem that we need x_addr for now, let's set it aside).    
> Btw I agree
> that the interface is probably not optimal, but it has been there   
> for a while.


Well, I see some merit in the way true_dependence_1 does it with regards to
the opportunities that this allows function cloning / specialization, it
just thought that the tiny speed benefit it could bring to write_dependence_p
didn't justify the extra code and churn to have this - or an enum parameter
to distinguish the three cases.  Using DEP_ANTI / DEP_OUTPUT from sched-int.h
would mean unwanted dependencies, so it'd be a new ad-hoc enum... .

OK, so if we go with consistency with a bool mem_canonicalized, I suppose
I should also make writep bool, i.e.:

static int
write_dependence_p (const_rtx mem, unsigned mem_size, rtx canon_mem_addr,
                     const_rtx x, bool mem_canonicalized, bool writep)



More information about the Gcc-patches mailing list