Title: [242855] branches/safari-607-branch
- Revision
- 242855
- Author
- [email protected]
- Date
- 2019-03-13 01:24:31 -0700 (Wed, 13 Mar 2019)
Log Message
Cherry-pick r242276. rdar://problem/48839389
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):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242276 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Added Paths
Diff
Modified: branches/safari-607-branch/JSTests/ChangeLog (242854 => 242855)
--- branches/safari-607-branch/JSTests/ChangeLog 2019-03-13 08:24:29 UTC (rev 242854)
+++ branches/safari-607-branch/JSTests/ChangeLog 2019-03-13 08:24:31 UTC (rev 242855)
@@ -1,40 +1,57 @@
2019-03-13 Babak Shafiei <[email protected]>
- Cherry-pick r242114. rdar://problem/48839372
+ Cherry-pick r242276. rdar://problem/48839389
- wasmToJS() should purify incoming NaNs.
- https://bugs.webkit.org/show_bug.cgi?id=194807
- <rdar://problem/48189132>
+ 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.
- JSTests:
+ * dfg/DFGLICMPhase.cpp:
+ (JSC::DFG::LICMPhase::run):
- * wasm/regress/wasmToJS-should-purify-NaNs.js: Added.
- Source/_javascript_Core:
- * runtime/JSCJSValue.h:
- (JSC::jsNumber):
- * runtime/TypedArrayAdaptors.h:
- (JSC::IntegralTypedArrayAdaptor::toJSValue):
- * wasm/js/WasmToJS.cpp:
- (JSC::Wasm::wasmToJS):
-
-
-
- git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242114 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242276 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- 2019-02-26 Mark Lam <[email protected]>
+ 2019-03-13 Babak Shafiei <[email protected]>
- wasmToJS() should purify incoming NaNs.
- https://bugs.webkit.org/show_bug.cgi?id=194807
- <rdar://problem/48189132>
+ Cherry-pick r242114. rdar://problem/48839372
- Reviewed by Saam Barati.
+ wasmToJS() should purify incoming NaNs.
+ https://bugs.webkit.org/show_bug.cgi?id=194807
+ <rdar://problem/48189132>
- * wasm/regress/wasmToJS-should-purify-NaNs.js: Added.
+ Reviewed by Saam Barati.
+ JSTests:
+
+ * wasm/regress/wasmToJS-should-purify-NaNs.js: Added.
+
+ Source/_javascript_Core:
+
+ * runtime/JSCJSValue.h:
+ (JSC::jsNumber):
+ * runtime/TypedArrayAdaptors.h:
+ (JSC::IntegralTypedArrayAdaptor::toJSValue):
+ * wasm/js/WasmToJS.cpp:
+ (JSC::Wasm::wasmToJS):
+
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242114 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2019-02-26 Mark Lam <[email protected]>
+
+ wasmToJS() should purify incoming NaNs.
+ https://bugs.webkit.org/show_bug.cgi?id=194807
+ <rdar://problem/48189132>
+
+ Reviewed by Saam Barati.
+
+ * wasm/regress/wasmToJS-should-purify-NaNs.js: Added.
+
2019-03-13 Babak Shafiei <[email protected]>
Cherry-pick r241615. rdar://problem/48839366
@@ -56,6 +73,16 @@
Ditto for TypeSet::toJSONString() and TypeSet::toJSONString().
+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.
+
* runtime/SamplingProfiler.cpp:
(JSC::SamplingProfiler::stackTracesAsJSON):
* runtime/TypeSet.cpp:
Added: branches/safari-607-branch/JSTests/stress/licm-dead-code.js (0 => 242855)
--- branches/safari-607-branch/JSTests/stress/licm-dead-code.js (rev 0)
+++ branches/safari-607-branch/JSTests/stress/licm-dead-code.js 2019-03-13 08:24:31 UTC (rev 242855)
@@ -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: branches/safari-607-branch/Source/_javascript_Core/ChangeLog (242854 => 242855)
--- branches/safari-607-branch/Source/_javascript_Core/ChangeLog 2019-03-13 08:24:29 UTC (rev 242854)
+++ branches/safari-607-branch/Source/_javascript_Core/ChangeLog 2019-03-13 08:24:31 UTC (rev 242855)
@@ -1,45 +1,62 @@
2019-03-13 Babak Shafiei <[email protected]>
- Cherry-pick r242114. rdar://problem/48839372
+ Cherry-pick r242276. rdar://problem/48839389
- wasmToJS() should purify incoming NaNs.
- https://bugs.webkit.org/show_bug.cgi?id=194807
- <rdar://problem/48189132>
+ 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.
- JSTests:
+ * dfg/DFGLICMPhase.cpp:
+ (JSC::DFG::LICMPhase::run):
- * wasm/regress/wasmToJS-should-purify-NaNs.js: Added.
- Source/_javascript_Core:
- * runtime/JSCJSValue.h:
- (JSC::jsNumber):
- * runtime/TypedArrayAdaptors.h:
- (JSC::IntegralTypedArrayAdaptor::toJSValue):
- * wasm/js/WasmToJS.cpp:
- (JSC::Wasm::wasmToJS):
-
-
-
- git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242114 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242276 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- 2019-02-26 Mark Lam <[email protected]>
+ 2019-03-13 Babak Shafiei <[email protected]>
- wasmToJS() should purify incoming NaNs.
- https://bugs.webkit.org/show_bug.cgi?id=194807
- <rdar://problem/48189132>
+ Cherry-pick r242114. rdar://problem/48839372
- Reviewed by Saam Barati.
+ wasmToJS() should purify incoming NaNs.
+ https://bugs.webkit.org/show_bug.cgi?id=194807
+ <rdar://problem/48189132>
- * runtime/JSCJSValue.h:
- (JSC::jsNumber):
- * runtime/TypedArrayAdaptors.h:
- (JSC::IntegralTypedArrayAdaptor::toJSValue):
- * wasm/js/WasmToJS.cpp:
- (JSC::Wasm::wasmToJS):
+ Reviewed by Saam Barati.
+ JSTests:
+
+ * wasm/regress/wasmToJS-should-purify-NaNs.js: Added.
+
+ Source/_javascript_Core:
+
+ * runtime/JSCJSValue.h:
+ (JSC::jsNumber):
+ * runtime/TypedArrayAdaptors.h:
+ (JSC::IntegralTypedArrayAdaptor::toJSValue):
+ * wasm/js/WasmToJS.cpp:
+ (JSC::Wasm::wasmToJS):
+
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242114 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2019-02-26 Mark Lam <[email protected]>
+
+ wasmToJS() should purify incoming NaNs.
+ https://bugs.webkit.org/show_bug.cgi?id=194807
+ <rdar://problem/48189132>
+
+ Reviewed by Saam Barati.
+
+ * runtime/JSCJSValue.h:
+ (JSC::jsNumber):
+ * runtime/TypedArrayAdaptors.h:
+ (JSC::IntegralTypedArrayAdaptor::toJSValue):
+ * wasm/js/WasmToJS.cpp:
+ (JSC::Wasm::wasmToJS):
+
2019-03-13 Babak Shafiei <[email protected]>
Cherry-pick r241615. rdar://problem/48839366
@@ -415,6 +432,17 @@
https://bugs.webkit.org/show_bug.cgi?id=194334
<rdar://problem/47844327>
+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):
+
Reviewed by Mark Lam.
* dfg/DFGAbstractInterpreterInlines.h:
Modified: branches/safari-607-branch/Source/_javascript_Core/dfg/DFGLICMPhase.cpp (242854 => 242855)
--- branches/safari-607-branch/Source/_javascript_Core/dfg/DFGLICMPhase.cpp 2019-03-13 08:24:29 UTC (rev 242854)
+++ branches/safari-607-branch/Source/_javascript_Core/dfg/DFGLICMPhase.cpp 2019-03-13 08:24:31 UTC (rev 242855)
@@ -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