Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/coreclr/jit/optimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2379,11 +2379,11 @@ PhaseStatus Compiler::optOptimizeFlow()

bool modified = fgUpdateFlowGraph(/* doTailDuplication */ true);

// Skipping fgExpandRarelyRunBlocks when we have PGO data incurs diffs if the profile is inconsistent,
// as it will propagate missing profile weights throughout the flowgraph.
// Running profile synthesis beforehand should get rid of these diffs.
// TODO: Always rely on profile synthesis to identify cold blocks.
modified |= fgExpandRarelyRunBlocks();
if (!fgIsUsingProfileWeights())
{
modified |= fgExpandRarelyRunBlocks();
}

// Run branch optimizations for non-handler blocks.
assert(!fgFuncletsCreated);
Expand Down
Loading