Changeset 239882 in webkit for trunk/Source/JavaScriptCore/dfg/DFGCombinedLiveness.cpp
- Timestamp:
- Jan 11, 2019, 4:26:06 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/dfg/DFGCombinedLiveness.cpp
r232334 r239882 36 36 namespace JSC { namespace DFG { 37 37 38 NodeSet liveNodesAtHead(Graph& graph, BasicBlock* block)38 static void addBytecodeLiveness(Graph& graph, AvailabilityMap& availabilityMap, NodeSet& seen, Node* node) 39 39 { 40 NodeSet seen;41 for (NodeFlowProjection node : block->ssa->liveAtHead) {42 if (node.kind() == NodeFlowProjection::Primary)43 seen.addVoid(node.node());44 }45 46 AvailabilityMap& availabilityMap = block->ssa->availabilityAtHead;47 40 graph.forAllLiveInBytecode( 48 block->at(0)->origin.forExit,41 node->origin.forExit, 49 42 [&] (VirtualRegister reg) { 50 43 availabilityMap.closeStartingWithLocal( … … 57 50 }); 58 51 }); 59 52 } 53 54 NodeSet liveNodesAtHead(Graph& graph, BasicBlock* block) 55 { 56 NodeSet seen; 57 for (NodeFlowProjection node : block->ssa->liveAtHead) { 58 if (node.kind() == NodeFlowProjection::Primary) 59 seen.addVoid(node.node()); 60 } 61 62 addBytecodeLiveness(graph, block->ssa->availabilityAtHead, seen, block->at(0)); 60 63 return seen; 61 64 } … … 65 68 , liveAtTail(graph) 66 69 { 67 // First compute the liveAtHead for each block. 68 for (BasicBlock* block : graph.blocksInNaturalOrder()) 70 // First compute 71 // - The liveAtHead for each block. 72 // - The liveAtTail for blocks that won't properly propagate 73 // the information based on their empty successor list. 74 for (BasicBlock* block : graph.blocksInNaturalOrder()) { 69 75 liveAtHead[block] = liveNodesAtHead(graph, block); 76 77 // If we don't have successors, we can't rely on the propagation below. This doesn't usually 78 // do anything for terminal blocks, since the last node is usually a return, so nothing is live 79 // after it. However, we may also have the end of the basic block be: 80 // 81 // ForceOSRExit 82 // Unreachable 83 // 84 // And things may definitely be live in bytecode at that point in the program. 85 if (!block->numSuccessors()) { 86 NodeSet seen; 87 addBytecodeLiveness(graph, block->ssa->availabilityAtTail, seen, block->last()); 88 liveAtTail[block] = seen; 89 } 90 } 70 91 71 92 // Now compute the liveAtTail by unifying the liveAtHead of the successors.
Note:
See TracChangeset
for help on using the changeset viewer.