Changeset 179477 in webkit for trunk/Source/JavaScriptCore/dfg/DFGCPSRethreadingPhase.cpp
- Timestamp:
- Feb 2, 2015, 10:15:44 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/dfg/DFGCPSRethreadingPhase.cpp
r173069 r179477 1 1 /* 2 * Copyright (C) 2013 , 2014Apple Inc. All rights reserved.2 * Copyright (C) 2013-2015 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 40 40 CPSRethreadingPhase(Graph& graph) 41 41 : Phase(graph, "CPS rethreading") 42 , m_availableForOSR(OperandsLike, graph.block(0)->variablesAtHead) 42 43 { 43 44 } … … 99 100 case SetArgument: 100 101 case SetLocal: 101 node->convert ToPhantomLocal();102 node->convertPhantomToPhantomLocal(); 102 103 break; 103 104 default: … … 120 121 121 122 template<OperandKind operandKind> 122 void clearVariables AtHeadAndTail()123 void clearVariables() 123 124 { 124 125 ASSERT( 125 126 m_block->variablesAtHead.sizeFor<operandKind>() 126 127 == m_block->variablesAtTail.sizeFor<operandKind>()); 128 ASSERT( 129 m_block->variablesAtHead.sizeFor<operandKind>() 130 == m_availableForOSR.sizeFor<operandKind>()); 127 131 128 132 for (unsigned i = m_block->variablesAtHead.sizeFor<operandKind>(); i--;) { 129 m_block->variablesAtHead.atFor<operandKind>(i) = 0; 130 m_block->variablesAtTail.atFor<operandKind>(i) = 0; 133 m_block->variablesAtHead.atFor<operandKind>(i) = nullptr; 134 m_block->variablesAtTail.atFor<operandKind>(i) = nullptr; 135 m_availableForOSR.atFor<operandKind>(i) = Edge(); 131 136 } 132 137 } … … 260 265 // know that I would have read the value written by that SetLocal. This is 261 266 // redundant and inefficient, since really it just means that we want to 262 // be keeping the operand to the SetLocal alive. The SetLocal may die, and 263 // we'll be fine because OSR tracks dead SetLocals. 264 265 // So we turn this into a Phantom on the child of the SetLocal. 266 267 // keep the last MovHinted value of that local alive. 268 269 node->children.setChild1(m_availableForOSR.atFor<operandKind>(idx)); 267 270 node->convertToPhantom(); 268 node->children.setChild1(otherNode->child1());269 271 return; 270 272 } … … 312 314 ASSERT(m_block->isReachable); 313 315 314 clearVariables AtHeadAndTail<ArgumentOperand>();315 clearVariables AtHeadAndTail<LocalOperand>();316 clearVariables<ArgumentOperand>(); 317 clearVariables<LocalOperand>(); 316 318 317 319 // Assumes that all phi references have been removed. Assumes that things that … … 383 385 break; 384 386 387 case MovHint: 388 m_availableForOSR.operand(node->unlinkedLocal()) = node->child1(); 389 break; 390 385 391 default: 386 392 break; … … 523 529 Vector<PhiStackEntry, 128> m_localPhiStack; 524 530 Vector<Node*, 128> m_flushedLocalOpWorklist; 531 Operands<Edge> m_availableForOSR; 525 532 }; 526 533
Note:
See TracChangeset
for help on using the changeset viewer.