Changeset 160205 in webkit for trunk/Source/JavaScriptCore/dfg/DFGCSEPhase.cpp
- Timestamp:
- Dec 5, 2013, 5:47:19 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/dfg/DFGCSEPhase.cpp
r159886 r160205 332 332 } 333 333 334 Node* getByValLoadElimination(Node* child1, Node* child2 )334 Node* getByValLoadElimination(Node* child1, Node* child2, ArrayMode arrayMode) 335 335 { 336 336 for (unsigned i = m_indexInBlock; i--;) { … … 343 343 if (!m_graph.byValIsPure(node)) 344 344 return 0; 345 if (node->child1() == child1 && node->child2() == child2) 345 if (node->child1() == child1 346 && node->child2() == child2 347 && node->arrayMode().type() == arrayMode.type()) 346 348 return node; 347 349 break; … … 352 354 if (!m_graph.byValIsPure(node)) 353 355 return 0; 354 if (m_graph.varArgChild(node, 0) == child1 && m_graph.varArgChild(node, 1) == child2) 356 // Typed arrays 357 if (arrayMode.typedArrayType() != NotTypedArray) 358 return 0; 359 if (m_graph.varArgChild(node, 0) == child1 360 && m_graph.varArgChild(node, 1) == child2 361 && node->arrayMode().type() == arrayMode.type()) 355 362 return m_graph.varArgChild(node, 2).node(); 356 363 // We must assume that the PutByVal will clobber the location we're getting from. … … 1217 1224 break; 1218 1225 if (m_graph.byValIsPure(node)) 1219 setReplacement(getByValLoadElimination(node->child1().node(), node->child2().node() ));1226 setReplacement(getByValLoadElimination(node->child1().node(), node->child2().node(), node->arrayMode())); 1220 1227 break; 1221 1228 … … 1227 1234 Edge child2 = m_graph.varArgChild(node, 1); 1228 1235 if (node->arrayMode().canCSEStorage()) { 1229 Node* replacement = getByValLoadElimination(child1.node(), child2.node() );1236 Node* replacement = getByValLoadElimination(child1.node(), child2.node(), node->arrayMode()); 1230 1237 if (!replacement) 1231 1238 break;
Note:
See TracChangeset
for help on using the changeset viewer.