RESOLVED FIXED 169820
Air should coalesce spill slots
https://bugs.webkit.org/show_bug.cgi?id=169820
Summary Air should coalesce spill slots
Filip Pizlo
Reported 2017-03-17 11:04:19 PDT
Patch forthcoming.
Attachments
work in progress (6.97 KB, patch)
2017-03-17 11:05 PDT, Filip Pizlo
no flags
it coalesced some spills (15.45 KB, patch)
2017-03-17 14:27 PDT, Filip Pizlo
no flags
HUGE speed-up (15.44 KB, patch)
2017-03-17 16:02 PDT, Filip Pizlo
no flags
the patch (22.20 KB, patch)
2017-03-17 19:36 PDT, Filip Pizlo
buildbot: commit-queue-
Archive of layout-test-results from ews114 for mac-elcapitan (1.92 MB, application/zip)
2017-03-17 21:09 PDT, Build Bot
no flags
the patch (23.06 KB, patch)
2017-03-17 22:16 PDT, Filip Pizlo
no flags
the patch (24.80 KB, patch)
2017-03-19 15:26 PDT, Filip Pizlo
no flags
Filip Pizlo
Comment 1 2017-03-17 11:05:38 PDT
Created attachment 304798 [details] work in progress
Filip Pizlo
Comment 2 2017-03-17 14:27:18 PDT
Created attachment 304824 [details] it coalesced some spills Still trying to figure out if it works for reals.
Filip Pizlo
Comment 3 2017-03-17 16:02:55 PDT
Created attachment 304832 [details] HUGE speed-up But it still fails some internal tests.
Filip Pizlo
Comment 4 2017-03-17 19:36:47 PDT
Created attachment 304848 [details] the patch
Build Bot
Comment 5 2017-03-17 21:09:29 PDT
Comment on attachment 304848 [details] the patch Attachment 304848 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/3353666 Number of test failures exceeded the failure limit.
Build Bot
Comment 6 2017-03-17 21:09:34 PDT
Created attachment 304858 [details] Archive of layout-test-results from ews114 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews114 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Filip Pizlo
Comment 7 2017-03-17 21:14:04 PDT
(In reply to comment #6) > Created attachment 304858 [details] > Archive of layout-test-results from ews114 for mac-elcapitan > > The attached test failures were seen while running run-webkit-tests on the > mac-debug-ews. > Bot: ews114 Port: mac-elcapitan Platform: Mac OS X 10.11.6 The fix is to remove the assertion. Testing this now...
Filip Pizlo
Comment 8 2017-03-17 22:16:11 PDT
Created attachment 304862 [details] the patch Should pass debug tests now.
Filip Pizlo
Comment 9 2017-03-19 15:26:15 PDT
Created attachment 304903 [details] the patch This fixes the compile time regression. At first I thought that was because coalescing was expensive, but then I found that it was simply because I introduced a bug into padInterference. It was inserting padding Nops all over the place like crazy!
Michael Saboff
Comment 10 2017-03-20 11:29:58 PDT
Comment on attachment 304903 [details] the patch r=me
WebKit Commit Bot
Comment 11 2017-03-20 11:59:03 PDT
Comment on attachment 304903 [details] the patch Clearing flags on attachment: 304903 Committed r214187: <http://trac.webkit.org/changeset/214187>
WebKit Commit Bot
Comment 12 2017-03-20 11:59:09 PDT
All reviewed patches have been landed. Closing bug.
Saam Barati
Comment 13 2017-03-22 18:33:52 PDT
Comment on attachment 304903 [details] the patch View in context: https://bugs.webkit.org/attachment.cgi?id=304903&action=review LGTM too > Source/JavaScriptCore/b3/air/AirAllocateStack.cpp:215 > + Vector<CoalescableMove> coalescableMoves; Style nit: I would have called this something like coalescingCandidates or something to indicate that not every move in the vector is truly coalescable.
Filip Pizlo
Comment 14 2017-03-25 11:10:36 PDT
(In reply to Saam Barati from comment #13) > Comment on attachment 304903 [details] > the patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=304903&action=review > > LGTM too > > > Source/JavaScriptCore/b3/air/AirAllocateStack.cpp:215 > > + Vector<CoalescableMove> coalescableMoves; > > Style nit: I would have called this something like coalescingCandidates or > something to indicate that not every move in the vector is truly coalescable. I think of the three-operand move instructions that this patch introduces as coalescable moves, because you have to use these kinds of moves if you want to make two spill slots coalescable. I don't want to call these instucctions coalescing candidates. A pair of tmps or spill slots is a coalescing candidate. An instruction is not a coalescing candidate because we're not coalescing instructions. This data structure does not track pairs of spill slots as much as it tracks actual move instructions (because in addition to the pair of spill slots it tracks the frequency of that instruction). This makes me realize that this data structure should have the total frequency of all moves for a pair of spill slots. That would be more precise. If I make that change, then this data structure would no longer have the word "moves" in it because it would no longer track individual moves. But for now the name seems accurate.
Note You need to log in before you can comment on or make changes to this bug.