Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
CPAOT - re-enable vtable calls within CoreLib #7168
We need to temporarily disable the optimization regarding vtable calls in CoreLib because it requires either re-implementing the CoreCLR method table builder in CPAOT or persisting the vtable layouts in the R2R image. Neither technology exists today. We however need to re-enable this optimization before shipping because the optimization is important for CoreLib performance and needed for letting us publish R2R (instead of fragile NGEN) CoreLib.
The bit of code I am commenting out is in ceeInfoGetCallInfo in CorInfoImpl.ReadyToRun.cs around line 1070 under the conditional clause
referenced this issue
Mar 14, 2019
I can ask @fadimounir for advice and run some perf testing with the optimization disabled in CoreCLR so that we get an idea. I understood Simon @nattress' response so that the optimization is crucial for letting us ship R2R-compiled CoreLib but I may have misunderstood him or he may have been mistaken about this.
There's another change that I merged after that vtable optimization in CoreLib, and that other change optimizes vtable calls for all cases, not just corelib. See dotnet/coreclr#20696.