Skip to content

Commit e2e4642

Browse files
JIT: Don't run fgComputeBlockWeights in MinOpts (#110451)
Block weights don't seem particularly useful in MinOpts. Skipping fgComputeBlockWeights when we aren't optimizing had few diffs locally, so this looks like an opportunity to save some TP.
1 parent e7e568b commit e2e4642

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/coreclr/jit/compiler.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4769,12 +4769,12 @@ void Compiler::compCompile(void** methodCodePtr, uint32_t* methodCodeSize, JitFl
47694769
//
47704770
DoPhase(this, PHASE_GS_COOKIE, &Compiler::gsPhase);
47714771

4772-
// Compute the block weights
4773-
//
4774-
DoPhase(this, PHASE_COMPUTE_BLOCK_WEIGHTS, &Compiler::fgComputeBlockWeights);
4775-
47764772
if (opts.OptimizationEnabled())
47774773
{
4774+
// Compute the block weights
4775+
//
4776+
DoPhase(this, PHASE_COMPUTE_BLOCK_WEIGHTS, &Compiler::fgComputeBlockWeights);
4777+
47784778
// Invert loops
47794779
//
47804780
DoPhase(this, PHASE_INVERT_LOOPS, &Compiler::optInvertLoops);

0 commit comments

Comments
 (0)