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

2015-09-25 Thread Richard Biener
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 [mailto:richard.guent...@gma

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

2015-09-24 Thread Simon Dardis
tember 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 <simon.dar...@imgtec.com> wrote: > I took an attempt at addressing this through the RTL GCSE pa

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 [ + 8]. Is this a more suitable approach? Thanks, Simon +/* Return true if p and q reference the same location by the same name but

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 > [ + 8]. > > Is this a more suitable approach?

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

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

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

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

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

2015-09-17 Thread Simon Dardis
ks, 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 PM, Jeff Law

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

Predictive commoning leads to register to register moves through memory.

2015-08-28 Thread Simon Dardis
Hello all, I've been looking at a code generation issue with GCC 5.2 lately dealing with register to register moves through memory with -O3 -funroll-loops. For reference the C code is at the end of this mail. The generated code for mips is (cut down for clarity, ldc1 and sdc1 are double word

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