Skip to content

Remove CHK_FLOW_UPDATE stress mode#122970

Merged
jakobbotsch merged 3 commits intomainfrom
copilot/remove-chk-flow-update-stress-mode
Jan 30, 2026
Merged

Remove CHK_FLOW_UPDATE stress mode#122970
jakobbotsch merged 3 commits intomainfrom
copilot/remove-chk-flow-update-stress-mode

Conversation

Copy link
Contributor

Copilot AI commented Jan 7, 2026

Remove CHK_FLOW_UPDATE stress mode

  • Remove STRESS_MODE(CHK_FLOW_UPDATE) from compiler.h
  • Remove stress mode check from fgDebugCheckUpdate() function
  • Keep fgDebugCheckUpdate() function to run always in debug builds
  • Keep function declaration in compiler.h
  • Keep call to fgDebugCheckUpdate() in fgopt.cpp
  • Build CoreCLR to verify changes compile

Summary

Removed the CHK_FLOW_UPDATE stress mode. The fgDebugCheckUpdate() function now runs unconditionally in all debug builds instead of being gated by the stress mode. This provides better flow graph validation coverage during development.

Changes Made:

  • Removed STRESS_MODE(CHK_FLOW_UPDATE) from the stress modes enumeration in compiler.h
  • Removed the if (!compStressCompile(STRESS_CHK_FLOW_UPDATE, 30)) check from fgDebugCheckUpdate() in fgdiagnostic.cpp

The function continues to validate flow graph invariants including no unreachable blocks, empty blocks, un-imported blocks, un-compacted blocks, unnecessary jumps, and proper BBJ_CALLFINALLY block structure.

Original prompt

Remove the CHK_FLOW_UPDATE stress mode


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: jakobbotsch <7887810+jakobbotsch@users.noreply.github.com>
Per feedback from @jakobbotsch, the fgDebugCheckUpdate function is now
always executed in debug builds instead of being gated by the
STRESS_CHK_FLOW_UPDATE stress mode.

Co-authored-by: jakobbotsch <7887810+jakobbotsch@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove CHK_FLOW_UPDATE stress mode Remove CHK_FLOW_UPDATE stress mode Jan 7, 2026
@jkotas jkotas added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Jan 9, 2026
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

@jakobbotsch
Copy link
Member

/azp run runtime-coreclr jitstress

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jakobbotsch jakobbotsch marked this pull request as ready for review January 27, 2026 12:18
Copilot AI review requested due to automatic review settings January 27, 2026 12:18
@jakobbotsch
Copy link
Member

PTAL @dotnet/jit-contrib

This stress mode controlled whether we do some basic block validation, but that validation does not look expensive enough to warrant being under a stress mode.

@jakobbotsch jakobbotsch requested a review from a team January 27, 2026 12:19
@jakobbotsch jakobbotsch requested a review from a team January 27, 2026 12:20
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the CHK_FLOW_UPDATE stress mode from the JIT compiler, making the fgDebugCheckUpdate() function run unconditionally in all debug builds instead of being gated by a stress mode check. This provides better flow graph validation coverage during development.

Changes:

  • Removed STRESS_MODE(CHK_FLOW_UPDATE) from the stress modes enumeration in compiler.h
  • Removed the stress mode check from fgDebugCheckUpdate() in fgdiagnostic.cpp, allowing the function to run unconditionally in debug builds

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/coreclr/jit/compiler.h Removed STRESS_MODE(CHK_FLOW_UPDATE) from the stress modes macro list
src/coreclr/jit/fgdiagnostic.cpp Removed the compStressCompile(STRESS_CHK_FLOW_UPDATE, 30) conditional check, allowing flow graph validation to run unconditionally in debug builds

@jakobbotsch
Copy link
Member

/ba-g Known arm64 queue issues

@jakobbotsch jakobbotsch merged commit d187228 into main Jan 30, 2026
160 of 169 checks passed
@jakobbotsch jakobbotsch deleted the copilot/remove-chk-flow-update-stress-mode branch January 30, 2026 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants