Skip to content

Commit

Permalink
handle escape through IND
Browse files Browse the repository at this point in the history
  • Loading branch information
hez2010 committed Jul 19, 2024
1 parent ebfe419 commit 9a3a510
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/coreclr/jit/objectalloc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -993,8 +993,16 @@ bool ObjectAllocator::CanLclVarEscapeViaParentStack(ArrayStack<GenTree*>* parent
}
FALLTHROUGH;
case GT_IND:
// Address of the field/ind is not taken so the local doesn't escape.
canLclVarEscapeViaParentStack = false;
if (parent->OperIs(GT_IND) && parent->TypeIs(TYP_REF))
{
++parentIndex;
keepChecking = true;
}
else
{
// Address of the field/ind is not taken so the local doesn't escape.
canLclVarEscapeViaParentStack = false;
}
break;

case GT_CALL:
Expand Down

0 comments on commit 9a3a510

Please sign in to comment.