Fix disable-checking bootstrap problem on ppc-darwin

Daniel Berlin dberlin@dberlin.org
Tue Aug 10 19:33:00 GMT 2004


On Aug 10, 2004, at 2:26 PM, Andrew MacLeod wrote:

> On Tue, 2004-08-10 at 14:12, Daniel Berlin wrote:
>>
>> On Aug 10, 2004, at 1:56 PM, Geoffrey Keating wrote:
>>
>>
>>> +
>>> +  for (i = 0; i < NUM_VUSES (ve1->vuses); i++)
>>> +    if (! expressions_equal_p (VUSE_OP (ve1->vuses, i),
>>> +			       VUSE_OP (ve2->vuses, i)))
>>> +      return false;
>>>
>>
>> My only concern is here:
>> Diego, are the vuse lists sorted, such that we can simply compare them
>> in order and get the right result for equality testing?
>> If not, can we make them so, so that we can do something like the 
>> above?
>>
>
> They aren't sorted.
> Some stmts can have a lot of vuses, and since the
> virtual operands are rebuilt every time the stmt is modified, you might
> see some unpleasant time increases as we sort these over and over.
>
Sigh.
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.

Geoff, how often do these hash values conflict, and what is the number 
of vops on each statement when it happens.
If it's 2 or less, i'd probably just hand code the comparisons for the 
1 and 2 cases, and then sort and compare if vops is >3
or something.

> 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?
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)

>
> Andrew
>



More information about the Gcc-patches mailing list