-
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
Review duplication of loads in the Jit #75916
Comments
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue DetailsSee #75790 (comment). We have a few places in the Jit where loads can potentially be duplicated, one especially high-risk area is address-exposed locals (everything that uses the "spill if complex, clone if local" pattern). Redundant relop optimization is another known source. It would also be useful to think about whether we can debug-check this sort of thing. RLO reproduction (requires [MethodImpl(MethodImplOptions.NoInlining)]
private static int Problem(int* p)
{
var b = *p == 1;
var c = b;
if (b)
{
JitUse(c);
return 2;
}
return 1;
}
[MethodImpl(MethodImplOptions.NoInlining)]
public static void JitUse<T>(T arg) { }
|
@markples PTAL. |
I'm going to mark this as priority:2. However, in practice that is going to mean (1) #78713 and (2) audit some "obvious" things (superficial look at copy/clone sites, audit "obvious" places (does regalloc rematerialize values). I don't have plans for figuring out a debug check. In general, this is a "do we have bugs" work item which is very open-ended, though of course it's a new requirement so it makes sense to give it some direct thought. |
See #75790 (comment).
We have a few places in the Jit where loads can potentially be duplicated, one especially high-risk area is address-exposed locals (everything that uses the "spill if complex, clone if local" pattern). See also #78713.
It would also be useful to think about whether we can debug-check this sort of thing.
category:cq
theme:addressing-modes
The text was updated successfully, but these errors were encountered: