Title: [242865] releases/WebKitGTK/webkit-2.24
- Revision
- 242865
- Author
- [email protected]
- Date
- 2019-03-13 02:24:50 -0700 (Wed, 13 Mar 2019)
Log Message
Merge r242276 - DFG: Loop-invariant code motion (LICM) should not hoist dead code
https://bugs.webkit.org/show_bug.cgi?id=194945
<rdar://problem/48311657>
Reviewed by Saam Barati.
* dfg/DFGLICMPhase.cpp:
(JSC::DFG::LICMPhase::run):
Modified Paths
Added Paths
Diff
Modified: releases/WebKitGTK/webkit-2.24/JSTests/ChangeLog (242864 => 242865)
--- releases/WebKitGTK/webkit-2.24/JSTests/ChangeLog 2019-03-13 08:55:01 UTC (rev 242864)
+++ releases/WebKitGTK/webkit-2.24/JSTests/ChangeLog 2019-03-13 09:24:50 UTC (rev 242865)
@@ -56,6 +56,16 @@
Added a test and a microbenchmark for corner cases of
Array.prototype.join() with an uninitialized array.
+2019-02-27 Robin Morisset <[email protected]>
+
+ DFG: Loop-invariant code motion (LICM) should not hoist dead code
+ https://bugs.webkit.org/show_bug.cgi?id=194945
+ <rdar://problem/48311657>
+
+ Reviewed by Mark Lam.
+
+ * stress/licm-dead-code.js: Added.
+
* microbenchmarks/array-prototype-join-uninitialized.js: Added.
* stress/array-prototype-join-uninitialized.js: Added.
(testArray):
Added: releases/WebKitGTK/webkit-2.24/JSTests/stress/licm-dead-code.js (0 => 242865)
--- releases/WebKitGTK/webkit-2.24/JSTests/stress/licm-dead-code.js (rev 0)
+++ releases/WebKitGTK/webkit-2.24/JSTests/stress/licm-dead-code.js 2019-03-13 09:24:50 UTC (rev 242865)
@@ -0,0 +1,22 @@
+for (let i = 0; i < 1000; i++) {
+}
+for (let i = 0; i < 10; ++i) {
+ function foo() {
+ for (let j = 0; j < 3; j = j + "asdf") {
+ const cond = Error != Error;
+ if (!cond) {
+ 42[0];
+ }
+
+ function bar(arg) {
+ return arg.baz = 42;
+ }
+ for (let k = 0; k < 10000; ++k) {
+ bar({}, ...arguments);
+ }
+ }
+ for (let j = 0; j < 1000000; ++j) {}
+ }
+ foo();
+}
+
Modified: releases/WebKitGTK/webkit-2.24/Source/_javascript_Core/ChangeLog (242864 => 242865)
--- releases/WebKitGTK/webkit-2.24/Source/_javascript_Core/ChangeLog 2019-03-13 08:55:01 UTC (rev 242864)
+++ releases/WebKitGTK/webkit-2.24/Source/_javascript_Core/ChangeLog 2019-03-13 09:24:50 UTC (rev 242865)
@@ -415,6 +415,17 @@
* runtime/JSScriptFetcher.h:
* runtime/JSString.h:
* runtime/NativeExecutable.cpp:
+2019-02-27 Robin Morisset <[email protected]>
+
+ DFG: Loop-invariant code motion (LICM) should not hoist dead code
+ https://bugs.webkit.org/show_bug.cgi?id=194945
+ <rdar://problem/48311657>
+
+ Reviewed by Saam Barati.
+
+ * dfg/DFGLICMPhase.cpp:
+ (JSC::DFG::LICMPhase::run):
+
(JSC::NativeExecutable::hashFor const):
* runtime/NativeExecutable.h:
* runtime/Options.h:
Modified: releases/WebKitGTK/webkit-2.24/Source/_javascript_Core/dfg/DFGLICMPhase.cpp (242864 => 242865)
--- releases/WebKitGTK/webkit-2.24/Source/_javascript_Core/dfg/DFGLICMPhase.cpp 2019-03-13 08:55:01 UTC (rev 242864)
+++ releases/WebKitGTK/webkit-2.24/Source/_javascript_Core/dfg/DFGLICMPhase.cpp 2019-03-13 09:24:50 UTC (rev 242865)
@@ -184,6 +184,9 @@
Vector<const NaturalLoop*> loopStack;
bool changed = false;
for (BasicBlock* block : m_graph.blocksInPreOrder()) {
+ if (!block->cfaHasVisited)
+ continue;
+
const NaturalLoop* loop = m_graph.m_ssaNaturalLoops->innerMostLoopOf(block);
if (!loop)
continue;
@@ -210,6 +213,8 @@
for (unsigned nodeIndex = 0; nodeIndex < block->size(); ++nodeIndex) {
Node*& nodeRef = block->at(nodeIndex);
+ if (nodeRef->op() == ForceOSRExit)
+ break;
for (unsigned stackIndex = loopStack.size(); stackIndex--;)
changed |= attemptHoist(block, nodeRef, loopStack[stackIndex]);
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes