Title: [144989] trunk/Source/_javascript_Core
Revision
144989
Author
[email protected]
Date
2013-03-06 15:04:18 -0800 (Wed, 06 Mar 2013)

Log Message

DFG::AbstractState::merge() is still more complicated than it needs to be
https://bugs.webkit.org/show_bug.cgi?id=111619

Reviewed by Mark Hahnenberg.
        
This method is the one place where we still do some minimal amount of liveness pruning, but the style with
which it is written is awkward, and it makes an assertion about variablesAtTail that will be invalidated
by https://bugs.webkit.org/show_bug.cgi?id=111539.

* dfg/DFGAbstractState.cpp:
(JSC::DFG::AbstractState::merge):
(JSC::DFG::AbstractState::mergeVariableBetweenBlocks):
* dfg/DFGAbstractState.h:
(AbstractState):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (144988 => 144989)


--- trunk/Source/_javascript_Core/ChangeLog	2013-03-06 22:56:30 UTC (rev 144988)
+++ trunk/Source/_javascript_Core/ChangeLog	2013-03-06 23:04:18 UTC (rev 144989)
@@ -1,5 +1,22 @@
 2013-03-06  Filip Pizlo  <[email protected]>
 
+        DFG::AbstractState::merge() is still more complicated than it needs to be
+        https://bugs.webkit.org/show_bug.cgi?id=111619
+
+        Reviewed by Mark Hahnenberg.
+        
+        This method is the one place where we still do some minimal amount of liveness pruning, but the style with
+        which it is written is awkward, and it makes an assertion about variablesAtTail that will be invalidated
+        by https://bugs.webkit.org/show_bug.cgi?id=111539.
+
+        * dfg/DFGAbstractState.cpp:
+        (JSC::DFG::AbstractState::merge):
+        (JSC::DFG::AbstractState::mergeVariableBetweenBlocks):
+        * dfg/DFGAbstractState.h:
+        (AbstractState):
+
+2013-03-06  Filip Pizlo  <[email protected]>
+
         DFG should not run full CSE after the optimization fixpoint, since it really just wants store elimination
         https://bugs.webkit.org/show_bug.cgi?id=111536
 

Modified: trunk/Source/_javascript_Core/dfg/DFGAbstractState.cpp (144988 => 144989)


--- trunk/Source/_javascript_Core/dfg/DFGAbstractState.cpp	2013-03-06 22:56:30 UTC (rev 144988)
+++ trunk/Source/_javascript_Core/dfg/DFGAbstractState.cpp	2013-03-06 23:04:18 UTC (rev 144989)
@@ -1697,13 +1697,17 @@
     bool changed = false;
     
     for (size_t argument = 0; argument < from->variablesAtTail.numberOfArguments(); ++argument) {
-        AbstractValue& destination = to->valuesAtHead.argument(argument);
-        changed |= mergeVariableBetweenBlocks(destination, from->valuesAtTail.argument(argument), to->variablesAtHead.argument(argument), from->variablesAtTail.argument(argument));
+        changed |= mergeVariableBetweenBlocks(
+            to->valuesAtHead.argument(argument),
+            from->valuesAtTail.argument(argument),
+            to->variablesAtHead.argument(argument));
     }
     
     for (size_t local = 0; local < from->variablesAtTail.numberOfLocals(); ++local) {
-        AbstractValue& destination = to->valuesAtHead.local(local);
-        changed |= mergeVariableBetweenBlocks(destination, from->valuesAtTail.local(local), to->variablesAtHead.local(local), from->variablesAtTail.local(local));
+        changed |= mergeVariableBetweenBlocks(
+            to->valuesAtHead.local(local),
+            from->valuesAtTail.local(local),
+            to->variablesAtHead.local(local));
     }
 
     if (!to->cfaHasVisited)
@@ -1757,15 +1761,12 @@
     }
 }
 
-inline bool AbstractState::mergeVariableBetweenBlocks(AbstractValue& destination, AbstractValue& source, Node* destinationNode, Node* sourceNode)
+inline bool AbstractState::mergeVariableBetweenBlocks(AbstractValue& destination, AbstractValue& source, Node* destinationNode)
 {
+    // This is the only liveness pruning that we do. We can always rely on the liveness at head to be preserved.
     if (!destinationNode)
         return false;
     
-    ASSERT_UNUSED(sourceNode, sourceNode);
-    
-    // FIXME: We could do some sparse conditional propagation here!
-    
     return destination.merge(source);
 }
 

Modified: trunk/Source/_javascript_Core/dfg/DFGAbstractState.h (144988 => 144989)


--- trunk/Source/_javascript_Core/dfg/DFGAbstractState.h	2013-03-06 22:56:30 UTC (rev 144988)
+++ trunk/Source/_javascript_Core/dfg/DFGAbstractState.h	2013-03-06 23:04:18 UTC (rev 144989)
@@ -234,7 +234,7 @@
     
     bool mergeStateAtTail(AbstractValue& destination, AbstractValue& inVariable, Node*);
     
-    static bool mergeVariableBetweenBlocks(AbstractValue& destination, AbstractValue& source, Node* destinationNode, Node* sourceNode);
+    static bool mergeVariableBetweenBlocks(AbstractValue& destination, AbstractValue& source, Node* destinationNode);
     
     enum BooleanResult {
         UnknownBooleanResult,
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to