Support for variable sized locals in morph and lclmorph#124516
Open
snickolls-arm wants to merge 6 commits intodotnet:mainfrom
Open
Support for variable sized locals in morph and lclmorph#124516snickolls-arm wants to merge 6 commits intodotnet:mainfrom
snickolls-arm wants to merge 6 commits intodotnet:mainfrom
Conversation
Adds handling for unknown compile-time sizes to morph related to indirections and addressing of variables and struct fields. LCL_ADDR is allowed for TYP_SIMD/TYP_MASK if the address offset is zero, as this is the only offset that is provably within bounds for something with an unknown size at compile time. We can only reduce ADD(LCL_ADDR(BASE), OFFSET) for such locals when BASE and OFFSET are zero. We only process STOREIND or IND as STORE_LCL_FLD/LCL_FLD if the indirection points to the entire variable (the indirection offset is zero and the ValueSizes are equivalent).
Contributor
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
Contributor
Author
|
@dotnet/arm64-contrib @dotnet/jit-contrib |
Contributor
Author
|
There are some regressions in the diffs causing by spilling registers to stack, which I think might indicate some accesses are incorrectly labelled as address exposed. Looking into this as this shouldn't show any diffs to baseline compilation, it should only affect |
* Add IsWideAccess for determining whether an access should make a local address-exposed. * Refactor existing bounds checking logic to use IsWideAccess. * Add handling or types that don't have sizes at compile-time. Such types can check whether an access is entire using IsEntireAccess and set them address-exposed if this is not the case. * Separate some handling for zero-sized indirections into explicit comparisons.
Contributor
Author
|
My latest commits have reversed the diffs, it was to do with implicit handling of zero-sized indirections that I missed the first time around. While I'm in the area I've cleaned up a TODO, and made some of the various bounds checking over morph use similar logic. @dotnet/arm64-contrib please could I have a review? |
11 tasks
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.
Adds handling for unknown compile-time sizes to morph related to indirections and addressing of variables and struct fields.
LCL_ADDR is allowed for TYP_SIMD/TYP_MASK if the address offset is zero, as this is the only offset that is provably within bounds for something with an unknown size at compile time.
We can only reduce ADD(LCL_ADDR(BASE), OFFSET) for such locals when BASE and OFFSET are zero.
We only process STOREIND or IND as STORE_LCL_FLD/LCL_FLD if the indirection points to the entire variable (the indirection offset is zero and the ValueSizes are equivalent).