Changeset 179756 in webkit
- Timestamp:
- Feb 6, 2015, 1:39:04 PM (12 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
dfg/DFGCPSRethreadingPhase.cpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r179753 r179756 1 2015-02-06 Filip Pizlo <fpizlo@apple.com> 2 3 It should be possible to use the DFG SetArgument node to indicate that someone set the value of a local out-of-band 4 https://bugs.webkit.org/show_bug.cgi?id=141337 5 6 Reviewed by Mark Lam. 7 8 This mainly involved ensuring that SetArgument behaves just like SetLocal from a CPS standpoint, but with a special case for those SetArguments that 9 are associated with the prologue. 10 11 * dfg/DFGCPSRethreadingPhase.cpp: 12 (JSC::DFG::CPSRethreadingPhase::run): 13 (JSC::DFG::CPSRethreadingPhase::canonicalizeSet): 14 (JSC::DFG::CPSRethreadingPhase::canonicalizeLocalsInBlock): 15 (JSC::DFG::CPSRethreadingPhase::specialCaseArguments): 16 (JSC::DFG::CPSRethreadingPhase::canonicalizeSetLocal): Deleted. 17 (JSC::DFG::CPSRethreadingPhase::canonicalizeSetArgument): Deleted. 18 1 19 2015-02-06 Mark Lam <mark.lam@apple.com> 2 20 -
trunk/Source/JavaScriptCore/dfg/DFGCPSRethreadingPhase.cpp
r179477 r179756 55 55 m_graph.clearReplacements(); 56 56 canonicalizeLocalsInBlocks(); 57 specialCaseArguments(); 57 58 propagatePhis<LocalOperand>(); 58 59 propagatePhis<ArgumentOperand>(); … … 234 235 } 235 236 236 void canonicalizeSetLocal(Node* node)237 {238 m_block->variablesAtTail.setOperand(node->local(), node);239 }240 241 237 template<NodeType nodeType, OperandKind operandKind> 242 238 void canonicalizeFlushOrPhantomLocalFor(Node* node, VariableAccessData* variable, size_t idx) … … 299 295 } 300 296 301 void canonicalizeSetArgument(Node* node) 302 { 303 VirtualRegister local = node->local(); 304 ASSERT(local.isArgument()); 305 int argument = local.toArgument(); 306 m_block->variablesAtHead.setArgumentFirstTime(argument, node); 307 m_block->variablesAtTail.setArgumentFirstTime(argument, node); 297 void canonicalizeSet(Node* node) 298 { 299 m_block->variablesAtTail.setOperand(node->local(), node); 308 300 } 309 301 … … 370 362 371 363 case SetLocal: 372 canonicalizeSet Local(node);364 canonicalizeSet(node); 373 365 break; 374 366 … … 382 374 383 375 case SetArgument: 384 canonicalizeSet Argument(node);376 canonicalizeSet(node); 385 377 break; 386 378 … … 403 395 canonicalizeLocalsInBlock(); 404 396 } 397 } 398 399 void specialCaseArguments() 400 { 401 // Normally, a SetArgument denotes the start of a live range for a local's value on the stack. 402 // But those SetArguments used for the actual arguments to the machine CodeBlock get 403 // special-cased. We could have instead used two different node types - one for the arguments 404 // at the prologue case, and another for the other uses. But this seemed like IR overkill. 405 for (unsigned i = m_graph.m_arguments.size(); i--;) 406 m_graph.block(0)->variablesAtHead.setArgumentFirstTime(i, m_graph.m_arguments[i]); 405 407 } 406 408
Note:
See TracChangeset
for help on using the changeset viewer.