Skip to content

Commit

Permalink
JIT: enable profile repairs of OSR entry block weight is zero (#86011)
Browse files Browse the repository at this point in the history
If the PGO solver finds the OSR entry block weight is zero, schedule the
method for profile repairs (similar to what we do for normal methods when
the method entry block weight is zero, see #84312).

Fixes #85838.
  • Loading branch information
AndyAyersMS authored May 9, 2023
1 parent c0bb818 commit 3747edb
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/coreclr/jit/fgprofile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3627,7 +3627,7 @@ void EfficientEdgeCountReconstructor::Propagate()
// for the OSR entry block.
//
// Arguments:
// block - block in question
// block - block in question (OSR entry)
// info - model info for the block
// nSucc - number of successors of the block in the flow graph
//
Expand Down Expand Up @@ -3666,7 +3666,13 @@ void EfficientEdgeCountReconstructor::PropagateOSREntryEdges(BasicBlock* block,
}

assert(nEdges == nSucc);
assert(info->m_weight > BB_ZERO_WEIGHT);

if (info->m_weight == BB_ZERO_WEIGHT)
{
JITDUMP("\nPropagate: OSR entry block weight is zero\n");
EntryWeightZero();
return;
}

// Transfer model edge weight onto the FlowEdges as likelihoods.
//
Expand Down

0 comments on commit 3747edb

Please sign in to comment.