-
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
Remove fgMorphCastedBitwiseOp #86491
Conversation
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue DetailsSeems like this opt is not very useful (only a few diffs in libraries.pmi and benchmarks), but at the same time it manages to significantly regress some benchmarks due to store-forward stalls #85957 Benchmark: [Benchmark]
[Arguments(ulong.MinValue)]
[Arguments((ulong)12345)]
public bool FormatterUInt64(ulong value) =>
Utf8Formatter.TryFormat(value, _destination, out _);
It's not a solution for such stalls in JIT's codegen, but I don't see clear benefits in having this opt in JIT
|
@dotnet/jit-contrib @AndyAyersMS thoughts? I was thinking first to ignore NOL locals but to me the overall diffs aren't motivating enough to keep the optimizating judging that some of the "size improvements" actually regress perf |
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.
LGTM, given that it has low hits. We discussed a bit offline and long term we should probably also consider whether we should fix codegen for normalize-on-load locals to always do a small access.
Yeah I think this is good. I looked to see if we missed spotting regressions back when this went in (#58727) but didn't find anything. |
// | ||
// Return Value: | ||
// A folded GenTree* instance, or nullptr if it couldn't be folded | ||
GenTree* Compiler::fgMorphCastedBitwiseOp(GenTreeOp* tree) |
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.
Not for this PR, but is this something we can handle in lowering instead where we can make the decision to keep or bypass the cast based on whether the operands are coming from memory?
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.
Probably, let's see if perf triage will find any regressions (hoping to see improvements instead)
I wonder if we are seeing this on arm64 too. The big drop on April 23 was from #85277 but it helped non PGO much more than PGO (we only had PGO data for win-x64 at that point) |
Seems like this opt is not very useful (only a few diffs in libraries.pmi and benchmarks), but at the same time it manages to significantly regress some benchmarks due to store-forward stalls #85957
Benchmark:
It's not a solution for such stalls in JIT's codegen, but I don't see clear benefits in having this opt in JIT