Ignore:
Timestamp:
Nov 17, 2015, 1:41:43 PM (10 years ago)
Author:
[email protected]
Message:

It's best for the DFG to always have some guess of basic block frequency
https://bugs.webkit.org/show_bug.cgi?id=151350

Reviewed by Geoffrey Garen.

It'll simplify things for B3 if we always have some estimate of block frequency, even if it's not
a great estimate. Using NaN as an estimate is probably worse than using any non-NaN number.

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::inlineCall):
(JSC::DFG::ByteCodeParser::handleInlining):
(JSC::DFG::ByteCodeParser::parseCodeBlock):

  • dfg/DFGCriticalEdgeBreakingPhase.cpp:

(JSC::DFG::CriticalEdgeBreakingPhase::breakCriticalEdge):

  • dfg/DFGLoopPreHeaderCreationPhase.cpp:

(JSC::DFG::createPreHeader):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGCriticalEdgeBreakingPhase.cpp

    r189013 r192529  
    7474    void breakCriticalEdge(BasicBlock* predecessor, BasicBlock** successor)
    7575    {
    76         // Note that we pass NaN for the count of the critical edge block, because we honestly
    77         // don't know its execution frequency.
    78         BasicBlock* pad = m_insertionSet.insertBefore(*successor, PNaN);
     76        BasicBlock* pad = m_insertionSet.insertBefore(*successor, (*successor)->executionCount);
    7977        pad->appendNode(
    8078            m_graph, SpecNone, Jump, (*successor)->at(0)->origin, OpInfo(*successor));
Note: See TracChangeset for help on using the changeset viewer.