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]
Other format: [Raw text]

Re: [PATCH] Load PRE for Array References


On Fri, 2006-03-17 at 11:19 -0700, Jeffrey A Law wrote:
> On Fri, 2006-03-17 at 13:08 -0500, Daniel Berlin wrote:
> > On Fri, 2006-03-17 at 11:10 -0500, Andrew Pinski wrote:
> > > While Looking PR 21485 to figure out a way to fix the code, I changed 
> > > the code
> > > to use array references.  And then I noticed load PRE on the tree level 
> > > was not
> > > happening for them. So I decided to implement it since the 
> > > infrastructure was all
> > > there and Daniel Berlin said he was just lazy to implement it.
> > > 
> > > OK? Bootstrapped and tested on x86_64-linux-gnu twice and 
> > > powerpc-darwin three times
> > > without any regressions.
> > > 
> > > Two of the new testcases are xfailed, one I did not look into why it 
> > > failed, the other
> > > fails because we have:
> > > b[a_1]
> > > if (a_1)
> > >    a_2 = a_1+1;
> > > a_3 = PHI <0, a_2>
> > > b[a_3]
> > > and PRE does not recognize that 0 is the same as a_1, I don't know how 
> > > to fix
> > > this and it might be too hard to fix in general.
> > 
> > Errr, what do you mean "0 is the same as a_1".?
> b[a_1] and b[a_3] are equivalent when a_1 == 0

Yeah, you could teach it this if you gave it the results of value range
propagation, or moved to SCC based value numbering so that it walked
around and determined that a_1 and a_3 are equivalent on the else
branch.

In any case, that's the value numbering side of PRE, not the PRE side of
PRE. :)



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