Modified: trunk/Source/_javascript_Core/ChangeLog (285532 => 285533)
--- trunk/Source/_javascript_Core/ChangeLog 2021-11-09 21:53:02 UTC (rev 285532)
+++ trunk/Source/_javascript_Core/ChangeLog 2021-11-09 21:56:05 UTC (rev 285533)
@@ -1,3 +1,26 @@
+2021-11-09 Robin Morisset <rmoris...@apple.com>
+
+ Using WASM function size as the cap for choosing a register allocator causes performance regressions.
+ https://bugs.webkit.org/show_bug.cgi?id=217290
+ <rdar://problem/69934870>
+
+ Reviewed by Yusuke Suzuki.
+
+ This patch just increases --maximumTmpsForGraphColoring from 25k to 60k.
+
+ It was originally lowered to prevent jetsams in some wasm webpages such as mruby-wasm.aotoki.dev.
+ These jetsams were caused by excessive memory consumption by the interference graphs used by AirAllocateRegistersByGraphColoring and AirAllocateStackByGraphColoring.
+ I massively optimized these interference graphs in the following two patches (effect on mruby-wasm.aotoki.dev):
+ - https://trac.webkit.org/changeset/277714/webkit (262MB + 262MB -> 20MB + 10MB in register allocator)
+ - https://trac.webkit.org/changeset/278186/webkit (221MB + 399MB -> 6.5MB + 10.5MB in stack slot allocator)
+ So it should now be safe to increase --maximumTmpsForGraphColoring.
+
+ It is valuable to increase it, because some webpages such as https://dos.zone/en/play/https%3A%2F%2Fdoszone-uploads.s3.dualstack.eu-central-1.amazonaws.com%2Foriginal%2F2X%2Fb%2Fb4b5275904d86a4ab8a20917b2b7e34f0df47bf7.jsdos see massive performance wins/losses depending on whether we register allocate all of their wasm functions or not.
+ For example that page has two functions with ~54k temporaries, and its integrated benchmark has a score increase from about 27 to about 70 on an M1 MBP 2020 when they are register allocated.
+ External reports suggest that this the performance difference is even larger on older machines (5.5 to 48).
+
+ * runtime/OptionsList.h:
+
2021-11-09 Zan Dobersek <zdober...@igalia.com>
[RISCV64] Add assembly, disassembly infrastructure
Modified: trunk/Source/_javascript_Core/runtime/OptionsList.h (285532 => 285533)
--- trunk/Source/_javascript_Core/runtime/OptionsList.h 2021-11-09 21:53:02 UTC (rev 285532)
+++ trunk/Source/_javascript_Core/runtime/OptionsList.h 2021-11-09 21:56:05 UTC (rev 285533)
@@ -423,7 +423,7 @@
\
v(Bool, logPhaseTimes, false, Normal, nullptr) \
v(Double, rareBlockPenalty, 0.001, Normal, nullptr) \
- v(Unsigned, maximumTmpsForGraphColoring, 25000, Normal, "The maximum number of tmps an Air program can have before always register allocating with Linear Scan") \
+ v(Unsigned, maximumTmpsForGraphColoring, 60000, Normal, "The maximum number of tmps an Air program can have before always register allocating with Linear Scan") \
v(Bool, airLinearScanVerbose, false, Normal, nullptr) \
v(Bool, airLinearScanSpillsEverything, false, Normal, nullptr) \
v(Bool, airForceBriggsAllocator, false, Normal, nullptr) \