Consolidate importer spilling code V2#72744
Merged
AndyAyersMS merged 2 commits intodotnet:mainfrom Jul 26, 2022
Merged
Conversation
* Add tests * Fix losing GLOB_REF on the LHS The comment states we don't need it, which is incorrect. Diffs are improvements because we block forward substitution of calls into "ASG(BLK(ADDR(LCL_VAR<field>, ...)))", which allows morph to leave the "can be replaced with its field" local alone. * Prospective fix Spill "glob refs" on stores to "aliased" locals. * Delete now-not-necessary code * Fix up asserts * Clean out '(unsigned)CHECK_SPILL_ALL/NONE' casts * Don't manually spill for 'st[s]fld' * Revert 'Clean out '(unsigned)CHECK_SPILL_ALL/NONE' casts'
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
93a293b to
52871c4
Compare
jakobbotsch
reviewed
Jul 24, 2022
The mistake in logic was that the only trees which could modify unaliased locals are assignments, which is not true, calls can do that as well. One day we will move the return buffer handling out of importer, but until then, special handling is required. An alternative fix would have been to bring back the explicit "impSpillLclRefs" to "stloc/starg" code, but that would contradict the overall goal of consolidating the spilling logic.
52871c4 to
b537705
Compare
Contributor
Author
|
@dotnet/jit-contrib |
Member
|
/azp run runtime-coreclr outerloop |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
|
R2R failures are #72822 |
AndyAyersMS
approved these changes
Jul 26, 2022
Member
|
Unfortunately we have several silent bad codegen examples in the latest Fuzzlyn run that look caused or exposed by this PR: https://dnceng.visualstudio.com/public/_build/results?buildId=1914436&view=ms.vss-build-web.run-extensions-tab (ignore linux-arm examples) At this point I don't think we should take this for 7.0.0 since we may have a bug tail to work through. I will revert it, but please feel free to resubmit it and look into those issues. |
jakobbotsch
added a commit
to jakobbotsch/runtime
that referenced
this pull request
Aug 1, 2022
This reverts commit cea17b2.
jakobbotsch
added a commit
that referenced
this pull request
Aug 1, 2022
SingleAccretion
added a commit
to SingleAccretion/runtime
that referenced
this pull request
Aug 22, 2022
* Consolidate importer spilling code (dotnet#72291) * Add tests * Fix losing GLOB_REF on the LHS The comment states we don't need it, which is incorrect. Diffs are improvements because we block forward substitution of calls into "ASG(BLK(ADDR(LCL_VAR<field>, ...)))", which allows morph to leave the "can be replaced with its field" local alone. * Prospective fix Spill "glob refs" on stores to "aliased" locals. * Delete now-not-necessary code * Fix up asserts * Clean out '(unsigned)CHECK_SPILL_ALL/NONE' casts * Don't manually spill for 'st[s]fld' * Revert 'Clean out '(unsigned)CHECK_SPILL_ALL/NONE' casts' * Fix assignments done via return buffers The mistake in logic was that the only trees which could modify unaliased locals are assignments, which is not true, calls can do that as well. One day we will move the return buffer handling out of importer, but until then, special handling is required. An alternative fix would have been to bring back the explicit "impSpillLclRefs" to "stloc/starg" code, but that would contradict the overall goal of consolidating the spilling logic.
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.
Same as #72291, but handles calls with return buffers correctly (second commit).
Fixes #72133.