Skip to content

JIT: Continuation allocation code can be shared #125688

@jakobbotsch

Description

@jakobbotsch

After #125556 the head of every suspension looks something like:

Continuation newCont;
if (continuationParam != null)
{
  newCont = continuationParam;
  returnedCont.Next = newCont;
}
else
{
  newCont = CORINFO_HELP_ALLOC_CONTINUATION(returnedCont, continuationMethodTable);
}

The codegen of this is quite large. If we have multiple suspension points it would likely be beneficial to share this fragment of it.
One problem is that we cannot make "function local calls", and we need some way to return back. Perhaps just passing the state number and doing that via a switch would be fine -- it would use some space, but it would not require any major changes to block representations.

Metadata

Metadata

Labels

area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIruntime-async

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions