Skip to content

JIT: remove optCanProp* short-circuit flags#128924

Merged
EgorBo merged 1 commit into
dotnet:mainfrom
EgorBo:remove-optcanprop-flags
Jun 3, 2026
Merged

JIT: remove optCanProp* short-circuit flags#128924
EgorBo merged 1 commit into
dotnet:mainfrom
EgorBo:remove-optcanprop-flags

Conversation

@EgorBo
Copy link
Copy Markdown
Member

@EgorBo EgorBo commented Jun 3, 2026

Fixes #128602
Also, a potential correctness issue with stale assertions after local assert prop or JitOptRepeat
Also, removes a bunch of short-circuit flags that do not actually improve TP

Copilot AI review requested due to automatic review settings June 3, 2026 00:07
@github-actions github-actions Bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Jun 3, 2026
@dotnet-policy-service
Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
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

Removes the optCanProp* short-circuit flags from JIT assertion propagation, simplifying state tracking and treating the prior “can propagate” checks as always enabled.

Changes:

  • Deletes optCanPropLclVar/Equal/NonNull/BndsChk/SubRange fields from Compiler.
  • Removes initialization and update logic for those flags in assertion table construction.
  • Drops the corresponding early-return guards in assertion propagation helpers.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/coreclr/jit/compiler.h Removes the optCanProp* state fields from Compiler.
src/coreclr/jit/assertionprop.cpp Removes flag initialization/maintenance and the related early-exit checks in assertion propagation helpers.

Comment thread src/coreclr/jit/assertionprop.cpp
Copilot AI review requested due to automatic review settings June 3, 2026 00:28
@EgorBo EgorBo force-pushed the remove-optcanprop-flags branch from 7a90abc to 9de0b41 Compare June 3, 2026 00:28
Copy link
Copy Markdown
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

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

Comment thread src/coreclr/jit/assertionprop.cpp Outdated
Comment thread src/coreclr/jit/assertionprop.cpp Outdated
@EgorBo EgorBo force-pushed the remove-optcanprop-flags branch from 9de0b41 to 67f0de3 Compare June 3, 2026 00:48
Copilot AI review requested due to automatic review settings June 3, 2026 01:14
@EgorBo EgorBo force-pushed the remove-optcanprop-flags branch from 67f0de3 to 6919358 Compare June 3, 2026 01:14
Copy link
Copy Markdown
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

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

Comment thread src/coreclr/jit/compiler.h
Comment thread src/coreclr/jit/assertionprop.cpp
@EgorBo EgorBo force-pushed the remove-optcanprop-flags branch from 6919358 to 45d7680 Compare June 3, 2026 01:35
@EgorBo
Copy link
Copy Markdown
Member Author

EgorBo commented Jun 3, 2026

PTAL @jakobbotsch (I recommend disabling the whitespaces in the review tab) @dotnet/jit-contrib

Some improvements in diffs along the way - mostly becase some functions were gated by one short-circut flag but actually used more than 1 type of assertions.

@EgorBo EgorBo requested a review from jakobbotsch June 3, 2026 10:45
@EgorBo
Copy link
Copy Markdown
Member Author

EgorBo commented Jun 3, 2026

/ba-g known build break in CSharpMissingShebangInFileBasedProgram #128905

@EgorBo EgorBo merged commit e38bfe1 into dotnet:main Jun 3, 2026
138 of 141 checks passed
@EgorBo EgorBo deleted the remove-optcanprop-flags branch June 3, 2026 11:53
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.

64-bit-host JIT has different codegen than 32-bit-host JIT for some null-check optimizations

3 participants