Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stack allocate unescaped boxes #103361

Merged
merged 50 commits into from
Jul 1, 2024
Merged
Changes from 1 commit
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
e333c8f
wip
AndyAyersMS May 20, 2021
5deb676
post rebase fixes
AndyAyersMS Jun 11, 2024
877927a
wip
AndyAyersMS Jun 11, 2024
0a7f3d4
revert layout changes, rely on KVP instead
AndyAyersMS Jun 11, 2024
56500c3
trying to enable promotion
AndyAyersMS Jun 12, 2024
f9e6e47
Small fixes
jakobbotsch Jun 12, 2024
67402d4
Update src/coreclr/jit/lclmorph.cpp
jakobbotsch Jun 12, 2024
5a08c84
Merge pull request #6 from jakobbotsch/stack-allocate-unescaped-boxes…
AndyAyersMS Jun 12, 2024
350d7ca
format
AndyAyersMS Jun 12, 2024
0328665
avoid escaping nullcheck addrs
AndyAyersMS Jun 12, 2024
315916d
fix nullcheck handling
AndyAyersMS Jun 13, 2024
91b83d3
fix colon retyping
AndyAyersMS Jun 13, 2024
bcc7c3a
metrics, enable for ref classes too
AndyAyersMS Jun 14, 2024
20a83b4
fix object stack allocation test
AndyAyersMS Jun 14, 2024
be657eb
merge main
AndyAyersMS Jun 14, 2024
d9d299c
handle not getting a class handle for a box
AndyAyersMS Jun 14, 2024
03ae7ee
Merge branch 'main' into StackAllocateUnescapedBoxes
AndyAyersMS Jun 15, 2024
cc1037e
don't recycle packet number
AndyAyersMS Jun 15, 2024
3964a09
fix nullcheck exposure in local morph
AndyAyersMS Jun 16, 2024
b1c986d
allow promotion of address-exposed stack allocated boxes
AndyAyersMS Jun 17, 2024
ed41d78
unbox helper only captures type
AndyAyersMS Jun 18, 2024
810abdf
merge main
AndyAyersMS Jun 18, 2024
536b2ae
restore lost guid update and related
AndyAyersMS Jun 18, 2024
5e9e3fb
boost inlining more if we pass a box as an arg
AndyAyersMS Jun 18, 2024
0685c58
try and fix promotion to write back if there are helper call struct uses
AndyAyersMS Jun 18, 2024
07f68ee
fix physical promotion writeback logic
AndyAyersMS Jun 19, 2024
2ae83e6
fix layout access for regular case
AndyAyersMS Jun 19, 2024
1cd1022
handle more address comparisons in local morph
AndyAyersMS Jun 19, 2024
40bb560
unbox type test helper
AndyAyersMS Jun 19, 2024
2beb6b3
rewrite unbox helper calls if we stack allocate the box
AndyAyersMS Jun 19, 2024
3522738
undo hacky changes to promotion
AndyAyersMS Jun 19, 2024
d88b4a9
more extensive rewriting -- anything that might be a stack allocated box
AndyAyersMS Jun 20, 2024
9c7885d
allow method table access for stack allocated objects
AndyAyersMS Jun 20, 2024
93a3f1d
Merge branch 'main' into StackAllocateUnescapedBoxes_UnboxHelper
AndyAyersMS Jun 20, 2024
06cbf8b
do indir/comma swapping in object allocator
AndyAyersMS Jun 20, 2024
946c780
fall back to relying on (lack of) exposure
AndyAyersMS Jun 21, 2024
e63a883
fix type test helper, add range control
AndyAyersMS Jun 21, 2024
41ea7bd
fix unbox helper re-write
AndyAyersMS Jun 22, 2024
337fc7e
need more capable clone
AndyAyersMS Jun 22, 2024
6cdefdf
report all object refs as byrefs for OSR (no retyping to nint)
AndyAyersMS Jun 23, 2024
2c3785e
disable ref class stack allocation for r2r/naot for now
AndyAyersMS Jun 23, 2024
7ca7027
minor TP improvement
AndyAyersMS Jun 24, 2024
351d484
dial back inliner
AndyAyersMS Jun 24, 2024
ccad461
fix spmi capture of ref class gclayout
AndyAyersMS Jun 26, 2024
14d2455
Use StackAllocatedBox<T>
AndyAyersMS Jun 26, 2024
8a077ea
Apply suggestions from code review
AndyAyersMS Jun 27, 2024
dc873e5
more review feedback
AndyAyersMS Jun 28, 2024
2597a44
fix
AndyAyersMS Jun 28, 2024
504012d
fix typo in comment
AndyAyersMS Jun 28, 2024
7af3d98
more surgical sibling type update for qmark/colon
AndyAyersMS Jun 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fall back to relying on (lack of) exposure
AndyAyersMS committed Jun 21, 2024
commit 946c780c0082dabb9f6ff4be93137c276e121132
3 changes: 1 addition & 2 deletions src/coreclr/jit/promotion.cpp
Original file line number Diff line number Diff line change
@@ -2937,8 +2937,7 @@ bool Promotion::HaveCandidateLocals()
//
bool Promotion::IsCandidateForPhysicalPromotion(LclVarDsc* dsc)
{
return (dsc->TypeGet() == TYP_STRUCT) && !dsc->lvPromoted &&
(!dsc->IsAddressExposed() || dsc->IsStackAllocatedBox());
return (dsc->TypeGet() == TYP_STRUCT) && !dsc->lvPromoted && !dsc->IsAddressExposed();
}

//------------------------------------------------------------------------
Loading