Repository navigation
JIT: Simplify ReadUtf8 immutable data extraction - #135629
Merged
EgorBo merged 1 commit intoOct 12, 2026
Merged
Conversation
Use GetImmutableDataFromAddress to consolidate the extraction logic and address the comment about RVA-backed input.
|
Azure Pipelines: Successfully started running 5 pipeline(s). 11 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 |
EgorBo
approved these changes
Oct 12, 2026
EgorBo
left a comment
Member
There was a problem hiding this comment.
Thanks! I think there are places we can clean up similar to this.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Use GetImmutableDataFromAddress to consolidate the extraction logic and address the comment about RVA-backed input.
While exploring what it would look like to intrinsify
UTF8EncodingSealed.GetByteCountfor constant/immutable inputs (#102246), I came across the use ofGetImmutableDataFromAddressin assertionprops for folding constant input lengths and thought using it would simplify and at the same time address the TODO-ish comment in the existingReadUtf8expansion. This changes the buffer forgetObjectContentcall use the JITs arena for allocation rather than the 512-byte stack buffer.Not sure if this sort of simplification meets the bar but I think the change is modest and the existing
src\tests\JIT\opt\Vectorization\ReadUtf8.csregression tests should cover this so I decided to test the waters.