Skip to content

Commit 6eabb60

Browse files
JIT: Skip rarely-run block expansion during flow opts when we have profile data (#114311)
1 parent 6c4f46b commit 6eabb60

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/coreclr/jit/optimizer.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2379,11 +2379,11 @@ PhaseStatus Compiler::optOptimizeFlow()
23792379

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

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

23882388
// Run branch optimizations for non-handler blocks.
23892389
assert(!fgFuncletsCreated);

0 commit comments

Comments
 (0)