RESOLVED FIXED Bug 82656
DFG should optimize a==b for a being an object and b being either an object or null/undefined, and vice versa
https://bugs.webkit.org/show_bug.cgi?id=82656
Summary DFG should optimize a==b for a being an object and b being either an object o...
Filip Pizlo
Reported 2012-03-29 14:18:16 PDT
V8-raytrace does this. I figure others might want to do that as well, since it seems like a sensible thing to do. This bug doesn't extend to going all out and optimizing the case where in a==b both a and b can be either null or object, since I don't yet have evidence that there are enough hot spots in the code out there that do that. Patch forthcoming.
Attachments
work in progress (21.89 KB, patch)
2012-03-29 14:24 PDT, Filip Pizlo
webkit-ews: commit-queue-
the patch (29.56 KB, patch)
2012-03-29 18:34 PDT, Filip Pizlo
oliver: review+
Filip Pizlo
Comment 1 2012-03-29 14:24:45 PDT
Created attachment 134666 [details] work in progress Almost done, but still need to do 32-bit and run some more tests. Putting up for EWS to see that my 64-bit code doesn't make non-Mac ports sad.
Early Warning System Bot
Comment 2 2012-03-29 15:17:35 PDT
Comment on attachment 134666 [details] work in progress Attachment 134666 [details] did not pass qt-wk2-ews (qt): Output: http://queues.webkit.org/results/12194493
Early Warning System Bot
Comment 3 2012-03-29 15:23:43 PDT
Comment on attachment 134666 [details] work in progress Attachment 134666 [details] did not pass qt-ews (qt): Output: http://queues.webkit.org/results/12212042
Gustavo Noronha (kov)
Comment 4 2012-03-29 16:13:09 PDT
Comment on attachment 134666 [details] work in progress Attachment 134666 [details] did not pass gtk-ews (gtk): Output: http://queues.webkit.org/results/12206020
Filip Pizlo
Comment 5 2012-03-29 18:34:08 PDT
Created attachment 134708 [details] the patch It appears to work now.
Oliver Hunt
Comment 6 2012-03-29 18:54:09 PDT
Comment on attachment 134708 [details] the patch CompareEq should always predict bool shouldn't it? It would seem easier to just do a single forNode(nodeIndex).set(PredictBoolean); in the AbstractState logic for it? r=me
Filip Pizlo
Comment 7 2012-03-29 19:05:59 PDT
(In reply to comment #6) > (From update of attachment 134708 [details]) > CompareEq should always predict bool shouldn't it? It would seem easier to just do a single forNode(nodeIndex).set(PredictBoolean); in the AbstractState logic for it? You might have a point there. ;-) I will make the change that you speak of.
Filip Pizlo
Comment 8 2012-03-30 19:27:17 PDT
Note You need to log in before you can comment on or make changes to this bug.