Repository navigation
JIT: expand Object.GetType at Tier0 - #134708
Conversation
Allows folding obj.GetType() == typeof(X) at Tier0, avoiding dead branch imports. Co-authored-by: Copilot <[email protected]> Copilot-Session: b4a40cce-7d88-4ea2-894d-de51f9684999
|
Azure Pipelines: Successfully started running 5 pipeline(s). 11 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
|
ptal @dotnet/jit-contrib single-line change, some diffs |
This does not seem to be an accurate characterization of the impact of this change. The diffs that you have linked to show comparisons of RuntimeTypes transformed to comparison of MethodTable*, and also some elimination of null checks. Still a good diff, but I do not see any dead branch elimination. |
Hm.. good point, I assumed the diffs were just hidden behind the missing contexts in SPMI, but it seems it doesn't fold the branches yet. The good news is that it should be easily fixable (so we can fold branches early and don't even import their IL). |
Expand
Object.GetTypeas an intrinsic at Tier0 soobj.GetType() == typeof(X)folds early and dead branches aren't imported.