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: Fix disable-checking bootstrap problem on ppc-darwin


On Tue, 2004-08-10 at 14:47, Daniel Berlin wrote:
> 
> On Aug 10, 2004, at 2:26 PM, Andrew MacLeod wrote:

> I forgot they were rebuilt continuously.
> > The above code snippet is likely done far less often then the operand
> > building, so you'd be better off doing it there.  probably :-)
> >
> Interesting, DOM does the same thing as the snippet above, so it has 
> the same issue.

If there is only one variable in the stmt which isnt ssa-renamed, I
suspect the vuses will get inserted in the same order.  I also suspect
its only when there is more than one symbol in the stmt that they may
not be in the same order, and even then, probably only when the
variables are encountered in a different order in the stmt.

ie

  a + b

will insert all the vuses for 'a' then all the vuses for 'b'. anywhere
you see 'a + b' they should be inserted in the same order. 'b + a' would
result in a different order, as would 'c + a + b'

M+uch of the time this will likely work anyway as it is.


> > That being said, I will look into sorting them, since there might be an
> > opportunity to do that cheaply with some of the new operand work I have
> > in progress... I might be able to offset the cost of sorting them 
> > during
> > insertion with some lookups that need to be done...
> 
> Do we ever actually look to see if a vuse has a given operand by 
> pointer value?

which pointer value?  vuses are stored as trees, so two different vuses
will have different addresses, but contain the same SSA_NAME tree value.

> A quick grep shows we might do it in a few places.
> Dunno if binary searching them would actually improve speed for GCC.  I 
> doubt it.
> 
> If you are planning to ever move vuses/vdefs into a vec.h vector, i've 
> got a vec_lower_bound and vec_binary_search i'm going to contribute 
> soon (I use them to keep a vec in sorted order, obviously :P)
> 

nope, not planning too.

As they are being built up, I can simply build them sorted. I might
actually get the time required to do this back when it comes to
eliminating duplicates and redundant VUSEs before the final operand
vectors are created. (redundant VUSES are those symbols which also have
V_MAY_DEFS). There are loops which could then be exited early.

we'll see. I need get that operand patch verified and checked in before
I can try that.

Anrew


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