Skip to content

JIT: Continuation allocation code can be shared #125688

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Priority:2Work that is important, but not critical for the releasearea-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIruntime-async

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions