Title: [231467] trunk/Source/_javascript_Core
- Revision
- 231467
- Author
- fpi...@apple.com
- Date
- 2018-05-07 17:05:08 -0700 (Mon, 07 May 2018)
Log Message
DFG AI doesn't need to merge valuesAtTail - it can just assign them
https://bugs.webkit.org/show_bug.cgi?id=185355
Reviewed by Mark Lam.
This is a further attempt to improve compile times. Assigning AbstractValue ought to always
be faster than merging. There's no need to merge valuesAtTail. In most cases, assigning and
merging will get the same answer because the value computed this time will be either the same
as or more general than the value computed last time. If the value does change for some
reason, then valuesAtHead are already merged, which ensures monotonicity. Also, if the value
changes, then we have no reason to believe that this new value is less right than the last
one we computed. Finally, the one client of valuesAtTail (AtTailAbstractState) doesn't care
if it's getting the merged valuesAtTail or just some correct answer for valuesAtTail.
* dfg/DFGInPlaceAbstractState.cpp:
(JSC::DFG::InPlaceAbstractState::endBasicBlock):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (231466 => 231467)
--- trunk/Source/_javascript_Core/ChangeLog 2018-05-07 23:59:37 UTC (rev 231466)
+++ trunk/Source/_javascript_Core/ChangeLog 2018-05-08 00:05:08 UTC (rev 231467)
@@ -1,3 +1,22 @@
+2018-05-05 Filip Pizlo <fpi...@apple.com>
+
+ DFG AI doesn't need to merge valuesAtTail - it can just assign them
+ https://bugs.webkit.org/show_bug.cgi?id=185355
+
+ Reviewed by Mark Lam.
+
+ This is a further attempt to improve compile times. Assigning AbstractValue ought to always
+ be faster than merging. There's no need to merge valuesAtTail. In most cases, assigning and
+ merging will get the same answer because the value computed this time will be either the same
+ as or more general than the value computed last time. If the value does change for some
+ reason, then valuesAtHead are already merged, which ensures monotonicity. Also, if the value
+ changes, then we have no reason to believe that this new value is less right than the last
+ one we computed. Finally, the one client of valuesAtTail (AtTailAbstractState) doesn't care
+ if it's getting the merged valuesAtTail or just some correct answer for valuesAtTail.
+
+ * dfg/DFGInPlaceAbstractState.cpp:
+ (JSC::DFG::InPlaceAbstractState::endBasicBlock):
+
2018-05-07 Andy VanWagoner <andy@vanwagoner.family>
Remove defunct email address
Modified: trunk/Source/_javascript_Core/dfg/DFGInPlaceAbstractState.cpp (231466 => 231467)
--- trunk/Source/_javascript_Core/dfg/DFGInPlaceAbstractState.cpp 2018-05-07 23:59:37 UTC (rev 231466)
+++ trunk/Source/_javascript_Core/dfg/DFGInPlaceAbstractState.cpp 2018-05-08 00:05:08 UTC (rev 231467)
@@ -213,13 +213,10 @@
case SSA: {
for (size_t i = 0; i < block->valuesAtTail.size(); ++i)
- block->valuesAtTail[i].merge(m_variables[i]);
+ block->valuesAtTail[i] = m_variables[i];
- for (NodeAbstractValuePair& valueAtTail : block->ssa->valuesAtTail) {
- AbstractValue& valueAtNode = forNode(valueAtTail.node);
- valueAtTail.value.merge(valueAtNode);
- valueAtNode = valueAtTail.value;
- }
+ for (NodeAbstractValuePair& valueAtTail : block->ssa->valuesAtTail)
+ valueAtTail.value = forNode(valueAtTail.node);
break;
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes