Open sandreenko opened 7 years ago
@jkotas We discussed to create this issue, but I don't know who could be mentioned here.
The code from the description is located here: https://github.com/dotnet/runtime/blob/144cac3d0ce162444452a5dcc837b904fe149ef4/src/coreclr/jit/flowgraph.cpp#L7775-L7778
ReadyToRun has this optimization for a non-virtual function pointers only for now. CoreRT supports a common case, moreover, it supports all R2R scenarios (for now the optimization is done only for
GT_FTN_ADDR
oper) where the constant lookup is used.It would be nice to support fgOptimizeDelegateConstructor for all R2R and delete
if (IsTargetAbi(CORINFO_CORERT_ABI))
condition there.category:cq theme:importer skill-level:intermediate cost:medium