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

Attachment: smime.p7s
Description: S/MIME cryptographic signature


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