Final method won't devirt when call-site is "complex" #11711
Labels
area-CodeGen-coreclr
CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Milestone
In the below example the call
res[0] = this.Do(src[0]);
won't be inlined, whilstres[0] = this.Do('B');
will be inlined.Excerpt of JIT dump:
For
DoWillDevirt
:So the difference is that in the former case the JIT won't recognize the current type
class for 'this' is Base
vs.class for 'this' is Foo
.In the IL there is nothing special for either case:
Build for coreclr was done at commit d4cab6e (from yesterday).
If this is already tracked in https://github.com/dotnet/coreclr/issues/9908 please feel free to close this issue here.
/cc: @AndyAyersMS
category:cq
theme:inlining
skill-level:expert
cost:medium
The text was updated successfully, but these errors were encountered: