Re: Predictive commoning leads to register to register moves through memory.

2015-09-25 Thread Richard Biener
an't just compare the MEM_REF offset with q->offset and be done. In fact the MEM_REF offset has no relation to the MEM_ATTR offset so I'm not sure how to make sense of that function. Richard. > Thanks, > Simon > > -Original Message- > From: Richard Biener [mailt

RE: Predictive commoning leads to register to register moves through memory.

2015-09-24 Thread Simon Dardis
t...@gmail.com] Sent: 22 September 2015 12:12 To: Simon Dardis Cc: Jeff Law; gcc@gcc.gnu.org Subject: Re: Predictive commoning leads to register to register moves through memory. On Tue, Sep 22, 2015 at 12:45 PM, Simon Dardis wrote: > I took an attempt at addressing this through the RTL GCSE pass

Re: Predictive commoning leads to register to register moves through memory.

2015-09-22 Thread Richard Biener
On Tue, Sep 22, 2015 at 12:45 PM, Simon Dardis wrote: > I took an attempt at addressing this through the RTL GCSE pass. This attempt > tweaks > mem_attrs_eq_p to return true if its comparing something like poly+8 and MEM > [&poly + 8]. > > Is this a more suitable approach? I actually recently m

RE: Predictive commoning leads to register to register moves through memory.

2015-09-22 Thread Simon Dardis
I took an attempt at addressing this through the RTL GCSE pass. This attempt tweaks mem_attrs_eq_p to return true if its comparing something like poly+8 and MEM [&poly + 8]. Is this a more suitable approach? Thanks, Simon +/* Return true if p and q reference the same location by the same name

Re: Predictive commoning leads to register to register moves through memory.

2015-09-21 Thread Richard Biener
On Fri, Sep 18, 2015 at 5:37 PM, Jeff Law wrote: > On 09/18/2015 03:13 AM, Richard Biener wrote: >> >> On Thu, Sep 17, 2015 at 5:58 PM, Simon Dardis >> wrote: >>> >>> I've since taken another look at this recently and I've tracked the issue >>> down to >>> tree-predcom.c, specifically ref_at_iter

Re: Predictive commoning leads to register to register moves through memory.

2015-09-18 Thread Jeff Law
On 09/18/2015 03:13 AM, Richard Biener wrote: On Thu, Sep 17, 2015 at 5:58 PM, Simon Dardis wrote: I've since taken another look at this recently and I've tracked the issue down to tree-predcom.c, specifically ref_at_iteration almost always generating MEM_REFs. With MEM_REFs, GCC's RTL GCSE ca

Re: Predictive commoning leads to register to register moves through memory.

2015-09-18 Thread Richard Biener
itmp_30 = PHI <_12(6), _36(9)> # T_lsm.8_22 = PHI <_8(6), pretmp_42(9)> poly_I_lsm0.10_38 = poly[1]; _24 = MEM[(double *)&poly + 8B]; beause DOM has a similar issue preventing it from CSEing those two. Richard. > Thanks, > Simon > > -Original Message- > F

RE: Predictive commoning leads to register to register moves through memory.

2015-09-17 Thread Simon Dardis
testing. Thanks, Simon -Original Message- From: Richard Biener [mailto:richard.guent...@gmail.com] Sent: 31 August 2015 11:40 To: Jeff Law Cc: Simon Dardis; gcc@gcc.gnu.org Subject: Re: Predictive commoning leads to register to register moves through memory. On Fri, Aug 28, 2015 at 5:48

Re: Predictive commoning leads to register to register moves through memory.

2015-08-31 Thread Richard Biener
On Fri, Aug 28, 2015 at 5:48 PM, Jeff Law wrote: > On 08/28/2015 09:43 AM, Simon Dardis wrote: > >> Following Jeff's advice[1] to extract more information from GCC, I've >> narrowed the cause down to the predictive commoning pass inserting >> the load in a loop header style basic block. However, t

Re: Predictive commoning leads to register to register moves through memory.

2015-08-28 Thread Jeff Law
On 08/28/2015 09:43 AM, Simon Dardis wrote: Following Jeff's advice[1] to extract more information from GCC, I've narrowed the cause down to the predictive commoning pass inserting the load in a loop header style basic block. However, the next pass in GCC, tree-cunroll promptly removes the loop