RESOLVED FIXED Bug 161638
GetMapBucket node should speculate on the type of its 'key' child
https://bugs.webkit.org/show_bug.cgi?id=161638
Summary GetMapBucket node should speculate on the type of its 'key' child
Saam Barati
Reported 2016-09-06 12:13:59 PDT
We may already have proved the types of the incoming key into the GetMapBucket node, so we should take advantage of this. Currently, we emit runtime checks for types, however, we could probably emit a less branchy loop if we know what the type of the incoming key is.
Attachments
patch (16.97 KB, patch)
2016-10-03 16:10 PDT, Saam Barati
fpizlo: review+
patch for landing (16.76 KB, patch)
2016-10-03 17:03 PDT, Saam Barati
no flags
Saam Barati
Comment 1 2016-09-30 18:01:16 PDT
Looks like this is worth 2-3% on ES6SampleBench/Basic.
Saam Barati
Comment 2 2016-10-03 16:10:03 PDT
Filip Pizlo
Comment 3 2016-10-03 16:17:30 PDT
Comment on attachment 290532 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=290532&action=review > Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:6606 > + m_out.insertNewBlocksBefore(notBitEqual); It's scary to me that you're not capturing the return value here and resetting it... > Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:6648 > + m_out.appendTo(bucketKeyIsInt32, loopAround); ... down here. Any reason why you don't do that?
Filip Pizlo
Comment 4 2016-10-03 16:26:40 PDT
Comment on attachment 290532 [details] patch I think that aside from that minor thing, this code is right.
Saam Barati
Comment 5 2016-10-03 17:03:09 PDT
Created attachment 290537 [details] patch for landing
Filip Pizlo
Comment 6 2016-10-03 17:08:29 PDT
Comment on attachment 290537 [details] patch for landing View in context: https://bugs.webkit.org/attachment.cgi?id=290537&action=review > Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:6612 > + m_out.appendTo(notBitEqual, bucketKeyIsCell); This order: notBitEqual -> bucketKeyIsCell is inconsistent with the order of allocation, above: notBitEqual -> bucketKeyNotCell -> bucketKeyIsCell I think that might confuse Output, at worst leading to a wonky block order.
Saam Barati
Comment 7 2016-10-03 17:25:24 PDT
Comment on attachment 290537 [details] patch for landing View in context: https://bugs.webkit.org/attachment.cgi?id=290537&action=review >> Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:6612 >> + m_out.appendTo(notBitEqual, bucketKeyIsCell); > > This order: notBitEqual -> bucketKeyIsCell > > is inconsistent with the order of allocation, above: > > notBitEqual -> bucketKeyNotCell -> bucketKeyIsCell > > I think that might confuse Output, at worst leading to a wonky block order. Ok. I'll re-order the allocations. Good catch.
Saam Barati
Comment 8 2016-10-03 17:38:56 PDT
Note You need to log in before you can comment on or make changes to this bug.