-
Notifications
You must be signed in to change notification settings - Fork 5k
JIT: Copy BBF_ASYNC_RESUMPTION
when splitting edges in LSRA
#115836
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
Conversation
Async resumption BBs are introduced late enough that we allow them to do some things that general BBs are not allowed to do. For example, they are allowed to jump into try regions at any point. This allowance is marked with the `BBF_ASYNC_RESUMPTION` flag. Propagate this flag from the source when edges are split by LSRA to allow the new block the same affordances.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR ensures that the BBF_ASYNC_RESUMPTION flag is correctly propagated when splitting edges in LSRA, thereby allowing async resumption basic blocks to properly jump into try/handler regions. Key changes include:
- Replacing printf debug statements with JITDUMP in fgdiagnostic.cpp.
- Copying the BBF_ASYNC_RESUMPTION flag into the new block when splitting edges in fgbasic.cpp.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File | Description |
---|---|
src/coreclr/jit/fgdiagnostic.cpp | Replaced printf with JITDUMP for consistency in diagnostic logging. |
src/coreclr/jit/fgbasic.cpp | Propagates the BBF_ASYNC_RESUMPTION flag during edge splitting. |
Comments suppressed due to low confidence (1)
src/coreclr/jit/fgbasic.cpp:4973
- Verify that the CopyFlags call for BBF_ASYNC_RESUMPTION is additive and does not inadvertently override previously copied flags. If it overwrites flags, consider combining the flag copying into a single call to preserve all intended flag settings.
newBlock->CopyFlags(curr, BBF_ASYNC_RESUMPTION);
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
PTAL @dotnet/jit-contrib |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I presume nobody else can split blocks that late?
I don't think so, but if so the fix here is inside |
Async resumption BBs are introduced late enough that we allow them to do some things that general BBs are not allowed to do. For example, they are allowed to jump into try regions at any point. This allowance is marked with the `BBF_ASYNC_RESUMPTION` flag. Propagate this flag from the source when edges are split by LSRA to allow the new block the same affordances.
Async resumption BBs are introduced late enough that we allow them to do some things that general BBs are not allowed to do. For example, they are allowed to jump into try regions at any point. This allowance is marked with the
BBF_ASYNC_RESUMPTION
flag. Propagate this flag from the source when edges are split by LSRA to allow the new block the same affordances.Fix #115835