Commit 4c28137
committed
Consolidate importer spilling code V2 (dotnet#72744)
* 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.1 parent 8a64275 commit 4c28137
4 files changed
Lines changed: 511 additions & 159 deletions
File tree
- src
- coreclr/jit
- tests/JIT/Regression/JitBlue/Runtime_72133
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3803 | 3803 | | |
3804 | 3804 | | |
3805 | 3805 | | |
3806 | | - | |
3807 | | - | |
3808 | | - | |
3809 | | - | |
3810 | | - | |
| 3806 | + | |
| 3807 | + | |
3811 | 3808 | | |
3812 | 3809 | | |
3813 | 3810 | | |
| |||
4007 | 4004 | | |
4008 | 4005 | | |
4009 | 4006 | | |
4010 | | - | |
| 4007 | + | |
4011 | 4008 | | |
4012 | 4009 | | |
4013 | 4010 | | |
| |||
0 commit comments