-
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
JIT: Avoid introducing GT_NULLCHECK in gtTryRemoveBoxUpstreamEffects #71439
Conversation
Adding GT_NULLCHECK nodes requires knowledge of which basic block the nullcheck will end up in. We do not have this easily available in all places this method is called, and regardless using GT_NULLCHECK here has minimal diffs. Fix dotnet#71193
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue DetailsAdding GT_NULLCHECK nodes requires knowledge of which basic block the Alternative we could store the Fix #71193 Also an unrelated comment clean-up that I have noticed while looking at early prop (we do not do this optimization here anymore).
|
cc @dotnet/jit-contrib PTAL @AndyAyersMS |
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.
This is reverting the code back to how I originally wrote it long ago.
Won't we now miss early folding opportunities because we may not see OMF_HAS_NULLCHECK and/or BBF_HAS_NULLCHECK in early prop?
Yes, there are a handful of missed opportunities in the diffs, but it is minimal. This whole area could do with some unifying. |
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.
I'm fine with the direction you want to head in -- we should also decide if all this opportunity flagging we use to gate early prop is worth the trouble.
Yes, this part is also unfortunate. At the very least we could probably use one of the full IR walks that are happening just prior to SSA to mark this information so that we don't need to keep it up to date all the time. |
Adding GT_NULLCHECK nodes requires knowledge of which basic block the
nullcheck will end up in. We do not have this easily available in all
places this method is called, and regardless using GT_NULLCHECK here has
minimal diffs.
Alternative we could store the
BasicBlock
together withGenTreeBox::gtCopyStmtWhenInlinedBoxValue
,but the diffs here are so small that I didn't bother.
Fix #71193
Also an unrelated comment clean-up that I have noticed while looking at early prop (we do not do this optimization here anymore).