Title: [231522] trunk/Source/_javascript_Core
- Revision
- 231522
- Author
- fpi...@apple.com
- Date
- 2018-05-08 16:30:31 -0700 (Tue, 08 May 2018)
Log Message
DFG::FlowMap::resize() shouldn't resize the shadow map unless we're in SSA
https://bugs.webkit.org/show_bug.cgi?id=185453
Reviewed by Michael Saboff.
Tiny improvement for compile times.
* dfg/DFGFlowMap.h:
(JSC::DFG::FlowMap::resize): Remove one Vector::resize() when we're not in SSA.
* dfg/DFGInPlaceAbstractState.cpp:
(JSC::DFG::InPlaceAbstractState::beginBasicBlock): Record some data about how long we spend in different parts of this and add a FIXME linking bug 185452.
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (231521 => 231522)
--- trunk/Source/_javascript_Core/ChangeLog 2018-05-08 23:28:05 UTC (rev 231521)
+++ trunk/Source/_javascript_Core/ChangeLog 2018-05-08 23:30:31 UTC (rev 231522)
@@ -1,3 +1,17 @@
+2018-05-08 Filip Pizlo <fpi...@apple.com>
+
+ DFG::FlowMap::resize() shouldn't resize the shadow map unless we're in SSA
+ https://bugs.webkit.org/show_bug.cgi?id=185453
+
+ Reviewed by Michael Saboff.
+
+ Tiny improvement for compile times.
+
+ * dfg/DFGFlowMap.h:
+ (JSC::DFG::FlowMap::resize): Remove one Vector::resize() when we're not in SSA.
+ * dfg/DFGInPlaceAbstractState.cpp:
+ (JSC::DFG::InPlaceAbstractState::beginBasicBlock): Record some data about how long we spend in different parts of this and add a FIXME linking bug 185452.
+
2018-05-08 Michael Saboff <msab...@apple.com>
Deferred firing of structure transition watchpoints is racy
Modified: trunk/Source/_javascript_Core/dfg/DFGFlowMap.h (231521 => 231522)
--- trunk/Source/_javascript_Core/dfg/DFGFlowMap.h 2018-05-08 23:28:05 UTC (rev 231521)
+++ trunk/Source/_javascript_Core/dfg/DFGFlowMap.h 2018-05-08 23:30:31 UTC (rev 231522)
@@ -50,7 +50,8 @@
void resize()
{
m_map.resize(m_graph.maxNodeCount());
- m_shadowMap.resize(m_graph.maxNodeCount());
+ if (m_graph.m_form == SSA)
+ m_shadowMap.resize(m_graph.maxNodeCount());
}
Graph& graph() const { return m_graph; }
Modified: trunk/Source/_javascript_Core/dfg/DFGInPlaceAbstractState.cpp (231521 => 231522)
--- trunk/Source/_javascript_Core/dfg/DFGInPlaceAbstractState.cpp 2018-05-08 23:28:05 UTC (rev 231521)
+++ trunk/Source/_javascript_Core/dfg/DFGInPlaceAbstractState.cpp 2018-05-08 23:30:31 UTC (rev 231522)
@@ -34,6 +34,7 @@
#include "JSCInlines.h"
#include "PutByIdStatus.h"
#include "StringObject.h"
+#include "SuperSampler.h"
namespace JSC { namespace DFG {
@@ -53,6 +54,8 @@
void InPlaceAbstractState::beginBasicBlock(BasicBlock* basicBlock)
{
+ // This function is ~1.6-2% of execution time.
+
ASSERT(!m_block);
ASSERT(basicBlock->variablesAtHead.numberOfLocals() == basicBlock->valuesAtHead.numberOfLocals());
@@ -59,11 +62,15 @@
ASSERT(basicBlock->variablesAtTail.numberOfLocals() == basicBlock->valuesAtTail.numberOfLocals());
ASSERT(basicBlock->variablesAtHead.numberOfLocals() == basicBlock->variablesAtTail.numberOfLocals());
- m_abstractValues.resize();
+ m_abstractValues.resize(); // This part is ~0.1-0.4% of execution time.
AbstractValueClobberEpoch epoch = AbstractValueClobberEpoch::first(basicBlock->cfaStructureClobberStateAtHead);
m_effectEpoch = epoch;
-
+
+ // This loop is 0.9-1.2% of execution time.
+ // FIXME: Lazily populate m_variables when GetLocal/SetLocal happens. Apply the same idea to
+ // merging. Alternatively, we could just use liveness here.
+ // https://bugs.webkit.org/show_bug.cgi?id=185452
for (size_t i = m_variables.size(); i--;) {
AbstractValue& value = m_variables[i];
value = basicBlock->valuesAtHead[i];
@@ -71,6 +78,7 @@
}
if (m_graph.m_form == SSA) {
+ // This loop is 0.05-0.17% of execution time.
for (NodeAbstractValuePair& entry : basicBlock->ssa->valuesAtHead) {
if (entry.node.isStillValid()) {
AbstractValue& value = m_abstractValues.at(entry.node);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes