Changeset 192529 in webkit for trunk/Source/JavaScriptCore/dfg/DFGLoopPreHeaderCreationPhase.cpp
- Timestamp:
- Nov 17, 2015, 1:41:43 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/dfg/DFGLoopPreHeaderCreationPhase.cpp
r191870 r192529 65 65 // 66 66 // https://bugs.webkit.org/show_bug.cgi?id=148587 67 68 // Don't bother to preserve execution frequencies for now. 69 BasicBlock* preHeader = insertionSet.insertBefore(block, PNaN); 67 68 // Determine a good frequency for the pre-header. It's definitely not the frequency of the loop body. 69 // Instead, we use the max of the frequencies of the loop body's non-loop predecessors. 70 float frequency = 0; 71 for (BasicBlock* predecessor : block->predecessors) { 72 if (graph.m_dominators->dominates(block, predecessor)) 73 continue; 74 frequency = std::max(frequency, predecessor->executionCount); 75 } 76 BasicBlock* preHeader = insertionSet.insertBefore(block, frequency); 70 77 71 78 // FIXME: It would be great if we put some effort into enabling exitOK at this origin, if it
Note:
See TracChangeset
for help on using the changeset viewer.