Modified: trunk/Source/_javascript_Core/ChangeLog (281177 => 281178)
--- trunk/Source/_javascript_Core/ChangeLog 2021-08-18 02:20:25 UTC (rev 281177)
+++ trunk/Source/_javascript_Core/ChangeLog 2021-08-18 02:27:03 UTC (rev 281178)
@@ -1,3 +1,21 @@
+2021-08-17 Saam Barati <[email protected]>
+
+ Add an option for canonicalizePrePostIncrements
+ https://bugs.webkit.org/show_bug.cgi?id=229211
+ <rdar://problem/82050126>
+
+ Reviewed by Mark Lam.
+
+ The current phase has bugs. Let's disable it for now until the bugs
+ are fixed. See discussion about the bugs I spotted in:
+ https://bugs.webkit.org/show_bug.cgi?id=228538
+
+ * b3/B3Generate.cpp:
+ (JSC::B3::generateToAir):
+ * b3/testb3_3.cpp:
+ (addShrTests):
+ * runtime/OptionsList.h:
+
2021-08-16 Mark Lam <[email protected]>
Ensure that unused LLInt opcodes are not inadvertently used.
Modified: trunk/Source/_javascript_Core/b3/B3Generate.cpp (281177 => 281178)
--- trunk/Source/_javascript_Core/b3/B3Generate.cpp 2021-08-18 02:20:25 UTC (rev 281177)
+++ trunk/Source/_javascript_Core/b3/B3Generate.cpp 2021-08-18 02:27:03 UTC (rev 281178)
@@ -118,7 +118,7 @@
lowerMacrosAfterOptimizations(procedure);
legalizeMemoryOffsets(procedure);
moveConstants(procedure);
- if (procedure.optLevel() >= 2)
+ if (Options::useB3CanonicalizePrePostIncrements() && procedure.optLevel() >= 2)
canonicalizePrePostIncrements(procedure);
eliminateDeadCode(procedure);
Modified: trunk/Source/_javascript_Core/b3/testb3_3.cpp (281177 => 281178)
--- trunk/Source/_javascript_Core/b3/testb3_3.cpp 2021-08-18 02:20:25 UTC (rev 281177)
+++ trunk/Source/_javascript_Core/b3/testb3_3.cpp 2021-08-18 02:27:03 UTC (rev 281178)
@@ -4097,15 +4097,17 @@
RUN(testZShrArgImm32(0xffffffff, 1));
RUN(testZShrArgImm32(0xffffffff, 63));
- RUN(testLoadPreIndex32());
- RUN(testLoadPreIndex64());
- RUN(testLoadPostIndex32());
- RUN(testLoadPostIndex64());
+ if (Options::useB3CanonicalizePrePostIncrements()) {
+ RUN(testLoadPreIndex32());
+ RUN(testLoadPreIndex64());
+ RUN(testLoadPostIndex32());
+ RUN(testLoadPostIndex64());
- RUN(testStorePreIndex32());
- RUN(testStorePreIndex64());
- RUN(testStorePostIndex32());
- RUN(testStorePostIndex64());
+ RUN(testStorePreIndex32());
+ RUN(testStorePreIndex64());
+ RUN(testStorePostIndex32());
+ RUN(testStorePostIndex64());
+ }
}
#endif // ENABLE(B3_JIT)
Modified: trunk/Source/_javascript_Core/runtime/OptionsList.h (281177 => 281178)
--- trunk/Source/_javascript_Core/runtime/OptionsList.h 2021-08-18 02:20:25 UTC (rev 281177)
+++ trunk/Source/_javascript_Core/runtime/OptionsList.h 2021-08-18 02:27:03 UTC (rev 281178)
@@ -437,6 +437,7 @@
v(Unsigned, maxB3TailDupBlockSize, 3, Normal, nullptr) \
v(Unsigned, maxB3TailDupBlockSuccessors, 3, Normal, nullptr) \
v(Bool, useB3HoistLoopInvariantValues, false, Normal, nullptr) \
+ v(Bool, useB3CanonicalizePrePostIncrements, false, Normal, nullptr) \
\
v(Bool, useDollarVM, false, Restricted, "installs the $vm debugging tool in global objects") \
v(OptionString, functionOverrides, nullptr, Restricted, "file with debugging overrides for function bodies") \