Uh oh!
There was an error while loading. Please reload this page.
Remove the "anything + null => null" optimization - #61518
Conversation
This optimization is only legal if: 1) "Anything" is a sufficiently small constant itself. 2) We are in a context where we know the address will in fact be used for an indirection. It is the second point that is problematic - one would like to use MorphAddrContext, but it is not suitable for this purpose, as an unknown context is counted as an indirecting one. Additionally, the value of this optimization is rather low. I am guessing it was meant to support the legacy nullchecks, before GT_NULLCHECK was introduced, and had higher impact then. So, just remove the optimization and leave the 5 small regressions across all of SPMI be.
ghost
commented
Nov 12, 2021
Tagging subscribers to this area: @JulieLeeMSFT Issue DetailsThis optimization is only legal if:
It is the second point that is problematic - one would like to use MorphAddrContext, but it is not suitable for this purpose, as an unknown context is counted as an indirecting one. Additionally, the value of this optimization is rather low. I am guessing it was meant to support the legacy nullchecks, before So, I propose we just remove the optimization and leave the 5 small regressions across all of SPMI be.
|
SingleAccretion
commented
Nov 12, 2021
@dotnet/jit-contrib |
AndyAyersMS
left a comment
There was a problem hiding this comment.
Yes, this should go away.
LGTM.
AndyAyersMS
commented
Nov 15, 2021
Thank you! |
This optimization is only legal if:
It is the second point that is problematic - one would like to use MorphAddrContext, but it is not suitable for this purpose, as an unknown context is counted as an indirecting one. Additionally, the value of this optimization is rather low. I am guessing it was meant to support the legacy nullchecks, before
GT_NULLCHECKwas introduced, and had higher impact then.So, I propose we just remove the optimization and leave the 5 small regressions across all of SPMI be.
What do the diffs look like?
Just as one would expect:
(Note that above is a size improvement)
Fixes#61510
Note I do not plan to do anything here with the GC-ness issue as it is separate.