-
Notifications
You must be signed in to change notification settings - Fork 5k
Don't optimize prologues/epilogues in OptimizePostIndexed #114843
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
The conditions to hit this are quite specific but presumably it can affect NativeAOT on win-arm64 (1). That said, to see any issue we'd need to run unwinding exactly at the very first instruction of such optimized funclet epilog (2) and that may be very rare to happen in practice. The only reason it was hit on CoreCLR in the referenced PR was due to GC stress testing that we are missing on AOT (3). (1) On Unix we use different unwinding format and handle epilogs differently so it's not an issue there. |
Looks like there are no diffs (but our coverage of NativeAOT in SPMI is extremely small) |
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 addresses an issue where post-index optimizations are inadvertently applied during the generation of unwind prologues and epilogues. The changes add a condition to disable such optimizations in emitter::OptimizePostIndexed to ensure consistency with the similar check in emitter::IsOptimizableLdrStrWithPair.
@filipnavara should it be merged then? |
Let's wait for the GC stress on the other PR as additional verification. |
Does it mean we can / should exclude it from Unix? 👀 |
No, it will apply to CoreCLR/Unix once we get the PSPSym PR merged too. We can optimize the prologues/epilogues separately, there will be more stuff to clean up. |
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.
Thanks!
Addresses #114630 (comment)
A similar check exists in
emitter::IsOptimizableLdrStrWithPair
for ldr/str to ldp/stp optimization.