-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
JIT: Clean up inliner substitution #77176
Conversation
* Stop using GenTree::ReplaceWith * GenTreeRetExpr now directly contains its substitution members, which is a tree either from the inline candidate, a local (due to spill temps) or the call itself (due to inliner failure). In the former case, it also contains the BasicBlock the child tree comes from to ensure that its flags can be propagated once and for all during substitution. * Make various members strongly typed, e.g. GenTreeRetExpr::gtInlineCandidate is now a GenTreeCall*, InlineCandidateInfo::retExpr is now a GenTreeRetExpr*. This is possible since we are no longer using GenTree::ReplaceWith.
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue Details
|
/azp run runtime-coreclr jitstress, runtime-coreclr libraries-jitstress |
Azure Pipelines successfully started running 2 pipeline(s). |
When we fail to inline, the substitution will be the call itself, so we should propagate flags from the basic block containing the call. In particular this can be a problem with RET_EXPR chains.
/azp run runtime-coreclr jitstress, runtime-coreclr libraries-jitstress |
Azure Pipelines successfully started running 2 pipeline(s). |
Indeed, and I'm pretty sure the current way we propagate does not really make logical sense (see TODOs I have added in the source in this PR). I am hoping we are going to make some inliner changes in this release that we can remove those TODOs as part of. At least this PR accomplishes centralizing all the substitution logic (well, except for GDV) into |
The problem seems simple enough -- whenever we replace a |
cc @dotnet/jit-contrib PTAL @AndyAyersMS @EgorBo Small number of diffs where nested inlining propagates flags in slightly different ways. |
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.
Consider fixing the "prev BB" and BBF_SPLIT_GAINED
issues as separate isolated PRs (both from this PR and from each other by a few days), so we can better assess the impact of these via the lab data.
/azp run Fuzzlyn |
Azure Pipelines successfully started running 1 pipeline(s). |
The failures look like #76880 and known from build analysis.
Makes sense. |
I cannot reproduce the Fuzzlyn failures on the head of my PR. That probably means they are recent regressions in main. |
I'm not able to reproduce it on main either. I have seen these kind of intermittent failures before, so I don't think it's related to this PR. Not sure how we can track these down, I will need to think about if I can record more information from Fuzzlyn. The failures looked known as mentioned above so will merge. |
Fix #75827