Fix disable-checking bootstrap problem on ppc-darwin

Geoffrey Keating geoffk@apple.com
Tue Aug 10 19:31:00 GMT 2004


On Aug 10, 2004, at 11:26 AM, 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.
>
> The above code snippet is likely done far less often then the operand
> building, so you'd be better off doing it there.  probably :-)
>
> 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...

If you change this code, don't forget to change the similar code that 
computes a hash over the vuses, which is also order-dependent.  (But 
yes, better to sort them when they're created.)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2408 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20040810/c932b9c6/attachment.p7s>


More information about the Gcc-patches mailing list