-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Perform ldr to ldp peephole optimization #84399
Conversation
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch, @kunalspathak Issue DetailsIn local asmdiff verification, I see that the gcrefs are correctly tracked. Just double check if there are any GC holes. Contributes to #81278
|
/azp run runtime-coreclr gcstress0x3-gcstress0xc |
Azure Pipelines successfully started running 1 pipeline(s). |
@dotnet/jit-contrib |
Diffs from earlier run. |
Diffs look great. |
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.
You didn't update the comment above: "Don't do this if either instruction had a local variable." It would be useful to update this and provide more detail about why ldr is allowed.
It also occurs to me that you could also allow str of locals if both str are non-GC types, e.g., floating-point/SIMD, or even TYP_INT. I still think in both ldr and str cases it would be helpful in DEBUG to be able to annotate JitDisasm with the local var (+offset) being read/written, for each local.
Done
That's true. Added it.
Can we do it as a follow-up PR? I will open a .NET 8 tracking issue for it. |
yes. And please open an issue. |
|
/azp run runtime-coreclr gcstress0x3-gcstress0xc |
Azure Pipelines successfully started running 1 pipeline(s). |
gc-stress failures are unrelated. |
In #77540 we started replacing consecutive loads and stores with
ldp
andstp
except if they are for local variables. See #77540 (review) for details. For loads, turns out that we do not needoffset
tracking for loads and gc-liveness tracking forldp
is already present. So this PR just relaxes the rule and enable the optimization for 2 consecutive loads.For non-gc stores too, it enabled the peephole optimization because those variables do not need gc liveness tracking.
Contributes to #81278 and #55365
Fixes: #35132 and #35130