Title: [187028] trunk/Source/_javascript_Core
Revision
187028
Author
[email protected]
Date
2015-07-20 12:04:19 -0700 (Mon, 20 Jul 2015)

Log Message

REGRESSION(186691): OSR entry is broken on loop headers that have no live variables
https://bugs.webkit.org/show_bug.cgi?id=147074
rdar://problem/21869970

Reviewed by Michael Saboff.
        
The OSR entry must-handle block/value widening introduced in r186691 would cause the
CFA to reexecute if it caused any live local variables to change value. But this fails
if the must-handle block has no live local variables, and the entry block otherwise
appears to be unreachable.
        
This fixes the bug by having the change detection include whether the block hadn't been
visited in addition to whether any local variable values got widened.
        
This is a ~4% speed-up on SunSpider in browser.

* dfg/DFGCFAPhase.cpp:
(JSC::DFG::CFAPhase::run):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (187027 => 187028)


--- trunk/Source/_javascript_Core/ChangeLog	2015-07-20 18:51:41 UTC (rev 187027)
+++ trunk/Source/_javascript_Core/ChangeLog	2015-07-20 19:04:19 UTC (rev 187028)
@@ -1,3 +1,24 @@
+2015-07-18  Filip Pizlo  <[email protected]>
+
+        REGRESSION(186691): OSR entry is broken on loop headers that have no live variables
+        https://bugs.webkit.org/show_bug.cgi?id=147074
+        rdar://problem/21869970
+
+        Reviewed by Michael Saboff.
+        
+        The OSR entry must-handle block/value widening introduced in r186691 would cause the
+        CFA to reexecute if it caused any live local variables to change value. But this fails
+        if the must-handle block has no live local variables, and the entry block otherwise
+        appears to be unreachable.
+        
+        This fixes the bug by having the change detection include whether the block hadn't been
+        visited in addition to whether any local variable values got widened.
+        
+        This is a ~4% speed-up on SunSpider in browser.
+
+        * dfg/DFGCFAPhase.cpp:
+        (JSC::DFG::CFAPhase::run):
+
 2015-07-20  Mark Lam  <[email protected]>
 
         Rollout r187020 and r187021: breaks JSC API tests on debug builds.

Modified: trunk/Source/_javascript_Core/dfg/DFGCFAPhase.cpp (187027 => 187028)


--- trunk/Source/_javascript_Core/dfg/DFGCFAPhase.cpp	2015-07-20 18:51:41 UTC (rev 187027)
+++ trunk/Source/_javascript_Core/dfg/DFGCFAPhase.cpp	2015-07-20 19:04:19 UTC (rev 187028)
@@ -107,7 +107,7 @@
                         m_graph, resultFor(node->variableAccessData()->flushFormat()));
                 }
                 
-                if (changed) {
+                if (changed || !block->cfaHasVisited) {
                     m_changed = true;
                     block->cfaShouldRevisit = true;
                 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to