Repository navigation
Canonicalize unused field addresses and length reads - #136738
Open
NinoFloris wants to merge 5 commits into
Open
NinoFloris wants to merge 5 commits into
NinoFloris wants to merge 5 commits into
Conversation
|
Azure Pipelines: Successfully started running 5 pipeline(s). 10 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
This was referenced Oct 31, 2026
Open
Member
|
I think we can just handle FIELD_ADDR in gtExtractSideEffectsFromUnusedNode to convert it into a nullcheck - same diffs (even more slightly) |
NinoFloris
force-pushed
the
jit/discard-unused-local-addresses
branch
from
October 31, 2026 18:30
608d8d1 to
896d307
Compare
EgorBo
approved these changes
Oct 31, 2026
Contributor
Author
|
Missed context on linux x64 btw. I don't have an x64 machine ready to check what caused it. |
JulieLeeMSFT
approved these changes
Nov 2, 2026
Contributor
Author
|
@JulieLeeMSFT gentle nudge. I can't merge this myself. |
Member
|
This looks like it results in overall regressions on arm64 in the non-test collections. Have you investigated some of those cases? |
This comment was marked as outdated.
This comment was marked as outdated.
Reduce unused instance FIELD_ADDR and ARR_LENGTH nodes to their receiver null checks during side-effect extraction, sharing the existing GetType handling and preserving operand evaluation. This lets local morph discard checks on known local addresses before they cause address exposure. Add Slice bounds-check and unused-length codegen coverage, along with null-exception tests.
NinoFloris
force-pushed
the
jit/discard-unused-local-addresses
branch
from
November 23, 2026 11:37
2823739 to
34638c8
Compare
Track null checks on a local plus a constant offset during early propagation. A load or store at the same offset from the same SSA local can take the fault when the existing ordering checks allow it.
Set the dword width when lowering selects a register-addressed null check. Codegen can then emit the comparison using the node type.
A byte probe only needs to fault. Zero-extension lets Thumb use its 16-bit immediate-offset load when the registers and offset fit.
NinoFloris
force-pushed
the
jit/discard-unused-local-addresses
branch
from
November 24, 2026 10:52
fd9cedd to
85a2174
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Canonicalize unused instance field addresses and array/string length reads to receiver null checks in
gtExtractSideEffectsFromUnusedNode, sharing the existingGetTypehandling. This preserves operand evaluation and exceptions, and lets local morph discard checks on known local addresses before they cause address exposure.Unblocks switching to the subtraction-based Slice check discussed in #119689. Adds disassembly coverage for redundant Slice bounds-check elimination and unused array-length normalization, plus null-exception tests for field, array, and string reads.