Currently the metal generation pass keeps a HashMap from variable declarations to string. But variable declarations already have a name field which is unused by that point. So we can just reuse it.
Created attachment 375470 [details] Patch
Comment on attachment 375470 [details] Patch Attachment 375470 [details] did not pass win-ews (win): Output: https://webkit-queues.webkit.org/results/12855509 New failing tests: fast/block/float/float-with-anonymous-previous-sibling.html
Created attachment 375476 [details] Archive of layout-test-results from ews212 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews212 Port: win-future Platform: CYGWIN_NT-10.0-17763-3.0.5-338.x86_64-x86_64-64bit
Comment on attachment 375470 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=375470&action=review r=me > Source/WebCore/ChangeLog:9 > + This appears to be a small perf improvement but my system is too noisy to say exactly how much, and the patch is sufficiently simple I don't think it deserves hours of super careful benchmarking. nit: you should say the improvement is expected in WHLSL compile times
Comment on attachment 375470 [details] Patch The windows failure seems completely unrelated (some missing fonts and things like that).
Comment on attachment 375470 [details] Patch Missed the nit.
Created attachment 375553 [details] Patch
Comment on attachment 375553 [details] Patch Rejecting attachment 375553 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-03', 'apply-attachment', '--no-update', '--non-interactive', 375553, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit Logging in as commit-queue@webkit.org... Fetching: https://bugs.webkit.org/attachment.cgi?id=375553&action=edit Fetching: https://bugs.webkit.org/show_bug.cgi?id=200413&ctype=xml&excludefield=attachmentdata Processing 1 patch from 1 bug. Processing patch 375553 from bug 200413. Fetching: https://bugs.webkit.org/attachment.cgi?id=375553 Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit Parsed 2 diffs from patch file(s). patching file Source/WebCore/ChangeLog Hunk #1 succeeded at 1 with fuzz 3. patching file Source/WebCore/Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp Hunk #1 FAILED at 223. Hunk #2 succeeded at 248 (offset -5 lines). Hunk #3 succeeded at 262 (offset -5 lines). Hunk #4 succeeded at 543 (offset -5 lines). Hunk #5 succeeded at 713 (offset -4 lines). 1 out of 5 hunks FAILED -- saving rejects to file Source/WebCore/Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp.rej Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit Full output: https://webkit-queues.webkit.org/results/12865055
https://trac.webkit.org/changeset/248266/webkit is a direct conflict with this patch, solving the same problem in a different way. I think my patch is a tad more space-efficient, but a bit less time-efficient, so I'm dropping it.